Commit 1ad65f7d authored by neil's avatar neil
Browse files

fix compatible to pfsense. use "-config" for single domain to override the...

fix compatible to pfsense.  use "-config" for single domain to override the default openssl config file.
parent 64258350
...@@ -175,7 +175,8 @@ createCSR() { ...@@ -175,7 +175,8 @@ createCSR() {
if [ -z "$domainlist" ] ; then if [ -z "$domainlist" ] ; then
#single domain #single domain
_info "Single domain" $domain _info "Single domain" $domain
openssl req -new -sha256 -key "$CERT_KEY_PATH" -subj "/CN=$domain" > "$CSR_PATH" printf "[ req_distinguished_name ]\n[ req ]\ndistinguished_name = req_distinguished_name\n" > "$DOMAIN_SSL_CONF"
openssl req -new -sha256 -key "$CERT_KEY_PATH" -subj "/CN=$domain" -config "$DOMAIN_SSL_CONF" -out "$CSR_PATH"
else else
alt="DNS:$(echo $domainlist | sed "s/,/,DNS:/g")" alt="DNS:$(echo $domainlist | sed "s/,/,DNS:/g")"
#multi #multi
...@@ -396,11 +397,11 @@ _initpath() { ...@@ -396,11 +397,11 @@ _initpath() {
DOMAIN_PATH="$domainhome" DOMAIN_PATH="$domainhome"
fi fi
if [ -z "$DOMAIN_CONF" ] ; then if [ -z "$DOMAIN_CONF" ] ; then
DOMAIN_CONF="$domainhome/$Le_Domain.conf" DOMAIN_CONF="$domainhome/$domain.conf"
fi fi
if [ -z "$DOMAIN_SSL_CONF" ] ; then if [ -z "$DOMAIN_SSL_CONF" ] ; then
DOMAIN_SSL_CONF="$domainhome/$Le_Domain.ssl.conf" DOMAIN_SSL_CONF="$domainhome/$domain.ssl.conf"
fi fi
if [ -z "$CSR_PATH" ] ; then if [ -z "$CSR_PATH" ] ; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment