18 Commits
Author SHA1 Message Date
John WoodandGitHub 44210f297c Remove ioutil (#289) 2022-08-11 10:59:59 -07:00
John WoodandGitHub 9a1ff6da3d Update to 1.16 (#275) 2022-06-28 14:59:36 -07:00
John WoodandGitHub 7ef0417bde Allow any ciphersuite in TestConnect (#268) 2022-06-06 08:47:20 -07:00
John WoodandGitHub 5332ac7ca2 Fix TestConnect on macOS (#265)
@bdd did an excellent writeup of the issue in #264. To fix this, stop relying on stable error messages between platforms and Go versions by performing a successful certigo connect in the test rather than a failed one.

I generated new ECDSA certificates for localhost using https://github.com/square/certstrap.
2022-06-01 10:20:03 -07:00
3a9d341427 Bump version string to 1.15.1 (#263)
Co-authored-by: John Wood <jwood@squareup.com>
2022-03-24 11:31:14 -07:00
John WoodandGitHub f8a8c1f06a Remove use of the format list in the connect command (#260) 2022-02-24 12:40:07 -08:00
Isaac Semaya 328db64fa0 Add --leaf flag to view the first cert only, including for json and pem
added dump-pkcs12-chain-to-pem.t to contrast with dump-pkcs12-chain-to-pem-first-only and show that multiple pem blocks are dumped without the --first flag.t
2022-02-23 16:44:05 -08:00
John WoodandGitHub 9e92473320 Set certs explicitly (#259) 2022-02-23 13:02:49 -08:00
John WoodandGitHub dc9943e20c Bump version string to 1.14.1 (#254) 2022-01-11 10:51:04 -08:00
klyubinandGitHub ba10cd1db7 Add support for verifying server certs against SPIFFE IDs (#252)
Add support for verifying server certs against SPIFFE IDs

This adds support to "certigo connect" to verify that the
server presented a certificate for a specific hostname or
SPIFFE ID. This name can now be unrelated to the hostname
to connect to and the Server Name Indication (SNI) to send
to the server during the TLS handshake.

Prior to this commit, the name expected in the certificate
could only be a hostname, specified either via --name (SNI)
or the hostname to connect to. SPIFFE IDs -- URLs with
"spiffe" as the scheme -- are not useful as hostnames or
SNIs. As a result, this commit adds a new --expected-name
switch to certigo connect. This override provides full
control over what name to expect in the server certificate
presented during the TLS handshake. For example, this name
can now be different from the hostname connected to and the
name specified in Server Name Indication (SNI). Moreover,
if --expected-name is a URL with "spiffe" scheme, it is
only matched against Subject Alternative Names of type URI,
as per the SPIFFE spec.
2022-01-10 15:57:47 -08:00
Benjamin KaneandGitHub 2b1f74f2cb Allow certigo -h (#251) 2021-12-04 12:06:09 -08:00
Mat ByczkowskiandGitHub 3eead6f4d1 Bump version to 1.13.0 2021-11-29 12:01:35 -08:00
Nick Travers cea08b4292 fix: bump version in cli.go
The latest released version is 1.12.1 @ f8835d9, however the version
string still reflects version 1.12.0, when run with:

```
$ certigo --version
```

Bump version string to lastest released version.

Signed-off-by: Nick Travers <n.e.travers@gmail.com>
2020-05-25 16:58:48 -07:00
Roy Xu 07965a4a02 add test for connect 2020-02-28 16:02:40 -05:00
Roy Xu f33a3ef94d no need to print input format when connecting to server 2020-02-28 15:27:48 -05:00
Mat ByczkowskiandGitHub 949178094c Version bump and go mod tidy (#212) 2020-02-26 17:22:37 -08:00
Roy XuandGitHub f81df5c5a3 print input format guessed by certigo (#210) 2020-02-25 11:17:01 -08:00
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