new method Init.reset() - try whether we can find newly added slots

This commit is contained in:
Marc Wäckerlin
2009-12-09 11:13:54 +00:00
parent 7e38f050f7
commit f2b8078cb1
3 changed files with 12 additions and 12 deletions

View File

@@ -292,6 +292,7 @@ namespace cryptoki {
attrs.push_back(Attribute(CKA_ISSUER, cert.issuerDER()));
attrs.push_back(Attribute(CKA_SERIAL_NUMBER, cert.serial()));
attrs.push_back(Attribute(CKA_VALUE, cert.valueDER()));
CRYPTOKI_LOG("create: serial = "<<crypto::hex(cert.serial()));
return create(attrs);
}
@@ -337,13 +338,6 @@ namespace cryptoki {
return create(attrs);
}
Object Session::create(const std::string& label,
const openssl::PKCS12& p12) {
CRYPTOKI_LOG("log");
AttributeList attrs;
return create(attrs);
}
//----------------------------------------------------------------------------
Object Session::create(const AttributeList& attrs) {
CRYPTOKI_LOG("log");

View File

@@ -776,6 +776,12 @@ namespace cryptoki {
}
}
Init& reset() {
check(_fn->C_Finalize(0), CRYPTOKI_FN_LOG("C_Finalize"));
check(_fn->C_Initialize(0), CRYPTOKI_FN_LOG("C_Initialize"));
return *this;
}
/*! @name C Like Error Handling
You are strongly recommended not to disable exception
@@ -1083,8 +1089,6 @@ namespace cryptoki {
//! Create a new PrivateKey Object.
Object create(const std::string& label, const openssl::PrivateKey& key,
const openssl::X509& cert);
//! Create a new Certificate and optional PrivateKey Object.
Object create(const std::string& label, const openssl::PKCS12& p12);
//@}