diff options
author | Nuno Goncalves <[email protected]> | 2017-02-25 12:27:20 +0100 |
---|---|---|
committer | Nuno Goncalves <[email protected]> | 2017-02-25 12:28:37 +0100 |
commit | 464504acd3ff0ce80ac2f8d6cabd97665d50f258 (patch) | |
tree | 7f3ad244a35e3970dcfb28c767cce157fbc20557 /src/lib/pubkey | |
parent | 2142cf8de355a2c442922e02696ee8e26449f5e6 (diff) |
Remove verify_end() chained immediatly before end_cons() (close #890)
BER_Decoder::end_cons() allready assures the verify_end()
function, so it is redundant.
Signed-off-by: Nuno Goncalves <[email protected]>
Diffstat (limited to 'src/lib/pubkey')
-rw-r--r-- | src/lib/pubkey/curve25519/curve25519.cpp | 2 | ||||
-rw-r--r-- | src/lib/pubkey/pbes2/pbes2.cpp | 2 | ||||
-rw-r--r-- | src/lib/pubkey/rsa/rsa.cpp | 1 | ||||
-rw-r--r-- | src/lib/pubkey/x509_key.cpp | 2 |
4 files changed, 0 insertions, 7 deletions
diff --git a/src/lib/pubkey/curve25519/curve25519.cpp b/src/lib/pubkey/curve25519/curve25519.cpp index 4908bf46f..070b8e841 100644 --- a/src/lib/pubkey/curve25519/curve25519.cpp +++ b/src/lib/pubkey/curve25519/curve25519.cpp @@ -52,7 +52,6 @@ Curve25519_PublicKey::Curve25519_PublicKey(const AlgorithmIdentifier&, BER_Decoder(key_bits) .start_cons(SEQUENCE) .decode(m_public, OCTET_STRING) - .verify_end() .end_cons(); size_check(m_public.size(), "public key"); @@ -81,7 +80,6 @@ Curve25519_PrivateKey::Curve25519_PrivateKey(const AlgorithmIdentifier&, .start_cons(SEQUENCE) .decode(m_public, OCTET_STRING) .decode(m_private, OCTET_STRING) - .verify_end() .end_cons(); size_check(m_public.size(), "public key"); diff --git a/src/lib/pubkey/pbes2/pbes2.cpp b/src/lib/pubkey/pbes2/pbes2.cpp index 3f1000170..01bab76bb 100644 --- a/src/lib/pubkey/pbes2/pbes2.cpp +++ b/src/lib/pubkey/pbes2/pbes2.cpp @@ -116,7 +116,6 @@ pbes2_decrypt(const secure_vector<uint8_t>& key_bits, .start_cons(SEQUENCE) .decode(kdf_algo) .decode(enc_algo) - .verify_end() .end_cons(); AlgorithmIdentifier prf_algo; @@ -136,7 +135,6 @@ pbes2_decrypt(const secure_vector<uint8_t>& key_bits, .decode_optional(prf_algo, SEQUENCE, CONSTRUCTED, AlgorithmIdentifier("HMAC(SHA-160)", AlgorithmIdentifier::USE_NULL_PARAM)) - .verify_end() .end_cons(); const std::string cipher = OIDS::lookup(enc_algo.oid); diff --git a/src/lib/pubkey/rsa/rsa.cpp b/src/lib/pubkey/rsa/rsa.cpp index 1a287473a..d8deccab3 100644 --- a/src/lib/pubkey/rsa/rsa.cpp +++ b/src/lib/pubkey/rsa/rsa.cpp @@ -58,7 +58,6 @@ RSA_PublicKey::RSA_PublicKey(const AlgorithmIdentifier&, .start_cons(SEQUENCE) .decode(m_n) .decode(m_e) - .verify_end() .end_cons(); } diff --git a/src/lib/pubkey/x509_key.cpp b/src/lib/pubkey/x509_key.cpp index 700020901..6fadeb70d 100644 --- a/src/lib/pubkey/x509_key.cpp +++ b/src/lib/pubkey/x509_key.cpp @@ -46,7 +46,6 @@ Public_Key* load_key(DataSource& source) .start_cons(SEQUENCE) .decode(alg_id) .decode(key_bits, BIT_STRING) - .verify_end() .end_cons(); } else @@ -59,7 +58,6 @@ Public_Key* load_key(DataSource& source) .start_cons(SEQUENCE) .decode(alg_id) .decode(key_bits, BIT_STRING) - .verify_end() .end_cons(); } |