pyXMLSecurity icon indicating copy to clipboard operation
pyXMLSecurity copied to clipboard

error: No such key <pkcs11 URL>

Open rhoerbe opened this issue 8 years ago • 0 comments

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

rhoerbe avatar May 27 '17 21:05 rhoerbe