new method Init.reset() - try whether we can find newly added slots
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
./bootstrap.sh && \
|
||||
LDFLAGS="-L/usr/lib32 -m32" CXXFLAGS="-m32" ./configure \
|
||||
LDFLAGS="-L/usr/lib32 -m32" \
|
||||
CXXFLAGS="-m32" \
|
||||
CPPFLAGS="-DCRYPTOKI_LOG\(X\)='std::clog<<X<<"'"@"'"<<__PRETTY_FUNCTION__<<std::endl'" \
|
||||
./configure \
|
||||
--libdir=/usr/local/lib32 \
|
||||
--build=x86_64 \
|
||||
--host=i386 && \
|
||||
@@ -9,7 +12,7 @@ make clean && \
|
||||
LDFLAGS="-L/opt/local/i586-mingw32msvc/lib" \
|
||||
CPPFLAGS="-I/opt/local/i586-mingw32msvc/include" \
|
||||
./configure \
|
||||
--prefix=/opt/local/i586-mingw32msvc \
|
||||
--prefix=/opt/local/ig586-mingw32msvc \
|
||||
--build=x86_64 \
|
||||
--host=i586-mingw32msvc && \
|
||||
make && \
|
||||
@@ -18,4 +21,3 @@ make clean && \
|
||||
./configure && \
|
||||
make check && \
|
||||
sudo make install
|
||||
|
||||
|
@@ -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");
|
||||
|
@@ -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);
|
||||
|
||||
//@}
|
||||
|
||||
|
Reference in New Issue
Block a user