diff --git a/src/freedombone-addcert b/src/freedombone-addcert index 759252e5..7c230503 100755 --- a/src/freedombone-addcert +++ b/src/freedombone-addcert @@ -114,14 +114,14 @@ if ! which openssl > /dev/null ;then fi CERTFILE=$HOSTNAME -if [[ $EXTENSIONS != "" ]]; then +if [[ $ORGANISATION == "Freedombone-CA" ]]; then CERTFILE="ca-$HOSTNAME" fi openssl req -x509 $EXTENSIONS -nodes -days 3650 -sha256 \ -subj "/O=$ORGANISATION/OU=$UNIT/C=$COUNTRY_CODE/ST=$AREA/L=$LOCATION/CN=$HOSTNAME" \ -newkey rsa:4096 -keyout /etc/ssl/private/$CERTFILE.key \ - -out /etc/ssl/certs/$HOSTNAME.crt + -out /etc/ssl/certs/$CERTFILE.crt if [ ! $NODH ]; then openssl dhparam -check -text -5 1024 -out /etc/ssl/certs/$CERTFILE.dhparam fi