diff options
author | Francis Dupont <[email protected]> | 2017-06-12 21:07:39 +0200 |
---|---|---|
committer | Francis Dupont <[email protected]> | 2017-06-12 21:07:39 +0200 |
commit | f8a40dbc46411ed8a144c6e51b071225a5d40456 (patch) | |
tree | 382b8e89b9659a88e7ee75e6081ab11a4693dd23 | |
parent | 6087a9c248393d64ac8fbefa4cdab85c0ab46fef (diff) |
Replaced USE_NULL_PARAM (0x05 0x00) by an empty vector (nothing)
-rw-r--r-- | src/lib/pubkey/curve25519/curve25519.cpp | 5 | ||||
-rw-r--r-- | src/lib/pubkey/ed25519/ed25519_key.cpp | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/pubkey/curve25519/curve25519.cpp b/src/lib/pubkey/curve25519/curve25519.cpp index 94970ef3f..6cd5b0cb8 100644 --- a/src/lib/pubkey/curve25519/curve25519.cpp +++ b/src/lib/pubkey/curve25519/curve25519.cpp @@ -38,7 +38,10 @@ secure_vector<uint8_t> curve25519(const secure_vector<uint8_t>& secret, AlgorithmIdentifier Curve25519_PublicKey::algorithm_identifier() const { - return AlgorithmIdentifier(get_oid(), AlgorithmIdentifier::USE_NULL_PARAM); + // AlgorithmIdentifier::USE_NULL_PARAM puts 0x05 0x00 in parameters + // We want nothing + std::vector<uint8_t> empty; + return AlgorithmIdentifier(get_oid(), empty); } bool Curve25519_PublicKey::check_key(RandomNumberGenerator&, bool) const diff --git a/src/lib/pubkey/ed25519/ed25519_key.cpp b/src/lib/pubkey/ed25519/ed25519_key.cpp index 18bfb51d7..6089cfedf 100644 --- a/src/lib/pubkey/ed25519/ed25519_key.cpp +++ b/src/lib/pubkey/ed25519/ed25519_key.cpp @@ -18,7 +18,10 @@ namespace Botan { AlgorithmIdentifier Ed25519_PublicKey::algorithm_identifier() const { - return AlgorithmIdentifier(get_oid(), AlgorithmIdentifier::USE_NULL_PARAM); + // AlgorithmIdentifier::USE_NULL_PARAM puts 0x05 0x00 in parameters + // We want nothing + std::vector<uint8_t> empty; + return AlgorithmIdentifier(get_oid(), empty); } bool Ed25519_PublicKey::check_key(RandomNumberGenerator&, bool) const |