X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fssl;h=ddbfe8166640263ed201115ed3e1f1aa6673745a;hb=21b4f7a59f68f5eb6acbc66f3a1fdc55675e405c;hp=ab64a809bc03e820b45b41613fdcdbda686bf591;hpb=bd8c23219c9588299282630591eb620b1de59319;p=myplc.git diff --git a/plc.d/ssl b/plc.d/ssl index ab64a80..ddbfe81 100755 --- a/plc.d/ssl +++ b/plc.d/ssl @@ -1,6 +1,4 @@ #!/bin/bash -# $Id$ -# $URL$ # # priority: 300 # @@ -49,9 +47,8 @@ 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