summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Aruga <jaruga@redhat.com>2026-01-27 19:01:27 +0000
committergit <svn-admin@ruby-lang.org>2026-02-02 17:06:08 +0000
commit997943219c2d44e60d1d7ae25c8f78c99ce6d970 (patch)
tree235696afa4eda0383f362125836029c50e2284b5
parente690a8f39a121a2532586a321db7c4dfa1d867df (diff)
[ruby/openssl] Update the steps to generate the base64-based examples.
* More precisely * Updating the rsa-1.pem file path. https://github.com/ruby/openssl/commit/d86270d1df
-rw-r--r--test/openssl/test_pkcs12.rb15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/openssl/test_pkcs12.rb b/test/openssl/test_pkcs12.rb
index 81f7875f9a..617c156cbd 100644
--- a/test/openssl/test_pkcs12.rb
+++ b/test/openssl/test_pkcs12.rb
@@ -233,8 +233,13 @@ module OpenSSL
end
def test_new_with_no_keys
- # generated with:
- # openssl pkcs12 -certpbe PBE-SHA1-3DES -in <@mycert> -nokeys -export
+ # Generated with the following steps:
+ # Print the value of the @mycert such as by `puts @mycert.to_s` and
+ # save the value as the file `mycert.pem`.
+ # Run the following commands:
+ # openssl pkcs12 -certpbe PBE-SHA1-3DES -in <(cat mycert.pem) \
+ # -nokeys -export -passout pass:abc123 -out /tmp/p12.out
+ # base64 -w 60 /tmp/p12.out
str = <<~EOF.unpack1("m")
MIIGJAIBAzCCBeoGCSqGSIb3DQEHAaCCBdsEggXXMIIF0zCCBc8GCSqGSIb3
DQEHBqCCBcAwggW8AgEAMIIFtQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMw
@@ -282,8 +287,10 @@ AA==
end
def test_new_with_no_certs
- # generated with:
- # openssl pkcs12 -inkey fixtures/openssl/pkey/rsa-1.pem -nocerts -export
+ # Generated with the folowing steps:
+ # openssl pkcs12 -inkey test/openssl/fixtures/pkey/rsa-1.pem \
+ # -nocerts -export -passout pass:abc123 -out /tmp/p12.out
+ # base64 -w 60 /tmp/p12.out
str = <<~EOF.unpack1("m")
MIIJ7wIBAzCCCbUGCSqGSIb3DQEHAaCCCaYEggmiMIIJnjCCCZoGCSqGSIb3
DQEHAaCCCYsEggmHMIIJgzCCCX8GCyqGSIb3DQEMCgECoIIJbjCCCWowHAYK