|
| 1 | +openssl::certificate::x509 { 'export_pem_from_pkcs12.example.com': |
| 2 | + ensure => present, |
| 3 | + country => 'CH', |
| 4 | + organization => 'Example.com', |
| 5 | + commonname => 'export_pem_from_pkcs12.example.com', |
| 6 | + base_dir => '/tmp', |
| 7 | + owner => 'nobody', |
| 8 | + # This is just to speed up CI - use 2048 or more in production |
| 9 | + key_size => 1024, |
| 10 | +} |
| 11 | +-> openssl::export::pkcs12 { 'export1_pem_from_pkcs12.pkcs12': |
| 12 | + ensure => 'present', |
| 13 | + basedir => '/tmp', |
| 14 | + pkey => '/tmp/export_pem_from_pkcs12.example.com.key', |
| 15 | + cert => '/tmp/export_pem_from_pkcs12.example.com.crt', |
| 16 | + out_pass => 'mahje1Qu', |
| 17 | +} |
| 18 | +-> openssl::export::pkcs12 { 'export2_pem_from_pkcs12.pkcs12': |
| 19 | + ensure => 'present', |
| 20 | + basedir => '/tmp', |
| 21 | + pkey => '/tmp/export_pem_from_pkcs12.example.com.key', |
| 22 | + cert => '/tmp/export_pem_from_pkcs12.example.com.crt', |
| 23 | +} |
| 24 | +# import pkcs12 without pass, generate pem with pass |
| 25 | +-> openssl::export::pem_key { '/tmp/export1_pem_from_pkcs12.pem': |
| 26 | + pfx_cert => '/tmp/export2_pem_from_pkcs12.pkcs12.p12', |
| 27 | + out_pass => 'mahje1Qu', |
| 28 | +} |
| 29 | +# import pkcs12 with pass, generate pem with pass |
| 30 | +-> openssl::export::pem_key { '/tmp/export2_pem_from_pkcs12.pem': |
| 31 | + pfx_cert => '/tmp/export1_pem_from_pkcs12.pkcs12.p12', |
| 32 | + in_pass => 'mahje1Qu', |
| 33 | + out_pass => 'mahje1Qu', |
| 34 | +} |
| 35 | +# import pkcs12 with pass, generate pem without pass |
| 36 | +-> openssl::export::pem_key { '/tmp/export3_pem_from_pkcs12.pem': |
| 37 | + pfx_cert => '/tmp/export1_pem_from_pkcs12.pkcs12.p12', |
| 38 | + in_pass => 'mahje1Qu', |
| 39 | +} |
| 40 | +# import pkcs12 without pass, generate pem without pass |
| 41 | +-> openssl::export::pem_key { '/tmp/export4_pem_from_pkcs12.pem': |
| 42 | + pfx_cert => '/tmp/export2_pem_from_pkcs12.pkcs12.p12', |
| 43 | +} |
0 commit comments