diff --git a/COPYING b/COPYING index 6168a39..6fb8e91 120000 --- a/COPYING +++ b/COPYING @@ -1 +1 @@ -/usr/share/automake-1.11/COPYING \ No newline at end of file +/opt/local/share/automake-1.11/COPYING \ No newline at end of file diff --git a/INSTALL b/INSTALL index cbd1c80..7a6487f 120000 --- a/INSTALL +++ b/INSTALL @@ -1 +1 @@ -/usr/share/automake-1.11/INSTALL \ No newline at end of file +/opt/local/share/automake-1.11/INSTALL \ No newline at end of file diff --git a/src/cryptoki.cxx b/src/cryptoki.cxx index c46951b..517b0a1 100644 --- a/src/cryptoki.cxx +++ b/src/cryptoki.cxx @@ -21,9 +21,6 @@ typedef CK_RV (*CK_C_GetFunctionList) #undef ERROR #endif -// no logging -#define CRYPTOKI_LOG(X) - namespace cryptoki { bool Init::functionList(const std::string& library) { diff --git a/src/cryptoki.hxx b/src/cryptoki.hxx index 52e1b27..c03f2f9 100644 --- a/src/cryptoki.hxx +++ b/src/cryptoki.hxx @@ -992,6 +992,10 @@ namespace cryptoki { friend class Login; friend class Object; + CK_FUNCTION_LIST* fn() { + return _slot._init->_fn; + } + Slot& _slot; CK_SESSION_HANDLE _session; CK_RV _res; @@ -1268,7 +1272,7 @@ namespace cryptoki { CK_USER_TYPE userType=CKU_USER): _session(session) { CRYPTOKI_LOG("log"); //! calls @c C_Login - _session.check(_session._slot._init->_fn->C_Login + _session.check(_session.fn()->C_Login (_session._session, userType, (CK_CHAR*)pin.c_str(), pin.size()), @@ -1278,7 +1282,7 @@ namespace cryptoki { ~Login() { try { //! calls @c C_Logout - _session.check(_session._slot._init->_fn->C_Logout + _session.check(_session.fn()->C_Logout (_session._session), CRYPTOKI_FN_LOG("C_Logout")); } catch (...) { diff --git a/src/openssl.hxx b/src/openssl.hxx index 74943fb..238aac4 100644 --- a/src/openssl.hxx +++ b/src/openssl.hxx @@ -697,7 +697,7 @@ namespace openssl { rsa(o); dsa(o); dh(o); - ec(o); + /*ec(o);*/ } std::string string(BIGNUM* a) const { std::string res(BN_num_bytes(a), '0'); @@ -717,10 +717,12 @@ namespace openssl { DH* tmp(o.dh()); if (tmp&&!EVP_PKEY_set1_DH(_key, tmp)) throw key_copy_failed(); } + /* Not available on mac osx void ec(const PrivateKey& o) { EC_KEY* tmp(o.ec()); if (tmp&&!EVP_PKEY_set1_EC_KEY(_key, tmp)) throw key_copy_failed(); } + */ RSA* rsa() const { //! @todo throw exception if 0? return EVP_PKEY_get1_RSA(_key); @@ -731,9 +733,10 @@ namespace openssl { DH* dh() const { return EVP_PKEY_get1_DH(_key); } + /* Not available on mac osx EC_KEY* ec() const { return EVP_PKEY_get1_EC_KEY(_key); - } + }*/ EVP_PKEY* _key; };