diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2018-01-04 18:26:41 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2018-01-04 18:48:07 +0900 |
commit | 769b5575d157aca77b78e44d94ea40ad08e3975e (patch) | |
tree | e534e7250e6a255c55b36f70ab7bd05a60f1a2de /test | |
parent | b8b8f74e95854a8db793d8189952a51e5af53dea (diff) | |
download | ruby-openssl-769b5575d157aca77b78e44d94ea40ad08e3975e.tar.gz |
pkcs7: allow recipient's certificate to be omitted for PKCS7#decryptky/pkcs7-decrypt-without-recipients-certificate
The recipient's certificate is not mandatory for PKCS7_decrypt(). Make
it possible to call OpenSSL::PKCS7#decrypt with only the private key to
match the functionality.
Reference: https://github.com/ruby/openssl/issues/182
Diffstat (limited to 'test')
-rw-r--r-- | test/test_pkcs7.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_pkcs7.rb b/test/test_pkcs7.rb index 149d3b9b..6437112b 100644 --- a/test/test_pkcs7.rb +++ b/test/test_pkcs7.rb @@ -133,6 +133,8 @@ class OpenSSL::TestPKCS7 < OpenSSL::TestCase assert_equal(@ca_cert.subject.to_s, recip[1].issuer.to_s) assert_equal(3, recip[1].serial) assert_equal(data, p7.decrypt(@rsa1024, @ee2_cert)) + + assert_equal(data, p7.decrypt(@rsa1024)) end def test_graceful_parsing_failure #[ruby-core:43250] |