Skip to content
Discussion options

You must be logged in to vote

That's already in 7.0.271 is out, so PublicKey.fromPem now reads the subject public key straight out of a -----BEGIN CERTIFICATE----- block with no openssl x509 -pubkey -noout step. Bump cn1.version / cn1.plugin.version to 7.0.271 and the code in your first post works unchanged against the certificate file from Base64Keys.zip. In a chain the leaf comes first, which is the key you want.

The DerValue.getOID, not an OID -96 you hit with the hand-rolled pemToDer was the same problem wearing a different message: -96 is 0xA0, the [0] EXPLICIT version tag that opens a TBSCertificate. So the stripper was working correctly and handing PublicKey.rsa a whole certificate, where it expects a SubjectPu…

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@Eric-Chomba
Comment options

@Eric-Chomba
Comment options

@Eric-Chomba
Comment options

Comment options

You must be logged in to vote
1 reply
@Eric-Chomba
Comment options

Comment options

You must be logged in to vote
1 reply
@Eric-Chomba
Comment options

Answer selected by Eric-Chomba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants