aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/prov/pkcs11/p11_ecdh.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-12-11 15:28:38 -0500
committerJack Lloyd <[email protected]>2016-12-18 16:48:24 -0500
commitf3cb3edb512bdcab498d825886c3366c341b3f78 (patch)
tree645c73ec295a5a34f25d99903b6d9fa9751e86d3 /src/lib/prov/pkcs11/p11_ecdh.cpp
parentc1dd21253c1f3188ff45d3ad47698efd08235ae8 (diff)
Convert to using standard uintN_t integer types
Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
Diffstat (limited to 'src/lib/prov/pkcs11/p11_ecdh.cpp')
-rw-r--r--src/lib/prov/pkcs11/p11_ecdh.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/prov/pkcs11/p11_ecdh.cpp b/src/lib/prov/pkcs11/p11_ecdh.cpp
index 50aa964d5..088b93894 100644
--- a/src/lib/prov/pkcs11/p11_ecdh.cpp
+++ b/src/lib/prov/pkcs11/p11_ecdh.cpp
@@ -33,7 +33,7 @@ ECDH_PrivateKey PKCS11_ECDH_PrivateKey::export_key() const
return ECDH_PrivateKey(rng, domain(), BigInt::decode(priv_key));
}
-secure_vector<byte> PKCS11_ECDH_PrivateKey::private_key_bits() const
+secure_vector<uint8_t> PKCS11_ECDH_PrivateKey::private_key_bits() const
{
return export_key().private_key_bits();
}
@@ -49,10 +49,10 @@ class PKCS11_ECDH_KA_Operation : public PK_Ops::Key_Agreement
/// The encoding in V2.20 was not specified and resulted in different implementations choosing different encodings.
/// Applications relying only on a V2.20 encoding (e.g. the DER variant) other than the one specified now (raw) may not work with all V2.30 compliant tokens.
- secure_vector<byte> agree(size_t key_len, const byte other_key[], size_t other_key_len, const byte salt[],
+ secure_vector<uint8_t> agree(size_t key_len, const uint8_t other_key[], size_t other_key_len, const uint8_t salt[],
size_t salt_len) override
{
- std::vector<byte> der_encoded_other_key;
+ std::vector<uint8_t> der_encoded_other_key;
if(m_key.point_encoding() == PublicPointEncoding::Der)
{
der_encoded_other_key = DER_Encoder().encode(other_key, other_key_len, OCTET_STRING).get_contents_unlocked();
@@ -79,7 +79,7 @@ class PKCS11_ECDH_KA_Operation : public PK_Ops::Key_Agreement
attributes.count(), &secret_handle);
Object secret_object(m_key.session(), secret_handle);
- secure_vector<byte> secret = secret_object.get_attribute_value(AttributeType::Value);
+ secure_vector<uint8_t> secret = secret_object.get_attribute_value(AttributeType::Value);
if(secret.size() < key_len)
{
throw PKCS11_Error("ECDH key derivation secret length is too short");