sslsniff
sslsniff copied to clipboard
Parse CN from DN using OpenSSL facilities
Use OpenSSL facilities to parse the CN from the DN. This allows to correctly parse certificates which have additional DN components after the CN, such as "emailAddress". The manual parsing included additional components following the CN as part of the common name, which in turn lead to DNS lookups for malformed domain names such as "www.example.com/[email protected]".
Fixes issue #12 reported by ju916
In my view, the behavior of openssl req
(LibreSSL 2.8.3) which appends email
to the CN
is a bug, as it leads browsers like Chrome to report "Your connection is not private" and NET::ERR_CERT_COMMON_NAME_INVALID
.