diff options
author | Jack Lloyd <[email protected]> | 2019-05-28 20:55:35 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-05-28 20:55:35 -0400 |
commit | 7be60f68d788e419eb3fb46adfc1b0813c017e8e (patch) | |
tree | 6b79915e81670296a238fb0d974ed3f52ea3dcaa | |
parent | c9f545ce8d55f851ceae20b05249729d760c05b8 (diff) | |
parent | 2f6c3af85117f4f48eac56e30d6f5088171abf08 (diff) |
Merge GH #1986 Fix compat with SoftHSM 2.5.0
-rw-r--r-- | doc/manual/pkcs11.rst | 2 | ||||
-rw-r--r-- | src/lib/prov/pkcs11/p11_ecdh.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/doc/manual/pkcs11.rst b/doc/manual/pkcs11.rst index 6e2827b16..781777264 100644 --- a/doc/manual/pkcs11.rst +++ b/doc/manual/pkcs11.rst @@ -1285,6 +1285,8 @@ Test results +-------------------------------------+-------------------------------------------+---------------------------------------------------+---------------------------------------------------+---------------------------------------------------+---------------------------------------------------+ | SoftHSM 2.3.0 (OpenSSL 1.0.2g) | works | Windows 10, 64-bit, version 1709 | Cryptoki v2.40 | 2.4.0, Cryptoki v2.40 | | +-------------------------------------+-------------------------------------------+---------------------------------------------------+---------------------------------------------------+---------------------------------------------------+---------------------------------------------------+ +| SoftHSM 2.5.0 (OpenSSL 1.1.1) | works | Windows 10, 64-bit, version 1803 | Cryptoki v2.40 | 2.11.0, Cryptoki v2.40 | | ++-------------------------------------+-------------------------------------------+---------------------------------------------------+---------------------------------------------------+---------------------------------------------------+---------------------------------------------------+ .. [50] Failing operations for CardOS 4.4: diff --git a/src/lib/prov/pkcs11/p11_ecdh.cpp b/src/lib/prov/pkcs11/p11_ecdh.cpp index 0cd671bcb..f6e27e513 100644 --- a/src/lib/prov/pkcs11/p11_ecdh.cpp +++ b/src/lib/prov/pkcs11/p11_ecdh.cpp @@ -74,7 +74,7 @@ class PKCS11_ECDH_KA_Operation final : public PK_Ops::Key_Agreement attributes.add_bool(AttributeType::Extractable, true); attributes.add_numeric(AttributeType::Class, static_cast< CK_OBJECT_CLASS >(ObjectClass::SecretKey)); attributes.add_numeric(AttributeType::KeyType, static_cast< CK_KEY_TYPE >(KeyType::GenericSecret)); - attributes.add_numeric(AttributeType::ValueLen, key_len); + attributes.add_numeric(AttributeType::ValueLen, static_cast< CK_ULONG >(key_len)); m_key.module()->C_DeriveKey(m_key.session().handle(), m_mechanism.data(), m_key.handle(), attributes.data(), attributes.count(), &secret_handle); |