diff options
author | Samuel Chiang <[email protected]> | 2025-02-12 01:52:40 +0000 |
---|---|---|
committer | git <[email protected]> | 2025-02-22 15:11:39 +0000 |
commit | 841d9f259dbe70fa35b4634b5c90d2c33e51c3f9 (patch) | |
tree | fafe911037436e0b93cc1feea79280263be9e08b /test/openssl/utils.rb | |
parent | f63a123606286eadd812313a4ea42af8ea8c686f (diff) |
[ruby/openssl] pkey: EVP_DigestVerify doesn't return -1 in AWS-LC
EVP_DigestVerify in OpenSSL returns 0 to indicate a signature
verification failure and can return -1 to indicate other
failures, such as invalid ASN1 contents. ruby/openssl also
reflects that by returning false with 0 and raising an error
with -1.
EVP_DigestVerify in AWS-LC simply returns 0 for any failure.
https://github.com/ruby/openssl/commit/be8ba76dc1
Diffstat (limited to 'test/openssl/utils.rb')
-rw-r--r-- | test/openssl/utils.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/openssl/utils.rb b/test/openssl/utils.rb index e0c085b53b..ff789ff284 100644 --- a/test/openssl/utils.rb +++ b/test/openssl/utils.rb @@ -286,6 +286,14 @@ class OpenSSL::PKeyTestCase < OpenSSL::TestCase assert_equal base.send(comp), test.send(comp) } end + + def assert_sign_verify_false_or_error + ret = yield + rescue => e + assert_kind_of(OpenSSL::PKey::PKeyError, e) + else + assert_equal(false, ret) + end end module OpenSSL::Certs |