Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Certificate Issuer with a comma" bug fixes #100 #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions ssl-cert-check
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,8 @@ check_file_status() {

# Extract the issuer from the certificate
CERTISSUER=$("${OPENSSL}" x509 -in "${CERT_TMP}" -issuer -noout | \
"${AWK}" 'BEGIN {RS=", " } $0 ~ /^O =/
{ print substr($0,5,17)}')
"${SED}" -nE 's/^.*, O = "([^"]*)".*/\1/p;
s/^.*, O = ([^,]*).*/\1/p')

### Grab the common name (CN) from the X.509 certificate
COMMONNAME=$("${OPENSSL}" x509 -in "${CERT_TMP}" -subject -noout | \
Expand All @@ -754,7 +754,8 @@ check_file_status() {

# Extract the issuer from the certificate
CERTISSUER=$("${OPENSSL}" x509 -in "${CERTFILE}" -issuer -noout -inform "${CERTTYPE}" | \
"${AWK}" 'BEGIN {RS=", " } $0 ~ /^O =/ { print substr($0,5,17)}')
"${SED}" -nE 's/^.*, O = "([^"]*)".*/\1/p;
s/^.*, O = ([^,]*).*/\1/p')

### Grab the common name (CN) from the X.509 certificate
COMMONNAME=$("${OPENSSL}" x509 -in "${CERTFILE}" -subject -noout -inform "${CERTTYPE}" | \
Expand Down