-
Notifications
You must be signed in to change notification settings - Fork 157
imap-send: explicitly verify the peer certificate #1886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
It is a bug to obtain the peer certificate without verifying it. Having said that, from my reading of https://www.openssl.org/docs/man1.1.1/man3/SSL_set_verify.html, it would appear that Git is saved by the fact that it calls `SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER, NULL)` already early on. In other words, that `SSL_VERIFY_PEER` combined with the `NULL` parameter (i.e. no overridden callback) would _already_ verify the peer certificate. The fact that we later call `SSL_get_peer_certificate()` is mistaken by CodeQL to mean that that peer certificate still needs to be verified, but that had already happened at that point. Nevertheless, it is better to verify the peer certificate explicitly than to rely on some side effect that is really hard to reason about (and that took me more than one business day to analyze fully). It also makes it easier for static analyzers to validate the correctness of the code. Signed-off-by: Johannes Schindelin <[email protected]>
/submit |
Submitted as [email protected] To fetch this version into
To fetch this version to local tag
|
This patch series was integrated into seen via git@702f63f. |
This branch is now known as |
This patch series was integrated into seen via git@f397b7c. |
This patch series was integrated into next via git@69df4dd. |
This patch series was integrated into seen via git@54684bf. |
There was a status update in the "Cooking" section about the branch Will merge to 'master'. source: <[email protected]> |
This patch series was integrated into seen via git@7b420ef. |
This patch series was integrated into master via git@7b420ef. |
This patch series was integrated into next via git@7b420ef. |
Closed via 7b420ef. |
No description provided.