diff options
author | Samuel Giddins <[email protected]> | 2024-05-05 00:22:30 -0700 |
---|---|---|
committer | git <[email protected]> | 2024-05-08 09:39:13 +0000 |
commit | 841b45a4421a7f103b0312f84c14ece522833617 (patch) | |
tree | 8238476ed027314d3ba340ffea7e021cbc7a5336 /test/openssl | |
parent | aabe718e6483eb572566878320a0d83f430d1cbc (diff) |
[ruby/openssl] Add to_text for PKCS7 and Timestamp::Response
https://github.com/ruby/openssl/commit/71cd1e3f5c
Diffstat (limited to 'test/openssl')
-rw-r--r-- | test/openssl/test_pkcs7.rb | 6 | ||||
-rw-r--r-- | test/openssl/test_ts.rb | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/openssl/test_pkcs7.rb b/test/openssl/test_pkcs7.rb index 96f3f1f6be..c049ed444a 100644 --- a/test/openssl/test_pkcs7.rb +++ b/test/openssl/test_pkcs7.rb @@ -227,6 +227,12 @@ END assert_equal(p7.to_der, OpenSSL::PKCS7.read_smime(smime).to_der) end + def test_to_text + p7 = OpenSSL::PKCS7.new + p7.type = "signed" + assert_match(/signed/, p7.to_text) + end + def test_degenerate_pkcs7 ca_cert_pem = <<END -----BEGIN CERTIFICATE----- diff --git a/test/openssl/test_ts.rb b/test/openssl/test_ts.rb index 7cb1a1fe8e..ac0469ad56 100644 --- a/test/openssl/test_ts.rb +++ b/test/openssl/test_ts.rb @@ -323,6 +323,8 @@ _end_of_pem_ resp = fac.create_timestamp(ee_key, ts_cert_ee, req) assert_equal(OpenSSL::Timestamp::Response::GRANTED, resp.status) assert_equal("1.2.3.4.6", resp.token_info.policy_id) + + assert_match(/1\.2\.3\.4\.6/, resp.to_text) end def test_response_bad_purpose |