Skip to content

Commit

Permalink
use private key when creating x509 cert
Browse files Browse the repository at this point in the history
  • Loading branch information
James Allenby authored and James Allenby committed Oct 23, 2023
1 parent 1b41c6e commit 4147c5e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion lib/puppet/provider/x509_cert/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ def create
'-days', resource[:days],
'-in', resource[:csr],
'-out', resource[:path],
'-extfile', resource[:template]
'-extfile', resource[:template],
'-key', resource[:private_key]
]
if resource[:ca]
options << ['-CAcreateserial']
Expand Down
19 changes: 10 additions & 9 deletions manifests/certificate/x509.pp
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,16 @@
encrypted => $encrypted,
}
~> x509_cert { $_crt:
ensure => $ensure,
template => $_cnf,
csr => $_csr,
days => $days,
password => $password,
req_ext => $req_ext,
force => $force,
ca => $ca,
cakey => $cakey,
ensure => $ensure,
template => $_cnf,
csr => $_csr,
private_key => $_key,
days => $days,
password => $password,
req_ext => $req_ext,
force => $force,
ca => $ca,
cakey => $cakey,
}

# Set owner of all files
Expand Down

0 comments on commit 4147c5e

Please sign in to comment.