Skip to content

Commit 1a00cd9

Browse files
committed
Fix DN conversion when reading certificate issuer (3.2)
This fixes #3003 for 3.2 . 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 e0d0076 commit 1a00cd9

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
@@ -22416,7 +22416,7 @@ print_dn() {
2241622416
fi
2241722417
# Use the LDAP String Representation of Distinguished Names (RFC 2253),
2241822418
# The current specification is in RFC 4514.
22419-
name="$(hex2binary "$cert" | $OPENSSL x509 -issuer -noout -inform DER -nameopt RFC2253 2>/dev/null)"
22419+
name="$(hex2binary "$cert" | $OPENSSL x509 -issuer -noout -inform DER -nameopt RFC2253,-esc_msb 2>/dev/null)"
2242022420
name="${name#issuer=}"
2242122421
tm_out "$(strip_leading_space "$name")"
2242222422
return 0

0 commit comments

Comments
 (0)