Skip to content

Commit

Permalink
No effective code change. Fixing comments and variable name as nedeed…
Browse files Browse the repository at this point in the history
… due to my missunderstanding.
  • Loading branch information
bruncsak committed Mar 13, 2020
1 parent 0f27ce7 commit 3d46cf6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions letsencrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ IPV_OPTION=
CHALLENGE_TYPE="http-01"

# the date of the that version
VERSION_DATE="2020-03-12"
VERSION_DATE="2020-03-13"

# The meaningful User-Agent to help finding related log entries in the boulder server log
USER_AGENT="bruncsak/ght-acme.sh $VERSION_DATE"
Expand Down Expand Up @@ -820,12 +820,12 @@ csr_extract_domains() {
log "extract domains from certificate signing request"

if echo "$CADIR" | egrep -i -s -q -e '\.buypass\.(com|no)/' -e '\.letsencrypt\.org/' ;then
# Known RFC8555 compatibly ACME servers
RFC8555DIVERGENCE=no
# Known ACME servers supporting commonName in the Subject of the CSR
Subject_commonName_support=yes
else
# ACME server(s) do not supporting commonName in the Subject of the CSR
# Typically pebble's case, see https://github.com/letsencrypt/pebble/issues/304
# There will be no fix for this in the pebble's implementation so it is better to put a workaround here
RFC8555DIVERGENCE=yes
Subject_commonName_support=no
fi

openssl req -in "$TMP_SERVER_CSR" -noout -text \
Expand All @@ -836,7 +836,7 @@ csr_extract_domains() {
ALTDOMAINS="`sed -n '/X509v3 Subject Alternative Name:/ { n; s/^[ ]*DNS[ ]*:[ ]*//; s/[ ]*,[ ]*DNS[ ]*:[ ]*/ /g; p; q; }' "$OPENSSL_OUT"`"
SUBJDOMAIN="`sed -n '/Subject:/ {s/^.*CN=//; s/,*[ ]*$//; p}' "$OPENSSL_OUT"`"

if [ "$RFC8555DIVERGENCE" = no ] ;then
if [ "$Subject_commonName_support" = yes ] ;then
DOMAINS="$SUBJDOMAIN $ALTDOMAINS"
else
DOMAINS="$ALTDOMAINS"
Expand Down

0 comments on commit 3d46cf6

Please sign in to comment.