diff options
author | Jack Lloyd <[email protected]> | 2019-11-29 12:51:08 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-12-03 05:17:55 -0500 |
commit | df4dea58ac77a7de084287fbbd0c4d7b01868d32 (patch) | |
tree | a847df46baf8cc67dc39413718ce3a5b797a9de2 | |
parent | f6ce13ec1259f0e7daf816ff46a89846dab24aa6 (diff) |
Fix PKCS11 warnings
-rw-r--r-- | src/tests/test_pkcs11_low_level.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/tests/test_pkcs11_low_level.cpp b/src/tests/test_pkcs11_low_level.cpp index 6cf3dcdd0..89492210c 100644 --- a/src/tests/test_pkcs11_low_level.cpp +++ b/src/tests/test_pkcs11_low_level.cpp @@ -616,8 +616,8 @@ std::array<Attribute, 4> dtemplate = { { static_cast<CK_ATTRIBUTE_TYPE>(AttributeType::Class), &object_class, sizeof(object_class) }, { static_cast<CK_ATTRIBUTE_TYPE>(AttributeType::Token), &btrue, sizeof(btrue) }, - { static_cast<CK_ATTRIBUTE_TYPE>(AttributeType::Label), const_cast< char* >(label.c_str()), label.size() }, - { static_cast<CK_ATTRIBUTE_TYPE>(AttributeType::Value), const_cast< char* >(data.c_str()), data.size() } + { static_cast<CK_ATTRIBUTE_TYPE>(AttributeType::Label), const_cast<char*>(label.c_str()), static_cast<CK_ULONG>(label.size()) }, + { static_cast<CK_ATTRIBUTE_TYPE>(AttributeType::Value), const_cast<char*>(data.c_str()), static_cast<CK_ULONG>(data.size()) } } }; @@ -766,7 +766,9 @@ Test::Result test_c_copy_object() std::string copied_label = "A copied data object"; - Attribute copy_attribute_values = { static_cast< CK_ATTRIBUTE_TYPE >(AttributeType::Label), const_cast< char* >(copied_label.c_str()), copied_label.size() }; + Attribute copy_attribute_values = { + static_cast<CK_ATTRIBUTE_TYPE>(AttributeType::Label), const_cast<char*>(copied_label.c_str()), static_cast<CK_ULONG>(copied_label.size()) + }; auto binder = std::bind(&LowLevel::C_CopyObject, *p11_low_level.get(), session_handle, object_handle, ©_attribute_values, 1, &copied_object_handle, std::placeholders::_1); |