git://git.onelab.eu
/
myplc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
svn keywords
[myplc.git]
/
plc.d
/
ssl
diff --git
a/plc.d/ssl
b/plc.d/ssl
index
e7e3278
..
ddbfe81
100755
(executable)
--- a/
plc.d/ssl
+++ b/
plc.d/ssl
@@
-1,6
+1,4
@@
#!/bin/bash
#!/bin/bash
-# $Id$
-# $URL$
#
# priority: 300
#
#
# priority: 300
#
@@
-49,12
+47,12
@@
verify_or_generate_certificate() {
if [ -f $crt ] ; then
# Check if certificate is valid
if [ -f $crt ] ; then
# Check if certificate is valid
- verify=$(openssl verify -CAfile $ca $crt)
# Backup if invalid or if the subject has changed
# 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
[ "$(ssl_cname $crt)" != "$cname" ] ; then
backup_file $crt
backup_file $ca
+ backup_file $key
fi
fi
fi
fi