Browse Source

Misnamed cert

Bob Mottram 9 years ago
parent
commit
1fa089709e
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      src/freedombone-addcert

+ 2
- 2
src/freedombone-addcert View File

@@ -114,14 +114,14 @@ if ! which openssl > /dev/null ;then
114 114
 fi
115 115
 
116 116
 CERTFILE=$HOSTNAME
117
-if [[ $EXTENSIONS != "" ]]; then
117
+if [[ $ORGANISATION == "Freedombone-CA" ]]; then
118 118
 	CERTFILE="ca-$HOSTNAME"
119 119
 fi
120 120
 
121 121
 openssl req -x509 $EXTENSIONS -nodes -days 3650 -sha256 \
122 122
 		-subj "/O=$ORGANISATION/OU=$UNIT/C=$COUNTRY_CODE/ST=$AREA/L=$LOCATION/CN=$HOSTNAME" \
123 123
 		-newkey rsa:4096 -keyout /etc/ssl/private/$CERTFILE.key \
124
-		-out /etc/ssl/certs/$HOSTNAME.crt
124
+		-out /etc/ssl/certs/$CERTFILE.crt
125 125
 if [ ! $NODH ]; then
126 126
     openssl dhparam -check -text -5 1024 -out /etc/ssl/certs/$CERTFILE.dhparam
127 127
 fi