Add a builder to load specific pkcs11 certificates by keyid

This commit is contained in:
Martin Willi
2012-10-24 13:07:52 +02:00
parent ffe42fa405
commit fbd3863571
3 changed files with 115 additions and 0 deletions
@@ -65,4 +65,15 @@ struct pkcs11_creds_t {
*/
pkcs11_creds_t *pkcs11_creds_create(pkcs11_library_t *p11, CK_SLOT_ID slot);
/**
* Load a specific certificate from a token.
*
* Accepts a BUILD_PKCS11_KEYID as the only argument.
*
* @param type certificate type, must be CERT_X509
* @param args variable argument list, containing BUILD_PKCS11_KEYID.
* @return loaded certificate, or NULL on failure
*/
certificate_t *pkcs11_creds_load(certificate_type_t type, va_list args);
#endif /** PKCS11_CREDS_H_ @}*/