-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add acceptance test for PKCS#12 generation
- Loading branch information
1 parent
c8b1a2a
commit bf0f8b8
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
include openssl | ||
openssl::certificate::x509 { 'foo.example.com': | ||
ensure => present, | ||
country => 'CH', | ||
organization => 'Example.com', | ||
commonname => 'foo.example.com', | ||
base_dir => '/tmp', | ||
owner => 'nobody', | ||
password => 'mahje1Qu', | ||
# This is just to speed up CI - use 2048 or more in production | ||
key_size => 1024, | ||
} | ||
openssl::export::pkcs12 { 'export.pkcs12': | ||
ensure => 'present', | ||
basedir => '/tmp', | ||
pkey => '/tmp/foo.example.com.key', | ||
cert => '/tmp/foo.example.com.key', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'spec_helper_acceptance' | ||
|
||
describe 'pkcs12 example' do | ||
it_behaves_like 'the example', 'export_pkcs12_from_key.pp' do | ||
it { expect(file('/tmp/foo.example.com.crt')).to be_file } | ||
it { expect(file('/tmp/foo.example.com.key')).to be_file } | ||
end | ||
end |