git://git.onelab.eu
/
myplc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ee56e30
)
- If the CA certificate does not exist, assume that the certificate is self-signed.
author
Mark Huang
<mlhuang@cs.princeton.edu>
Mon, 17 Jul 2006 21:28:55 +0000
(21:28 +0000)
committer
Mark Huang
<mlhuang@cs.princeton.edu>
Mon, 17 Jul 2006 21:28:55 +0000
(21:28 +0000)
plc.d/ssl
patch
|
blob
|
history
diff --git
a/plc.d/ssl
b/plc.d/ssl
index
a4afb7f
..
ec879dc
100755
(executable)
--- a/
plc.d/ssl
+++ b/
plc.d/ssl
@@
-7,7
+7,7
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: ssl,v 1.
7 2006/06/28 21:34:18
mlhuang Exp $
+# $Id: ssl,v 1.
8 2006/07/10 21:05:17
mlhuang Exp $
#
# Source function library and configuration
#
# Source function library and configuration
@@
-40,6
+40,12
@@
verify_or_generate_certificate() {
cname=$4
email=$5
cname=$4
email=$5
+ # If the CA certificate does not exist, assume that the
+ # certificate is self-signed.
+ if [ ! -f $ca ] ; then
+ cp -a $crt $ca
+ fi
+
if [ -f $crt ] ; then
# Check if certificate is valid
verify=$(openssl verify -CAfile $ca $crt)
if [ -f $crt ] ; then
# Check if certificate is valid
verify=$(openssl verify -CAfile $ca $crt)
@@
-68,10
+74,8
@@
verify_or_generate_certificate() {
-nodes -keyout $key -out $crt
check
chmod 644 $crt
-nodes -keyout $key -out $crt
check
chmod 644 $crt
- fi
- if [ ! -f $ca ] ; then
- # The certificate it self-signed, so it is its own CA
+ # The certificate it self-signed, so it is its own CA
cp -a $crt $ca
fi
}
cp -a $crt $ca
fi
}