Re: [PATCH v2 2/2] imap-send: let OpenSSL do the hostname verification
- From
- Aniket Gupta <aniketgupta3001@gmail.com>
- Date
- Oct 12, 2026, 22:00 UTC
- Message-ID
- <20261012220039.136932-1-aniketgupta3001@gmail.com>
- In-Reply-To
- <20261012203057.969878-2-dev+git@drbeat.li>
Hello Beat,
> + long res = SSL_get_verify_result(sock->ssl);
> + if (res != X509_V_OK)
> + return error("unable to verify peer certificate: %s",I don't think this can be reached. With SSL_VERIFY_PEER, SSL_connect() already fails, so a hostname mismatch would only print "certificate verify failed". It does not name the host like the old code did. Could we print the verify result when SSL_connect() fails?
Thanks, Aniket