|
|
|
@ -1350,13 +1350,13 @@ namespace cryptoki { |
|
|
|
|
friend class Session; |
|
|
|
|
|
|
|
|
|
CK_OBJECT_HANDLE _object; |
|
|
|
|
Session& _session; |
|
|
|
|
Session* _session; |
|
|
|
|
CK_RV _res; |
|
|
|
|
|
|
|
|
|
bool check(CK_RV result, const std::string& context="") { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
_res = result; |
|
|
|
|
if (_session._slot._init->_exc && !*this) |
|
|
|
|
if (_session->_slot._init->_exc && !*this) |
|
|
|
|
if (!context.empty()) |
|
|
|
|
throw access_error(context+": "+error()); |
|
|
|
|
else |
|
|
|
@ -1367,20 +1367,12 @@ namespace cryptoki { |
|
|
|
|
Object(); // forbidden
|
|
|
|
|
|
|
|
|
|
Object(Session& session, CK_OBJECT_HANDLE obj): |
|
|
|
|
_session(session), _object(obj), _res(CKR_OK) { |
|
|
|
|
_session(&session), _object(obj), _res(CKR_OK) { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
|
|
|
|
|
Object& operator=(Object& o) { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
_object = o._object; |
|
|
|
|
_session = o._session; |
|
|
|
|
_res = o._res; |
|
|
|
|
return *this; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/*! @name Comfortable Access
|
|
|
|
|
|
|
|
|
|
Use these methods in favour of the Low Level Cryptoki |
|
|
|
@ -1426,7 +1418,7 @@ namespace cryptoki { |
|
|
|
|
/*! @return error text of last cryptoki call */ |
|
|
|
|
std::string error() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
return _session._slot._init->error(_res); |
|
|
|
|
return _session->_slot._init->error(_res); |
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//@}
|
|
|
|
@ -1442,7 +1434,7 @@ namespace cryptoki { |
|
|
|
|
bool copyobject() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_CopyObject
|
|
|
|
|
return check(_session._slot._init->_fn->C_CopyObject(_session._session, CK_OBJECT_HANDLE, |
|
|
|
|
return check(_session->_slot._init->_fn->C_CopyObject(_session->_session, CK_OBJECT_HANDLE, |
|
|
|
|
CK_ATTRIBUTE_PTR, CK_ULONG, CK_OBJECT_HANDLE_PTR), |
|
|
|
|
CRYPTOKI_FN_LOG("C_CopyObject")); |
|
|
|
|
} |
|
|
|
@ -1456,8 +1448,8 @@ namespace cryptoki { |
|
|
|
|
CRYPTOKI_LOG("decryptinit: type="<<type<<"; mech=("<<mech.mechanism |
|
|
|
|
<<", "<<mech.pParameter<<", "<<mech.ulParameterLen<<')'); |
|
|
|
|
//! calls @c C_DecryptInit
|
|
|
|
|
return check(_session._slot._init->_fn->C_DecryptInit |
|
|
|
|
(_session._session, &mech, _object), |
|
|
|
|
return check(_session->_slot._init->_fn->C_DecryptInit |
|
|
|
|
(_session->_session, &mech, _object), |
|
|
|
|
CRYPTOKI_FN_LOG("C_DecryptInit")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1468,14 +1460,14 @@ namespace cryptoki { |
|
|
|
|
CK_ULONG size(0); // two calls, first to get minimum buffer length
|
|
|
|
|
CRYPTOKI_LOG("get size"); |
|
|
|
|
//! calls @c C_Decrypt
|
|
|
|
|
check(_session._slot._init->_fn->C_Decrypt |
|
|
|
|
(_session._session, |
|
|
|
|
check(_session->_slot._init->_fn->C_Decrypt |
|
|
|
|
(_session->_session, |
|
|
|
|
(unsigned char*)&in[0], in.size(), 0, &size), |
|
|
|
|
CRYPTOKI_FN_LOG("C_Decrypt")); |
|
|
|
|
CRYPTOKI_LOG("maximum size is "<<size<<"Bytes"); |
|
|
|
|
res.resize(size, 0); |
|
|
|
|
check(_session._slot._init->_fn->C_Decrypt |
|
|
|
|
(_session._session, |
|
|
|
|
check(_session->_slot._init->_fn->C_Decrypt |
|
|
|
|
(_session->_session, |
|
|
|
|
(unsigned char*)&in[0], in.size(), |
|
|
|
|
(unsigned char*)&res[0], &size), |
|
|
|
|
CRYPTOKI_FN_LOG("C_Decrypt")); |
|
|
|
@ -1490,8 +1482,8 @@ namespace cryptoki { |
|
|
|
|
res.resize(in.size()); |
|
|
|
|
CK_ULONG size(res.size()); //! @todo check if size is ok
|
|
|
|
|
//! calls @c C_DecryptDigestUpdate
|
|
|
|
|
check(_session._slot._init->_fn->C_DecryptDigestUpdate |
|
|
|
|
(_session._session, |
|
|
|
|
check(_session->_slot._init->_fn->C_DecryptDigestUpdate |
|
|
|
|
(_session->_session, |
|
|
|
|
(unsigned char*)&in[0], in.size(), |
|
|
|
|
(unsigned char*)&res[0], &size), |
|
|
|
|
CRYPTOKI_FN_LOG("C_DecryptDigestUpdate")); |
|
|
|
@ -1502,8 +1494,8 @@ namespace cryptoki { |
|
|
|
|
bool decryptfinal() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_DecryptFinal
|
|
|
|
|
return check(_session._slot._init->_fn->C_DecryptFinal |
|
|
|
|
(_session._session, 0, 0), |
|
|
|
|
return check(_session->_slot._init->_fn->C_DecryptFinal |
|
|
|
|
(_session->_session, 0, 0), |
|
|
|
|
CRYPTOKI_FN_LOG("C_DecryptFinal")); |
|
|
|
|
//! @todo does this work?
|
|
|
|
|
} |
|
|
|
@ -1514,8 +1506,8 @@ namespace cryptoki { |
|
|
|
|
res.resize(in.size()); |
|
|
|
|
CK_ULONG size(res.size()); //! @todo check if size is ok
|
|
|
|
|
//! calls @c C_DecryptUpdate
|
|
|
|
|
check(_session._slot._init->_fn->C_DecryptUpdate |
|
|
|
|
(_session._session, |
|
|
|
|
check(_session->_slot._init->_fn->C_DecryptUpdate |
|
|
|
|
(_session->_session, |
|
|
|
|
(unsigned char*)&in[0], in.size(), |
|
|
|
|
(unsigned char*)&res[0], &size), |
|
|
|
|
CRYPTOKI_FN_LOG("C_DecryptUpdate")); |
|
|
|
@ -1529,8 +1521,8 @@ namespace cryptoki { |
|
|
|
|
res.resize(in.size()); |
|
|
|
|
CK_ULONG size(res.size()); //! @todo check if size is ok
|
|
|
|
|
//! calls @c C_DecryptVerifyUpdate
|
|
|
|
|
check(_session._slot._init->_fn->C_DecryptVerifyUpdate |
|
|
|
|
(_session._session, |
|
|
|
|
check(_session->_slot._init->_fn->C_DecryptVerifyUpdate |
|
|
|
|
(_session->_session, |
|
|
|
|
(unsigned char*)&in[0], in.size(), |
|
|
|
|
(unsigned char*)&res[0], &size), |
|
|
|
|
CRYPTOKI_FN_LOG("C_DecryptVerifyUpdate")); |
|
|
|
@ -1543,7 +1535,7 @@ namespace cryptoki { |
|
|
|
|
bool derivekey() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_DeriveKey
|
|
|
|
|
return check(_session._slot._init->_fn->C_DeriveKey(_session._session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE, |
|
|
|
|
return check(_session->_slot._init->_fn->C_DeriveKey(_session->_session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE, |
|
|
|
|
CK_ATTRIBUTE_PTR, CK_ULONG, CK_OBJECT_HANDLE_PTR), |
|
|
|
|
CRYPTOKI_FN_LOG("C_DeriveKey")); |
|
|
|
|
} |
|
|
|
@ -1552,8 +1544,8 @@ namespace cryptoki { |
|
|
|
|
bool destroy() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_DestroyObject
|
|
|
|
|
return check(_session._slot._init->_fn->C_DestroyObject |
|
|
|
|
(_session._session, _object), |
|
|
|
|
return check(_session->_slot._init->_fn->C_DestroyObject |
|
|
|
|
(_session->_session, _object), |
|
|
|
|
CRYPTOKI_FN_LOG("C_DestroyObject")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1563,7 +1555,7 @@ namespace cryptoki { |
|
|
|
|
bool digestkey() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_DigestKey
|
|
|
|
|
return check(_session._slot._init->_fn->C_DigestKey(_session._session, CK_OBJECT_HANDLE), |
|
|
|
|
return check(_session->_slot._init->_fn->C_DigestKey(_session->_session, CK_OBJECT_HANDLE), |
|
|
|
|
CRYPTOKI_FN_LOG("C_DigestKey")); |
|
|
|
|
} |
|
|
|
|
@endcode */ |
|
|
|
@ -1576,8 +1568,8 @@ namespace cryptoki { |
|
|
|
|
CRYPTOKI_LOG("encryptinit: type="<<type<<"; mech=("<<mech.mechanism |
|
|
|
|
<<", "<<mech.pParameter<<", "<<mech.ulParameterLen<<')'); |
|
|
|
|
//! calls @c C_EncryptInit
|
|
|
|
|
return check(_session._slot._init->_fn->C_EncryptInit |
|
|
|
|
(_session._session, &mech, _object), |
|
|
|
|
return check(_session->_slot._init->_fn->C_EncryptInit |
|
|
|
|
(_session->_session, &mech, _object), |
|
|
|
|
CRYPTOKI_FN_LOG("C_EncryptInit")); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1587,14 +1579,14 @@ namespace cryptoki { |
|
|
|
|
CK_ULONG size(0); // two calls, first to get minimum buffer length
|
|
|
|
|
CRYPTOKI_LOG("get size"); |
|
|
|
|
//! calls @c C_Encrypt
|
|
|
|
|
check(_session._slot._init->_fn->C_Encrypt |
|
|
|
|
(_session._session, |
|
|
|
|
check(_session->_slot._init->_fn->C_Encrypt |
|
|
|
|
(_session->_session, |
|
|
|
|
(unsigned char*)&in[0], in.size(), 0, &size), |
|
|
|
|
CRYPTOKI_FN_LOG("C_Decrypt")); |
|
|
|
|
CRYPTOKI_LOG("maximum size is "<<size<<"Bytes"); |
|
|
|
|
res.resize(size, 0); |
|
|
|
|
check(_session._slot._init->_fn->C_Encrypt |
|
|
|
|
(_session._session, |
|
|
|
|
check(_session->_slot._init->_fn->C_Encrypt |
|
|
|
|
(_session->_session, |
|
|
|
|
(unsigned char*)&in[0], in.size(), |
|
|
|
|
(unsigned char*)&res[0], &size), |
|
|
|
|
CRYPTOKI_FN_LOG("C_Encrypt")); |
|
|
|
@ -1607,7 +1599,7 @@ namespace cryptoki { |
|
|
|
|
bool encryptfinal() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_EncryptFinal
|
|
|
|
|
return check(_session._slot._init->_fn->C_EncryptFinal(_session._session, CK_BYTE_PTR, CK_ULONG_PTR), |
|
|
|
|
return check(_session->_slot._init->_fn->C_EncryptFinal(_session->_session, CK_BYTE_PTR, CK_ULONG_PTR), |
|
|
|
|
CRYPTOKI_FN_LOG("C_EncryptFinal")); |
|
|
|
|
} |
|
|
|
|
@endcode */ |
|
|
|
@ -1618,8 +1610,8 @@ namespace cryptoki { |
|
|
|
|
res.resize(in.size()); |
|
|
|
|
CK_ULONG size(res.size()); //! @todo check if size is ok
|
|
|
|
|
//! calls @c C_EncryptUpdate
|
|
|
|
|
check(_session._slot._init->_fn->C_EncryptUpdate |
|
|
|
|
(_session._session, |
|
|
|
|
check(_session->_slot._init->_fn->C_EncryptUpdate |
|
|
|
|
(_session->_session, |
|
|
|
|
(unsigned char*)&in[0], in.size(), |
|
|
|
|
(unsigned char*)&res[0], &size), |
|
|
|
|
CRYPTOKI_FN_LOG("C_EncryptUpdate")); |
|
|
|
@ -1632,7 +1624,7 @@ namespace cryptoki { |
|
|
|
|
bool generatekey() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_GenerateKey
|
|
|
|
|
return check(_session._slot._init->_fn->C_GenerateKey(_session._session, CK_MECHANISM_PTR, CK_ATTRIBUTE_PTR, |
|
|
|
|
return check(_session->_slot._init->_fn->C_GenerateKey(_session->_session, CK_MECHANISM_PTR, CK_ATTRIBUTE_PTR, |
|
|
|
|
CK_ULONG, CK_OBJECT_HANDLE_PTR), |
|
|
|
|
CRYPTOKI_FN_LOG("C_GenerateKey")); |
|
|
|
|
} |
|
|
|
@ -1644,7 +1636,7 @@ namespace cryptoki { |
|
|
|
|
bool generatekeypair() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_GenerateKeyPair
|
|
|
|
|
return check(_session._slot._init->_fn->C_GenerateKeyPair(_session._session, CK_MECHANISM_PTR, CK_ATTRIBUTE_PTR, |
|
|
|
|
return check(_session->_slot._init->_fn->C_GenerateKeyPair(_session->_session, CK_MECHANISM_PTR, CK_ATTRIBUTE_PTR, |
|
|
|
|
CK_ULONG, CK_ATTRIBUTE_PTR, CK_ULONG, |
|
|
|
|
CK_OBJECT_HANDLE_PTR, CK_OBJECT_HANDLE_PTR), |
|
|
|
|
CRYPTOKI_FN_LOG("C_GenerateKeyPair")); |
|
|
|
@ -1664,8 +1656,8 @@ namespace cryptoki { |
|
|
|
|
Attribute res; |
|
|
|
|
CK_ATTRIBUTE attr((CK_ATTRIBUTE){a, 0, 0}); |
|
|
|
|
//! calls @c C_GetAttributeValue
|
|
|
|
|
if (!check(_session._slot._init->_fn->C_GetAttributeValue |
|
|
|
|
(_session._session, _object, &attr, 1), |
|
|
|
|
if (!check(_session->_slot._init->_fn->C_GetAttributeValue |
|
|
|
|
(_session->_session, _object, &attr, 1), |
|
|
|
|
CRYPTOKI_FN_LOG("C_GetAttributeValue")) |
|
|
|
|
|| !(long)attr.ulValueLen>0l) |
|
|
|
|
//! Without exception handling, size and type must be checked too.
|
|
|
|
@ -1673,8 +1665,8 @@ namespace cryptoki { |
|
|
|
|
try { |
|
|
|
|
attr.pValue = malloc(attr.ulValueLen); |
|
|
|
|
attr.pValue = memset(attr.pValue, 0, attr.ulValueLen); |
|
|
|
|
if (check(_session._slot._init->_fn->C_GetAttributeValue |
|
|
|
|
(_session._session, _object, &attr, 1), |
|
|
|
|
if (check(_session->_slot._init->_fn->C_GetAttributeValue |
|
|
|
|
(_session->_session, _object, &attr, 1), |
|
|
|
|
CRYPTOKI_FN_LOG("C_GetAttributeValue"))) |
|
|
|
|
/*! @todo There's no @c CKA_WRAP_TEMPLATE in Open
|
|
|
|
|
Cryptoki. From the Specs: «In the special case |
|
|
|
@ -1789,8 +1781,8 @@ namespace cryptoki { |
|
|
|
|
attr = (CK_ATTRIBUTE){*it, 0, 0}; |
|
|
|
|
try { |
|
|
|
|
//! calls @c C_GetAttributeValue
|
|
|
|
|
if (_session._slot._init->_fn->C_GetAttributeValue |
|
|
|
|
(_session._session, _object, &attr, 1) |
|
|
|
|
if (_session->_slot._init->_fn->C_GetAttributeValue |
|
|
|
|
(_session->_session, _object, &attr, 1) |
|
|
|
|
== CKR_ATTRIBUTE_TYPE_INVALID |
|
|
|
|
|| _res == CKR_ATTRIBUTE_SENSITIVE) { |
|
|
|
|
continue; //! Ignores unsupported Attributes.
|
|
|
|
@ -1799,8 +1791,8 @@ namespace cryptoki { |
|
|
|
|
if ((long)attr.ulValueLen>0l) { |
|
|
|
|
attr.pValue = malloc(attr.ulValueLen); |
|
|
|
|
attr.pValue = memset(attr.pValue, 0, attr.ulValueLen); |
|
|
|
|
if (check(_session._slot._init->_fn->C_GetAttributeValue |
|
|
|
|
(_session._session, _object, &attr, 1), |
|
|
|
|
if (check(_session->_slot._init->_fn->C_GetAttributeValue |
|
|
|
|
(_session->_session, _object, &attr, 1), |
|
|
|
|
CRYPTOKI_FN_LOG("C_GetAttributeValue"))) |
|
|
|
|
/*! @todo There's no @c CKA_WRAP_TEMPLATE in Open
|
|
|
|
|
Cryptoki. From the Specs: «In the special |
|
|
|
@ -1861,7 +1853,7 @@ namespace cryptoki { |
|
|
|
|
bool getobjectsize() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_GetObjectSize
|
|
|
|
|
return check(_session._slot._init->_fn->C_GetObjectSize(_session._session, CK_OBJECT_HANDLE, CK_ULONG_PTR), |
|
|
|
|
return check(_session->_slot._init->_fn->C_GetObjectSize(_session->_session, CK_OBJECT_HANDLE, CK_ULONG_PTR), |
|
|
|
|
CRYPTOKI_FN_LOG("C_GetObjectSize")); |
|
|
|
|
} |
|
|
|
|
@endcode */ |
|
|
|
@ -1872,7 +1864,7 @@ namespace cryptoki { |
|
|
|
|
bool setattributevalue() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_SetAttributeValue
|
|
|
|
|
return check(_session._slot._init->_fn->C_SetAttributeValue(_session._session, CK_OBJECT_HANDLE, |
|
|
|
|
return check(_session->_slot._init->_fn->C_SetAttributeValue(_session->_session, CK_OBJECT_HANDLE, |
|
|
|
|
CK_ATTRIBUTE_PTR, CK_ULONG), |
|
|
|
|
CRYPTOKI_FN_LOG("C_SetAttributeValue")); |
|
|
|
|
} |
|
|
|
@ -1883,7 +1875,7 @@ namespace cryptoki { |
|
|
|
|
bool setoperationstate() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_SetOperationState
|
|
|
|
|
return check(_session._slot._init->_fn->C_SetOperationState(_session._session, CK_BYTE_PTR, CK_ULONG, |
|
|
|
|
return check(_session->_slot._init->_fn->C_SetOperationState(_session->_session, CK_BYTE_PTR, CK_ULONG, |
|
|
|
|
CK_OBJECT_HANDLE, CK_OBJECT_HANDLE), |
|
|
|
|
CRYPTOKI_FN_LOG("C_SetOperationState")); |
|
|
|
|
} |
|
|
|
@ -1894,7 +1886,7 @@ namespace cryptoki { |
|
|
|
|
bool signinit() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_SignInit
|
|
|
|
|
return check(_session._slot._init->_fn->C_SignInit(_session._session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE), |
|
|
|
|
return check(_session->_slot._init->_fn->C_SignInit(_session->_session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE), |
|
|
|
|
CRYPTOKI_FN_LOG("C_SignInit")); |
|
|
|
|
} |
|
|
|
|
@endcode */ |
|
|
|
@ -1905,7 +1897,7 @@ namespace cryptoki { |
|
|
|
|
bool signrecoverinit() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_SignRecoverInit
|
|
|
|
|
return check(_session._slot._init->_fn->C_SignRecoverInit(_session._session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE), |
|
|
|
|
return check(_session->_slot._init->_fn->C_SignRecoverInit(_session->_session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE), |
|
|
|
|
CRYPTOKI_FN_LOG("C_SignRecoverInit")); |
|
|
|
|
} |
|
|
|
|
@endcode */ |
|
|
|
@ -1915,7 +1907,7 @@ namespace cryptoki { |
|
|
|
|
bool unwrapkey() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_UnwrapKey
|
|
|
|
|
return check(_session._slot._init->_fn->C_UnwrapKey(_session._session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE, |
|
|
|
|
return check(_session->_slot._init->_fn->C_UnwrapKey(_session->_session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE, |
|
|
|
|
CK_BYTE_PTR, CK_ULONG, CK_ATTRIBUTE_PTR, CK_ULONG, |
|
|
|
|
CK_OBJECT_HANDLE_PTR), |
|
|
|
|
CRYPTOKI_FN_LOG("C_UnwrapKey")); |
|
|
|
@ -1927,7 +1919,7 @@ namespace cryptoki { |
|
|
|
|
bool verifyinit() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_VerifyInit
|
|
|
|
|
return check(_session._slot._init->_fn->C_VerifyInit(_session._session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE), |
|
|
|
|
return check(_session->_slot._init->_fn->C_VerifyInit(_session->_session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE), |
|
|
|
|
CRYPTOKI_FN_LOG("C_VerifyInit")); |
|
|
|
|
} |
|
|
|
|
@endcode */ |
|
|
|
@ -1938,7 +1930,7 @@ namespace cryptoki { |
|
|
|
|
bool verifyrecoverinit() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_VerifyRecoverInit
|
|
|
|
|
return check(_session._slot._init->_fn->C_VerifyRecoverInit(_session._session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE), |
|
|
|
|
return check(_session->_slot._init->_fn->C_VerifyRecoverInit(_session->_session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE), |
|
|
|
|
CRYPTOKI_FN_LOG("C_VerifyRecoverInit")); |
|
|
|
|
} |
|
|
|
|
@endcode */ |
|
|
|
@ -1949,7 +1941,7 @@ namespace cryptoki { |
|
|
|
|
bool wrapkey() { |
|
|
|
|
CRYPTOKI_LOG("log"); |
|
|
|
|
//! calls @c C_WrapKey
|
|
|
|
|
return check(_session._slot._init->_fn->C_WrapKey(_session._session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE, |
|
|
|
|
return check(_session->_slot._init->_fn->C_WrapKey(_session->_session, CK_MECHANISM_PTR, CK_OBJECT_HANDLE, |
|
|
|
|
CK_OBJECT_HANDLE, CK_BYTE_PTR, CK_ULONG_PTR), |
|
|
|
|
CRYPTOKI_FN_LOG("C_WrapKey")); |
|
|
|
|
} |
|
|
|
|