This commit updates zlint to the latest version. The new version's
`e_key_usage_and_extended_key_usage_inconsistent` linter contains a
bug, so this commit disables it. The new version also correctly
identifies an error with some of the test certificates, so the
commit adds the error to the expected output (rather than
regenerating the certificates with modern policies).
This commit adds an explicit `golangci-lint` configuration that
simply matches the default linters previously in use, and then
fixes all current linter findings.
Aside from tweaking error message strings, this commit introduces
one externally visible behavior change: PEM data generated from
PKCS#12 files now correctly identifies private key blocks as
`RSA PRIVATE KEY` or `EC PRIVATE KEY`, whereas previously it
generated invalid `PRIVATE KEY` blocks with non-PKCS#8 data.
This commit lays the groundwork for more aggressive linting in the
future, and identifies some additional issues via TODOs.
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
Error when no valid certs are found when verifying instead of accessing oob.
Warn when CSRs are found instead of silently ignoring them.
Co-authored-by: Mat Byczkowski <mbyczkowski@gmail.com>
Print all the values that Go parses out, and print OIDs and values for the
ExtraNames Values that Go allows multiple values (everything other than CN) are
printed multiple times instead of in a square-bracket array. Since most certs
have only a single value for each, this just avoids the square brackets.