mirror of
https://github.com/drwetter/testssl.sh.git
synced 2026-04-21 10:23:31 +02:00
Fix DN conversion when reading certificate issuer
This fixes #3003 . The conversion to proper UTF-8 should have taken place by just using `-nameopt RFC2253`, see manpage openssl-namedisplay-options(1ssl). As @dcooper16 suggested removing esc_msb should help. This may look counterintuitive but works.
This commit is contained in:
@@ -22888,7 +22888,7 @@ print_dn() {
|
|||||||
fi
|
fi
|
||||||
# Use the LDAP String Representation of Distinguished Names (RFC 2253),
|
# Use the LDAP String Representation of Distinguished Names (RFC 2253),
|
||||||
# The current specification is in RFC 4514.
|
# The current specification is in RFC 4514.
|
||||||
name="$(hex2binary "$cert" | $OPENSSL x509 -issuer -noout -inform DER -nameopt RFC2253 2>/dev/null)"
|
name="$(hex2binary "$cert" | $OPENSSL x509 -issuer -noout -inform DER -nameopt RFC2253,-esc_msb 2>/dev/null)"
|
||||||
name="${name#issuer=}"
|
name="${name#issuer=}"
|
||||||
tm_out "$(strip_leading_space "$name")"
|
tm_out "$(strip_leading_space "$name")"
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user