Skip to content

Commit

Permalink
set umask on generated pkcs12 file so the mode ends up as '0600'
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Hoblitt committed Jan 15, 2014
1 parent c208f6e commit 639d62e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions manifests/add_cert_and_key.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@
$pkcs12_name = downcase(regsubst("${nickname}.p12", '[\s]', '_', 'GM'))

exec {"generate_pkcs12_${title}":
umask => '7077',
command => "/usr/bin/openssl pkcs12 -export -in ${cert} -inkey ${key} -password 'file:${certdir}/password.conf' -out '${certdir}/${pkcs12_name}' -name '${nickname}'",
creates => "${certdir}/${pkcs12_name}",
subscribe => File["${certdir}/password.conf"],
require => [
Nssdb::Create[$certdir],
Class['nssdb'],
],
creates => "${certdir}/${pkcs12_name}",
subscribe => File["${certdir}/password.conf"],
}

exec { "add_pkcs12_${title}":
Expand Down

0 comments on commit 639d62e

Please sign in to comment.