File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 33
33
describe file ( '/tmp/export4.pkcs12.p12' ) do
34
34
its ( :size ) { is_expected . to be > 0 }
35
35
end
36
+
37
+ if fact ( 'openssl_version' ) . split ( '.' ) . first . to_i > 1
38
+ describe command ( 'openssl pkcs12 -info -in /tmp/export3.pkcs12.p12 -passin pass: -passout pass:' ) do
39
+ its ( :stdout ) { is_expected . to contain ( '-----BEGIN CERTIFICATE-----' ) }
40
+ its ( :stdout ) { is_expected . to contain ( '-----BEGIN ENCRYPTED PRIVATE KEY-----' ) }
41
+ its ( :exit_status ) { is_expected . to eq 0 }
42
+ end
43
+
44
+ describe command ( 'openssl pkcs12 -info -in /tmp/export.pkcs12.p12 -passin pass:mahje1Qu -passout pass:' ) do
45
+ its ( :stdout ) { is_expected . to contain ( '-----BEGIN CERTIFICATE-----' ) }
46
+ its ( :stdout ) { is_expected . to contain ( '-----BEGIN ENCRYPTED PRIVATE KEY-----' ) }
47
+ its ( :exit_status ) { is_expected . to eq 0 }
48
+ end
49
+ end
50
+
36
51
# rubocop:enable RSpec/RepeatedExampleGroupBody
37
52
end
You can’t perform that action at this time.
0 commit comments