Skip to content

Commit

Permalink
Move private key to conditional else
Browse files Browse the repository at this point in the history
If there is a CAKey then use that, otherwise use a private key.
  • Loading branch information
James Allenby committed Oct 23, 2023
1 parent 4147c5e commit 724b510
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/puppet/provider/x509_cert/openssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ def create
'-days', resource[:days],
'-in', resource[:csr],
'-out', resource[:path],
'-extfile', resource[:template],
'-key', resource[:private_key]
'-extfile', resource[:template]
]
if resource[:ca]
options << ['-CAcreateserial']
options << ['-CA', resource[:ca]]
options << ['-CAkey', resource[:cakey]]
else
options << ['-key', resource[:private_key]]
end
else
options = [
Expand Down

0 comments on commit 724b510

Please sign in to comment.