some details: user opensc-pkcs11.so by default; catch all exceptions on load

master
Marc Wäckerlin 14 years ago
parent f2b8078cb1
commit 234bb55b7b
  1. 2
      install-64-and-32-bit-linux.sh
  2. 4
      src/cryptoki.cxx
  3. 4
      src/cryptoki.hxx

@ -12,7 +12,7 @@ make clean && \
LDFLAGS="-L/opt/local/i586-mingw32msvc/lib" \
CPPFLAGS="-I/opt/local/i586-mingw32msvc/include" \
./configure \
--prefix=/opt/local/ig586-mingw32msvc \
--prefix=/opt/local/i586-mingw32msvc \
--build=x86_64 \
--host=i586-mingw32msvc && \
make && \

@ -166,7 +166,7 @@ namespace cryptoki {
}
}
Init::Init(const std::string& library, bool exc):
Init::Init(const std::string& library, bool exc) try:
_exc(exc), _res(CKR_OK), _fn(0) {
CRYPTOKI_LOG("library: "<<library);
//! calls @c functionList
@ -176,6 +176,8 @@ namespace cryptoki {
//! calls @c C_Initialize
check(_fn->C_Initialize(0), //! @todo add optional argument
CRYPTOKI_FN_LOG("C_Initialize"));
} catch (...) {
throw access_error(CRYPTOKI_FN_LOG("C_Initialize")+": Error in library");
}
Init::operator bool() {

@ -764,7 +764,7 @@ namespace cryptoki {
@param library name of the shared library that supports pkcs#11
@param exc wether exceptions should be thrown */
Init(const std::string& library="onepin-opensc-pkcs11.so", bool exc=true);
Init(const std::string& library="opensc-pkcs11.so", bool exc=true);
~Init() {
CRYPTOKI_LOG("log");
@ -1940,7 +1940,7 @@ namespace cryptoki {
else
free(attr.pValue);
} else if (*it==CKA_MODULUS && attr.ulValueLen==0) {
/*! @bug This is a bug in onepin-opensc-pkcs11.so: If
/*! @bug This is a bug in opensc-pkcs11.so: If
@c CKA_MODULUS has a size of 0 bytes, the
following query to @c CKA_MODULUS_BITS ends
in a segmentation fault.

Loading…
Cancel
Save