From: Martin Willi Date: Tue, 9 Apr 2013 08:56:09 +0000 (+0200) Subject: Check return value of ECDSA_Verify() correctly X-Git-Tag: 5.0.4~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0faaab20cd9c4a519fb6269ab6c8be15d0b61864;p=thirdparty%2Fstrongswan.git Check return value of ECDSA_Verify() correctly --- diff --git a/src/libstrongswan/plugins/openssl/openssl_ec_public_key.c b/src/libstrongswan/plugins/openssl/openssl_ec_public_key.c index c8a45f79ad..38cc8bedf0 100644 --- a/src/libstrongswan/plugins/openssl/openssl_ec_public_key.c +++ b/src/libstrongswan/plugins/openssl/openssl_ec_public_key.c @@ -124,7 +124,7 @@ static bool verify_der_signature(private_openssl_ec_public_key_t *this, if (openssl_hash_chunk(nid_hash, data, &hash)) { valid = ECDSA_verify(0, hash.ptr, hash.len, - signature.ptr, signature.len, this->ec); + signature.ptr, signature.len, this->ec) == 1; free(hash.ptr); } return valid;