File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 18
18
in_pass => ' mahje1Qu' ,
19
19
out_pass => ' mahje1Qu' ,
20
20
}
21
+
22
+ # same as above, just no password for the X509
23
+ openssl::certificate::x509 { 'foo2.example.com' :
24
+ ensure => present ,
25
+ country => ' CH' ,
26
+ organization => ' Example.com' ,
27
+ commonname => ' foo2.example.com' ,
28
+ base_dir => ' /tmp' ,
29
+ owner => ' nobody' ,
30
+ # This is just to speed up CI - use 2048 or more in production
31
+ key_size => 1024,
32
+ }
33
+ -> openssl::export::pkcs12 { ' export2.pkcs12' :
34
+ ensure => ' present' ,
35
+ basedir => ' /tmp' ,
36
+ pkey => ' /tmp/foo2.example.com.key' ,
37
+ cert => ' /tmp/foo2.example.com.crt' ,
38
+ out_pass => ' mahje1Qu' ,
39
+ }
Original file line number Diff line number Diff line change 7
7
it { expect ( file ( '/tmp/foo.example.com.crt' ) ) . to be_file . and ( have_attributes ( owner : 'nobody' , group : 'root' ) ) }
8
8
it { expect ( file ( '/tmp/foo.example.com.key' ) ) . to be_file . and ( have_attributes ( owner : 'nobody' , group : 'root' ) ) }
9
9
it { expect ( file ( '/tmp/export.pkcs12.p12' ) ) . to be_file . and ( have_attributes ( owner : 'root' , group : 'root' ) ) }
10
+ it { expect ( file ( '/tmp/foo2.example.com.crt' ) ) . to be_file . and ( have_attributes ( owner : 'nobody' , group : 'root' ) ) }
11
+ it { expect ( file ( '/tmp/foo2.example.com.key' ) ) . to be_file . and ( have_attributes ( owner : 'nobody' , group : 'root' ) ) }
12
+ it { expect ( file ( '/tmp/export2.pkcs12.p12' ) ) . to be_file . and ( have_attributes ( owner : 'root' , group : 'root' ) ) }
10
13
end
14
+ # rubocop:disable RSpec/RepeatedExampleGroupBody
11
15
describe file ( '/tmp/export.pkcs12.p12' ) do
12
16
its ( :size ) { is_expected . to be > 0 }
13
17
end
18
+
19
+ describe file ( '/tmp/export2.pkcs12.p12' ) do
20
+ its ( :size ) { is_expected . to be > 0 }
21
+ end
22
+ # rubocop:enable RSpec/RepeatedExampleGroupBody
14
23
end
You can’t perform that action at this time.
0 commit comments