Support for displaying OIDs for unknown algorithms#69
Support for displaying OIDs for unknown algorithms#69
Conversation
This commit supports displaying the OIDs for unknown signature and public key algorithms. The output also showsthe bytes of the public key. This can be used for example to examine certificates with PQC algorithms.
527ef26 to
21da9a3
Compare
test_certs/ML-DSA-44.crt.text.short
Outdated
| @@ -0,0 +1,5 @@ | |||
| X.509v3 Intermediate CA Certificate (0 unknown) [Serial: 1234...5678] | |||
There was a problem hiding this comment.
Shouldn't (0 unknown) now indicate something like ML-DSA-44? Do these need regeneration?
| } | ||
| default: | ||
| return errors.New("certinfo: Unknown public key type") | ||
| printUnknownPublicKeyAlgorithm(certOrCSR, buf) |
There was a problem hiding this comment.
Maybe needs a split in logic between an actually unknown algorithms, and the ones that you added in this PR, as the latter ones are not unknown algorithms (anymore).
There was a problem hiding this comment.
What do you mean? Now, unless the certificate parsing fails, I can extract at least the OID of the public key and signature algorithms, instead of just crashing.
There was a problem hiding this comment.
The main thing was that the algorithms extracted using the new method aren't (fully) unknown (anymore), as they're now known in this library, but maybe it's a bit too pedantic. On the other hand: it is performing logic for the case it's the x509.UnknownPublicKeyAlgorithm, so maybe not that bad.
Co-authored-by: Herman Slatman <hslatman@users.noreply.github.com>
Description
This commit supports displaying the OIDs for unknown signature and public key algorithms. The output also shows the bytes of the public key.
This can be used for example to examine certificates with PQC algorithms.
An example of this is: