Skip to content
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
2 changes: 1 addition & 1 deletion hash-bash-ssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function canonicalizeDN() {

# Function to turn PEM into DER
function getDERfromPEM () { #Returns HEX encoded DER of first PEM Certificate in file
awk '/^-----BEGIN CERTIFICATE-----$/ {i=1} /^[A-Za-z0-9\/+=]+\r?$/ { if(i) print } /-----END CERTIFICATE-----/ {exit }' |tr -d '\r\n' |base64 -d |od -An -v -w0 -tx1 2>/dev/null |grep '^[0-9a-f ]*$' |tr -d "\n "
awk '/^-----BEGIN CERTIFICATE-----[\r|\n]*$/ {i=1} /^[A-Za-z0-9\/+=]+[\r|\n]*$/ { if(i) print } /-----END CERTIFICATE-----/ {exit }' |tr -d '\r\n' |base64 -d |od -An -v -w0 -tx1 2>/dev/null |grep '^[0-9a-f ]*$' |tr -d "\n "
}

declare -a PEMS
Expand Down