pyXMLSecurity
pyXMLSecurity copied to clipboard
error: No such key <pkcs11 URL>
I imported a p12 cert to a Safenet eToken 5110. The result is that the private key has no label. As a result pk11.py does not find the key, because the search template is
(CKA_LABEL, keyname), (CKA_CLASS, CKO_PRIVATE_KEY), (CKA_KEY_TYPE, CKK_RSA)
My workaround is to make a second find using (CKA_CLASS, CKO_PRIVATE_KEY), (CKA_KEY_TYPE, CKK_RSA)
cf https://github.com/rhoerbe/pyXMLSecurity/blob/default-digestalg-sha2/src/xmlsec/pk11.py#L123