SSL_GET_VERIFY_RESULT(3ossl)
β¨ SSL_GET_VERIFY_RESULT β¨
okay so bestie, this is SSL_GET_VERIFY_RESULT(3ossl) β the OpenSSL page about checking whether the peer's certificate actually passed the vibe check ππ
π SYNOPSIS π
#include <openssl/ssl.h>
long SSL_get_verify_result(const SSL *ssl);
πΈ DESCRIPTION πΈ
SSL_get_verify_result() returns the result of the verification of the X509 certificate presented by the peer, if any. and like, ssl MUST NOT be NULL. no cap, that's non-negotiable π«Ά
π NOTES π
okay so here's the tea β β SSL_get_verify_result() can only return one error code, but certificate verification can fail because of many reasons at the same time. so only the last verification error that occurred during the processing is available from SSL_get_verify_result(). it's giving "you only get the last text in the group chat" energy honestly π
sometimes there can be a sequence of errors leading to the verification failure as reported by SSL_get_verify_result(). to get the errors, it is necessary to setup a verify callback via SSL_CTX_set_verify(3) or SSL_set_verify(3) and retrieve the errors from the error stack there, because once SSL_connect(3) returns, these errors may no longer be available. like, they're gone, bestie, ghosted you π»
the verification result is part of the established session and is restored when a session is reused. iconic behavior honestly β¨
π BUGS π
if no peer certificate was presented, the returned result code is X509_V_OK. this is because no verification error occurred β but it does however not indicate success. so don't get it twisted π SSL_get_verify_result() is only useful in connection with SSL_get_peer_certificate(3). periodt.
π¦ RETURN VALUES π¦
the following return values can currently occur:
X509_V_OKβ the verification succeeded or no peer certificate was presented.- Any other value β documented in
openssl-verify(1). go read that one next bestie, iykyk π
π SEE ALSO π
ssl(7), SSL_set_verify_result(3), SSL_get_peer_certificate(3), openssl-verify(1)
π COPYRIGHT π
Copyright 2000-2023 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
and that's the whole page, bestie ππ this was 3.5.6 dated 2026-04-07, brought to you by the OpenSSL girlies β slay, stay verified, and remember: X509_V_OK doesn't always mean what you think it means π
β¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms