X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fssl;h=ddbfe8166640263ed201115ed3e1f1aa6673745a;hb=d11928bd11e6544d17dd5ec7172d9ead08449ee7;hp=8848349513bd8c5a01d774e624b04f118dd9c99b;hpb=ac4f4e2f4b7078e55a5997371ebd862326cea664;p=myplc.git diff --git a/plc.d/ssl b/plc.d/ssl index 8848349..ddbfe81 100755 --- a/plc.d/ssl +++ b/plc.d/ssl @@ -7,8 +7,6 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id$ -# # Source function library and configuration . /etc/plc.d/functions @@ -49,12 +47,12 @@ verify_or_generate_certificate() { if [ -f $crt ] ; then # Check if certificate is valid - verify=$(openssl verify -CAfile $ca $crt) # Backup if invalid or if the subject has changed - if grep -q "error" <<<$verify || \ + if openssl verify -CAfile $ca $crt | grep -q "error" || \ [ "$(ssl_cname $crt)" != "$cname" ] ; then backup_file $crt backup_file $ca + backup_file $key fi fi