110 Commits
Author SHA1 Message Date
Matthew McPherrin 26cd65d9bd refactor certigo package main
This splits the logic into a cli, which handles parsing command line args and
reading files, and a terminal abstraction for handling user input and ouput.

All uses of os.Exit are removed in favor of returning errors.

Overall this enables better testing and reuse of code.  Previously we had to
rely on external unit testing for CLI tests, which are harder to write tests.
2020-01-13 15:58:53 -08:00
Mat Byczkowski 08b7ec82ef Verify certificate chain in connect
Unverified chains will cause a non-zero exit code.

Fixes #188
2019-07-03 14:52:55 -07:00
Cedric Staub e1c3a71bdd Update version to 1.11.0 2018-11-21 14:18:13 -08:00
Matthew McPherrin c58011aee0 Move ocsp.go and verify.go into lib
This reduces a bunch of copy-paste code.
2018-04-04 21:21:46 -07:00
Cedric StaubandGitHub 7647f623bd Merge branch 'master' into cs/ocsp 2018-04-03 22:32:07 -07:00
Cedric Staub 14ff9b3f05 Add some hacky OCSP status checking code 2018-04-03 18:06:16 -07:00
Matthew McPherrin 16d197a5b9 Default to using the "long" help format
Certigo doesn't have too many options, so the long help is a reasonble default.
2018-04-03 12:41:11 -07:00
Matthew McPherrinandMatthew McPherrin 58f10be303 Add an aliased --starttls. DRY the protocols by putting them in starttls.go
Unfortunately kingpin doesn't support natively support aliased flag names, so
you can supply both --start-tls and --starttls without an error, but that's
just "holding it wrong".
2018-03-14 18:09:03 -07:00
Matthew McPherrin cbdcc47d56 Add protocol-specific default ports
If otherwise unspecified, default to port 443.
If a starttls protocol is given, use a protocol-specific default.

So now "certigo connect squareup.com" works.
2018-03-10 19:38:29 -08:00
Cedric Staub 25f903dabf Bump app version to 1.10.0 2018-02-27 17:25:15 -08:00
Cedric Staub c8199c40d1 Tag v1.9.2 2017-11-08 11:41:33 -08:00
Cedric Staub 15a4a957d6 Add HTTP(S) CONNECT proxy support to certigo 2017-10-11 15:53:44 -07:00
Cedric Staub f25bb53761 Generate man page during build 2017-08-03 14:35:40 -07:00
Cedric Staub 1fc809aa1d Fix app version 2017-05-15 21:35:28 -07:00
Cedric Staub fe74b984aa Better error handling in certigo dump command 2017-05-09 14:41:34 -07:00
Cedric Staub 5a9a11db35 Add support for showing requested client certificate info 2017-04-08 14:55:37 -07:00
Matthew McPherrin b61f9af0af Review feedback: Flag named --identity and a better description
Validate --identity can only be used with --start-tls
2017-03-31 23:57:29 -07:00
Matthew McPherrin 60f1c25a94 Add a --asuser flag which sets DB user & stmp EHLO hostname. 2017-03-31 15:36:38 -07:00
Cedric Staub 606c9f62fe Bump version to 1.8.0 2017-03-13 11:24:36 -07:00
Cedric Staub 8e09747959 Clean up terminal width code a bit 2017-03-13 11:03:40 -07:00
Cedric Staub 5a26bbac2a Compress output of alternative names and emails 2017-03-10 17:00:01 -08:00
Cedric Staub c3b6ec93dc Support connect timeouts 2017-03-09 15:03:56 -08:00
Matthew McPherrin f5f617c58f Make text certs shorter, existing text output now has a --verbose flag 2017-02-25 16:33:09 -08:00
Cedric Staub 94ad3a4062 Double newline after TLS connection state 2017-02-25 13:19:44 -08:00
Cedric Staub 2404cbbd3d Implement AUTH TLS for FTP servers 2017-02-24 20:29:43 -08:00
Cedric Staub 14d573b760 Bump certigo app version 2017-02-21 13:53:40 -08:00
Cedric Staub 97cd3e7d39 Cleanup flag order, add short opts for flags 2017-02-21 13:28:45 -08:00
Matthew McPherrinandGitHub ba53dc65bc Merge pull request #119 from square/mmc/tlsinfo
Print TLS version & cipher suite when connecting
2017-02-21 13:14:52 -08:00
Cedric Staub c5021c0065 Nicer output for verified chains 2017-02-19 18:53:45 -08:00
Matthew McPherrinandMatthew McPherrin 2a02e76a19 [WIP] Print TLS version & cipher suite when connecting 2017-02-19 14:36:31 -08:00
Matthew McPherrin 5c0832b26f ldap starttls support 2017-02-18 23:45:16 -08:00
Matthew McPherrinandGitHub 9eda6bacb6 Merge pull request #117 from square/mmc/colours
Add support for coloured output on windows
2017-02-18 19:21:39 -08:00
Matthew McPherrin b866e297c8 Add support for coloured output on windows 2017-02-18 16:46:00 -08:00
Cedric Staub 62a8de327f Remove unused tlsConfigForConnect function 2017-02-18 15:01:04 -08:00
Matthew McPherrin 30a551f7db Add a newline for better errors 2017-02-17 16:48:22 -08:00
Matthew McPherrin bf475c2239 Update docs to include smtp 2017-02-17 15:56:35 -08:00
Matthew McPherrin 4cc48a1ee6 Add SMTP support to STARTTLS 2017-02-17 15:49:03 -08:00
Matthew McPherrin 98dbc46373 Remove print and os.Exit from starttls library 2017-02-17 15:34:18 -08:00
Matthew McPherrin 35679297a9 Move StartTLS functionality into a subpackage, enabling use elsewhere
This moves two functions out of main.go.
The only change to the functions was to make them take arguments, instead of using global variables in main.

The mysql and psql imports are moved here too.
2017-02-17 12:39:57 -08:00
Cedric Staub 7bf6b39473 Bump version to 1.6.0 2017-02-16 15:55:30 -08:00
Cedric Staub b2fa7061a4 Support StartTLS for PostgreSQL 2017-02-16 14:31:58 -08:00
Cedric Staub 0136c09945 Support StartTLS for MySQL 2017-02-16 13:56:41 -08:00
Cedric Staub 0fcec90397 Support for client certificates in certigo connect 2016-11-18 11:48:54 -08:00
Cedric Staub 4704138725 Better naming and doc comments 2016-10-07 14:26:03 -07:00
Cedric Staub d9d52c5712 Factor out useful functions into library 2016-10-07 13:16:07 -07:00
Cedric Staub 3e5957b84a Update version to 1.4.0 2016-09-27 14:19:44 -07:00
Cedric Staub 3ccd98f60f Couple more fixes and tests 2016-09-27 13:35:26 -07:00
Cedric Staub af2e15a3ba Support --json in verify command 2016-09-24 17:50:01 -07:00
Cedric Staub ad41621796 Small fixes for JSON output mode 2016-09-24 17:24:27 -07:00
Sarah HarveyandCedric Staub d69167a2b8 Resolve some comments 2016-09-24 17:23:57 -07:00