diff --git a/ssl_mgmt/ssl_mgmt b/ssl_mgmt/ssl_mgmt index 9f60ea3..a7da7e8 100755 --- a/ssl_mgmt/ssl_mgmt +++ b/ssl_mgmt/ssl_mgmt @@ -146,6 +146,15 @@ set_variables () opensslCnfFile=openssl.cnf rootCAPwdPath=${rootCAPwdPath:-/root/passwords/root_ca} managedCerts=${managedCerts:-$(xargs &2 echo "there might be a problem" >&2 fi + fingerprint="$(openssl x509 -in "$certPath" -noout -fingerprint)" + fingerprint=${fingerprint#*=} + if [ -n "$notifiedUsers" ] + then + eval notifySubject="\"$notifySubject\"" + eval notifyTemplate="\"$notifyTemplate\"" + mail -s "$notifySubject" $notifiedUsers < $keyDestDir/$keycertFile diff --git a/ssl_mgmt/tests/ssl_mgmt.conf b/ssl_mgmt/tests/ssl_mgmt.conf index c57ec9d..3df0c30 100644 --- a/ssl_mgmt/tests/ssl_mgmt.conf +++ b/ssl_mgmt/tests/ssl_mgmt.conf @@ -9,3 +9,4 @@ keyDestDir=$destDir/private opensslCnfFile=openssl.cnf rootCAPwdPath=$workDir/root_ca managedCerts=$workDir/managed_certs +notifiedUsers=robotux