aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-05-28 20:55:35 -0400
committerJack Lloyd <[email protected]>2019-05-28 20:55:35 -0400
commit7be60f68d788e419eb3fb46adfc1b0813c017e8e (patch)
tree6b79915e81670296a238fb0d974ed3f52ea3dcaa
parentc9f545ce8d55f851ceae20b05249729d760c05b8 (diff)
parent2f6c3af85117f4f48eac56e30d6f5088171abf08 (diff)
Merge GH #1986 Fix compat with SoftHSM 2.5.0
-rw-r--r--doc/manual/pkcs11.rst2
-rw-r--r--src/lib/prov/pkcs11/p11_ecdh.cpp2
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);