diff --git a/ssl_mgmt/ssl_mgmt b/ssl_mgmt/ssl_mgmt index abbee11..5b3ce87 100755 --- a/ssl_mgmt/ssl_mgmt +++ b/ssl_mgmt/ssl_mgmt @@ -299,8 +299,6 @@ generate_cert () openssl ca -batch -config $opensslCnfFile -cert $CACertPath \ -keyfile $CAKeyPath -passin file:$rootCAPwdPath \ -out $certSubdir/$certFile -infiles $csrSubdir/$reqFile - getfacl "$certPath" | setfacl --set-file=- $certSubdir/$certFile - chown --reference="$certPath" $certSubdir/$certFile # Safety check if ! openssl x509 -noout -text -in $certSubdir/$certFile >/dev/null 2>&1 || @@ -327,6 +325,8 @@ generate_cert () fi # Notify and install the new certificate + getfacl "$certPath" | setfacl --set-file=- $certSubdir/$certFile + chown --reference="$certPath" $certSubdir/$certFile if [ -z "$no_overwrite" ] then if [ ! -f "$certDestDir/$certFile" ]