Some token not allow access the public key object. (It does not even exist at all on some token...) This patch add search on CKO_CERTIFICATE to retrieve public key from certificates. Must be optimized... Tested with SafeNet 72K eToken.
It looks like you forgot to attach the patch. Could you please try again?
Created attachment 2054 [details] Patch for extract the pubkey from cert on pkcs#11
Created attachment 2354 [details] updated patch for extracting the pubkey from x509 via pkcs#11
Might a token offer a key in bare form and as a certificate? If so, should it check for an identical key in the array before appending it? Later, it would be nice to be able to extract an OpenSSH certificate from an extension section of the X.509 certificate so we could store our certs on the card too.
Created attachment 2370 [details] extract pub key from x509 via pkcs11, skip duplicates
Comment on attachment 2370 [details] extract pub key from x509 via pkcs11, skip duplicates Looks good!
(In reply to Damien Miller from comment #6) > Comment on attachment 2370 [details] > extract pub key from x509 via pkcs11, skip duplicates > > Looks good! I've committed the patch to openbsd....
this was committed some time back
Close all resolved bugs after 7.3p1 release