git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs-pki: Unique subject DNs for certificate requests.
[sliver-openvswitch.git]
/
utilities
/
ovs-pki.in
diff --git
a/utilities/ovs-pki.in
b/utilities/ovs-pki.in
index
bf40c29
..
1f15410
100755
(executable)
--- a/
utilities/ovs-pki.in
+++ b/
utilities/ovs-pki.in
@@
-429,6
+429,8
@@
make_request() {
must_not_exist "$arg1-privkey.pem"
must_not_exist "$arg1-req.pem"
make_tmpdir
must_not_exist "$arg1-privkey.pem"
must_not_exist "$arg1-req.pem"
make_tmpdir
+ # Use uuidgen or date to create unique subject DNs.
+ unique=`(uuidgen) 2>/dev/null` || unique=`date +"%Y %b %d %T"`
cat > "$TMP/req.cnf" <<EOF
[ req ]
prompt = no
cat > "$TMP/req.cnf" <<EOF
[ req ]
prompt = no
@@
-440,7
+442,7
@@
ST = CA
L = Palo Alto
O = Open vSwitch
OU = Open vSwitch certifier
L = Palo Alto
O = Open vSwitch
OU = Open vSwitch certifier
-CN =
Open vSwitch certificate for $arg1
+CN =
$arg1 id:$unique
EOF
if test $keytype = rsa; then
(umask 077 && openssl genrsa -out "$1-privkey.pem" $bits) 1>&3 2>&3 \
EOF
if test $keytype = rsa; then
(umask 077 && openssl genrsa -out "$1-privkey.pem" $bits) 1>&3 2>&3 \