Skip to content

Commit

Permalink
removes " from issuer name to not confuse the JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
gurubert committed Oct 1, 2024
1 parent 60375e9 commit 797bd71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sslcertificates/agents/plugins/sslcertificates
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ get_cert_info() {
cert_enddate_epoch=$(date --date "$cert_enddate" '+%s')
cert_algosign=$($OPENSSL x509 -inform $inform -noout -text -in "$certfile" | awk '/Signature Algorithm: / { print $3; exit;}' )
cert_issuer_hash=$($OPENSSL x509 -inform $inform -noout -issuer_hash -in "$certfile" )
cert_issuer=$($OPENSSL x509 -inform $inform -noout -issuer -in "$certfile" | sed -e 's/ = /=/g' -e 's/, /,/g' -e 's/issuer=//')
cert_issuer=$($OPENSSL x509 -inform $inform -noout -issuer -in "$certfile" | sed -e 's/ = /=/g' -e 's/, /,/g' -e 's/issuer=//' -e 's/"//g')

echo "{\"file\": \"$certfile\", \"starts\": $cert_startdate_epoch, \"expires\": $cert_enddate_epoch, \"algosign\": \"$cert_algosign\", \"issuer_hash\": \"$cert_issuer_hash\", \"issuer\": \"$cert_issuer\", \"subj\": \"$cert_subject\"}"
fi
Expand Down

0 comments on commit 797bd71

Please sign in to comment.