diff options
Diffstat (limited to 'src/lib/prov/pkcs11/p11.h')
-rw-r--r-- | src/lib/prov/pkcs11/p11.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/lib/prov/pkcs11/p11.h b/src/lib/prov/pkcs11/p11.h index 72abcd611..efc887e11 100644 --- a/src/lib/prov/pkcs11/p11.h +++ b/src/lib/prov/pkcs11/p11.h @@ -58,7 +58,7 @@ static_assert(CRYPTOKI_VERSION_MAJOR == 2 && CRYPTOKI_VERSION_MINOR == 40, namespace Botan { namespace PKCS11 { -using secure_string = secure_vector<byte>; +using secure_string = secure_vector<uint8_t>; enum class AttributeType : CK_ATTRIBUTE_TYPE { @@ -1149,7 +1149,7 @@ class BOTAN_DLL LowLevel */ template<typename TAlloc> bool C_InitToken(SlotId slot_id, - const std::vector<byte, TAlloc>& so_pin, + const std::vector<uint8_t, TAlloc>& so_pin, const std::string& label, ReturnValue* return_value = ThrowException) const { @@ -1159,7 +1159,7 @@ class BOTAN_DLL LowLevel padded_label.insert(padded_label.end(), 32 - label.size(), ' '); } - return C_InitToken(slot_id, reinterpret_cast< Utf8Char* >(const_cast< byte* >(so_pin.data())), + return C_InitToken(slot_id, reinterpret_cast< Utf8Char* >(const_cast< uint8_t* >(so_pin.data())), so_pin.size(), reinterpret_cast< Utf8Char* >(const_cast< char* >(padded_label.c_str())), return_value); } @@ -1201,10 +1201,10 @@ class BOTAN_DLL LowLevel */ template<typename TAlloc> bool C_InitPIN(SessionHandle session, - const std::vector<byte, TAlloc>& pin, + const std::vector<uint8_t, TAlloc>& pin, ReturnValue* return_value = ThrowException) const { - return C_InitPIN(session, reinterpret_cast< Utf8Char* >(const_cast< byte* >(pin.data())), pin.size(), return_value); + return C_InitPIN(session, reinterpret_cast< Utf8Char* >(const_cast< uint8_t* >(pin.data())), pin.size(), return_value); } /** @@ -1250,13 +1250,13 @@ class BOTAN_DLL LowLevel */ template<typename TAlloc> bool C_SetPIN(SessionHandle session, - const std::vector<byte, TAlloc>& old_pin, - const std::vector<byte, TAlloc>& new_pin, + const std::vector<uint8_t, TAlloc>& old_pin, + const std::vector<uint8_t, TAlloc>& new_pin, ReturnValue* return_value = ThrowException) const { return C_SetPIN(session, - reinterpret_cast< Utf8Char* >(const_cast< byte* >(old_pin.data())), old_pin.size(), - reinterpret_cast< Utf8Char* >(const_cast< byte* >(new_pin.data())), new_pin.size(), + reinterpret_cast< Utf8Char* >(const_cast< uint8_t* >(old_pin.data())), old_pin.size(), + reinterpret_cast< Utf8Char* >(const_cast< uint8_t* >(new_pin.data())), new_pin.size(), return_value); } @@ -1423,10 +1423,10 @@ class BOTAN_DLL LowLevel template<typename TAlloc> bool C_Login(SessionHandle session, UserType user_type, - const std::vector<byte, TAlloc>& pin, + const std::vector<uint8_t, TAlloc>& pin, ReturnValue* return_value = ThrowException) const { - return C_Login(session, user_type, reinterpret_cast< Utf8Char* >(const_cast< byte* >(pin.data())), pin.size(), + return C_Login(session, user_type, reinterpret_cast< Utf8Char* >(const_cast< uint8_t* >(pin.data())), pin.size(), return_value); } @@ -1576,7 +1576,7 @@ class BOTAN_DLL LowLevel template<typename TAlloc> bool C_GetAttributeValue(SessionHandle session, ObjectHandle object, - std::map<AttributeType, std::vector<byte, TAlloc>>& attribute_values, + std::map<AttributeType, std::vector<uint8_t, TAlloc>>& attribute_values, ReturnValue* return_value = ThrowException) const { std::vector<Attribute> getter_template; @@ -1599,7 +1599,7 @@ class BOTAN_DLL LowLevel { entry.second.clear(); entry.second.resize(getter_template.at(i).ulValueLen); - getter_template.at(i).pValue = const_cast< byte* >(entry.second.data()); + getter_template.at(i).pValue = const_cast< uint8_t* >(entry.second.data()); i++; } @@ -1651,7 +1651,7 @@ class BOTAN_DLL LowLevel template<typename TAlloc> bool C_SetAttributeValue(SessionHandle session, ObjectHandle object, - std::map<AttributeType, std::vector<byte, TAlloc>>& attribute_values, + std::map<AttributeType, std::vector<uint8_t, TAlloc>>& attribute_values, ReturnValue* return_value = ThrowException) const { std::vector<Attribute> setter_template; @@ -1788,8 +1788,8 @@ class BOTAN_DLL LowLevel */ template<typename TAllocA, typename TAllocB> bool C_Encrypt(SessionHandle session, - const std::vector<byte, TAllocA>& plaintext_data, - std::vector<byte, TAllocB>& encrypted_data, + const std::vector<uint8_t, TAllocA>& plaintext_data, + std::vector<uint8_t, TAllocB>& encrypted_data, ReturnValue* return_value = ThrowException) const { Ulong encrypted_size = 0; @@ -1915,8 +1915,8 @@ class BOTAN_DLL LowLevel */ template<typename TAllocA, typename TAllocB> bool C_Decrypt(SessionHandle session, - const std::vector<byte, TAllocA>& encrypted_data, - std::vector<byte, TAllocB>& decrypted_data, + const std::vector<uint8_t, TAllocA>& encrypted_data, + std::vector<uint8_t, TAllocB>& decrypted_data, ReturnValue* return_value = ThrowException) const { Ulong decrypted_size = 0; @@ -2064,7 +2064,7 @@ class BOTAN_DLL LowLevel * C_DigestFinal finishes a multiple-part message-digesting operation. * @param session the session's handle * @param digest_ptr gets the message digest - * @param digest_len_ptr gets byte count of digest + * @param digest_len_ptr gets uint8_t count of digest * @param return_value default value (`ThrowException`): throw exception on error. * if a non-NULL pointer is passed: return_value receives the return value of the PKCS#11 function and no exception is thrown. * At least the following PKCS#11 return values may be returned: @@ -2147,8 +2147,8 @@ class BOTAN_DLL LowLevel */ template<typename TAllocA, typename TAllocB> bool C_Sign(SessionHandle session, - const std::vector<byte, TAllocA>& data, - std::vector<byte, TAllocB>& signature, + const std::vector<uint8_t, TAllocA>& data, + std::vector<uint8_t, TAllocB>& signature, ReturnValue* return_value = ThrowException) const { Ulong signature_size = 0; @@ -2197,7 +2197,7 @@ class BOTAN_DLL LowLevel */ template<typename TAlloc> bool C_SignUpdate(SessionHandle session, - const std::vector<byte, TAlloc>& part, + const std::vector<uint8_t, TAlloc>& part, ReturnValue* return_value = ThrowException) const { return C_SignUpdate(session, const_cast<Byte*>(part.data()), part.size(), return_value); @@ -2241,7 +2241,7 @@ class BOTAN_DLL LowLevel */ template<typename TAlloc> bool C_SignFinal(SessionHandle session, - std::vector<byte, TAlloc>& signature, + std::vector<uint8_t, TAlloc>& signature, ReturnValue* return_value = ThrowException) const { Ulong signature_size = 0; @@ -2368,8 +2368,8 @@ class BOTAN_DLL LowLevel */ template<typename TAllocA, typename TAllocB> bool C_Verify(SessionHandle session, - const std::vector<byte, TAllocA>& data, - std::vector<byte, TAllocB>& signature, + const std::vector<uint8_t, TAllocA>& data, + std::vector<uint8_t, TAllocB>& signature, ReturnValue* return_value = ThrowException) const { return C_Verify(session, const_cast<Byte*>(data.data()), data.size(), signature.data(), signature.size(), return_value); @@ -2411,7 +2411,7 @@ class BOTAN_DLL LowLevel */ template<typename TAlloc> bool C_VerifyUpdate(SessionHandle session, - std::vector<byte, TAlloc> part, + std::vector<uint8_t, TAlloc> part, ReturnValue* return_value = ThrowException) const { return C_VerifyUpdate(session, part.data(), part.size(), return_value); |