Skip to content

Commit d86270d

Browse files
committed
Update the steps to generate the base64-based examples.
* More precisely * Updating the rsa-1.pem file path.
1 parent 2aa6d97 commit d86270d

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

test/openssl/test_pkcs12.rb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,13 @@ def test_create_with_keytype
233233
end
234234

235235
def test_new_with_no_keys
236-
# generated with:
237-
# openssl pkcs12 -certpbe PBE-SHA1-3DES -in <@mycert> -nokeys -export
236+
# Generated with the following steps:
237+
# Print the value of the @mycert such as by `puts @mycert.to_s` and
238+
# save the value as the file `mycert.pem`.
239+
# Run the following commands:
240+
# openssl pkcs12 -certpbe PBE-SHA1-3DES -in <(cat mycert.pem) \
241+
# -nokeys -export -passout pass:abc123 -out /tmp/p12.out
242+
# base64 -w 60 /tmp/p12.out
238243
str = <<~EOF.unpack1("m")
239244
MIIGJAIBAzCCBeoGCSqGSIb3DQEHAaCCBdsEggXXMIIF0zCCBc8GCSqGSIb3
240245
DQEHBqCCBcAwggW8AgEAMIIFtQYJKoZIhvcNAQcBMBwGCiqGSIb3DQEMAQMw
@@ -282,8 +287,10 @@ def test_new_with_no_keys
282287
end
283288

284289
def test_new_with_no_certs
285-
# generated with:
286-
# openssl pkcs12 -inkey fixtures/openssl/pkey/rsa-1.pem -nocerts -export
290+
# Generated with the folowing steps:
291+
# openssl pkcs12 -inkey test/openssl/fixtures/pkey/rsa-1.pem \
292+
# -nocerts -export -passout pass:abc123 -out /tmp/p12.out
293+
# base64 -w 60 /tmp/p12.out
287294
str = <<~EOF.unpack1("m")
288295
MIIJ7wIBAzCCCbUGCSqGSIb3DQEHAaCCCaYEggmiMIIJnjCCCZoGCSqGSIb3
289296
DQEHAaCCCYsEggmHMIIJgzCCCX8GCyqGSIb3DQEMCgECoIIJbjCCCWowHAYK

0 commit comments

Comments
 (0)