Skip to content

Commit b573a4f

Browse files
committed
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.
1 parent d2d684e commit b573a4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

testssl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22888,7 +22888,7 @@ print_dn() {
2288822888
fi
2288922889
# Use the LDAP String Representation of Distinguished Names (RFC 2253),
2289022890
# The current specification is in RFC 4514.
22891-
name="$(hex2binary "$cert" | $OPENSSL x509 -issuer -noout -inform DER -nameopt RFC2253 2>/dev/null)"
22891+
name="$(hex2binary "$cert" | $OPENSSL x509 -issuer -noout -inform DER -nameopt RFC2253,-esc_msb 2>/dev/null)"
2289222892
name="${name#issuer=}"
2289322893
tm_out "$(strip_leading_space "$name")"
2289422894
return 0

0 commit comments

Comments
 (0)