Code Review
/
nonrtric
/
plt
/
ranpm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Make it easier to build doc & subsites
[nonrtric/plt/ranpm.git]
/
install
/
helm
/
ran
/
certs
/
gen-certs.sh
diff --git
a/install/helm/ran/certs/gen-certs.sh
b/install/helm/ran/certs/gen-certs.sh
index
ec58eee
..
705b1f3
100755
(executable)
--- a/
install/helm/ran/certs/gen-certs.sh
+++ b/
install/helm/ran/certs/gen-certs.sh
@@
-49,15
+49,8
@@
openssl genrsa 2048 > ca.key 2> /dev/null
check_error $?
echo " Generating ca cert"
check_error $?
echo " Generating ca cert"
-cat <<__EOF__ | openssl req -new -x509 -nodes -days 365000 -key ca.key -out httpsca.crt 2> /dev/null
-SE
-.
-.
-EST
-EST
-$SRV
-.
-__EOF__
+openssl req -new -x509 -nodes -days 365000 -key ca.key -subj "/C=SE/ST=./L=./O=EST/OU=EST/CN=$SRV/emailAddress=a@example.com" -out httpsca.crt 2> /dev/null
+
check_error $?
check_error $?
@@
-65,16
+58,8
@@
for (( i=0; i<${1}; i++ )); do
SRV="pm-https-server-$i.pm-https-server.ran"
echo " Generating cert and key for server $SRV"
SRV="pm-https-server-$i.pm-https-server.ran"
echo " Generating cert and key for server $SRV"
-cat <<__EOF__ | openssl req -newkey rsa:2048 -nodes -days 365000 -keyout https-$i.key -out https-req$i.crt 2> /dev/null
-SE
-.
-.
-ERIC
-ERIC
-$SRV
-.
-
-__EOF__
+ openssl req -newkey rsa:2048 -nodes -days 365000 -subj "/C=SE/ST=./L=./O=ERIC/OU=ERIC/CN=$SRV/emailAddress=a@example.com" -keyout https-$i.key -out https-req$i.crt 2> /dev/null
+
check_error $?
openssl x509 -req -days 365000 -set_serial 01 -in https-req$i.crt -out https-$i.crt -CA httpsca.crt -CAkey ca.key
check_error $?
openssl x509 -req -days 365000 -set_serial 01 -in https-req$i.crt -out https-$i.crt -CA httpsca.crt -CAkey ca.key
@@
-86,4
+71,5
@@
__EOF__
done
echo "DONE"
done
echo "DONE"
-exit 0
\ No newline at end of file
+exit 0
+