SSL_SET_VERIFY_RESULT(3SSL)

πŸ’– SSL_SET_VERIFY_RESULT πŸ’–

okay bestie, welcome to the OpenSSL girlies' corner of the manual β€” this one's from the 3SSL family, and it's a lil function called SSL_set_verify_result. she's short, she's sweet, and she's lowkey powerful in a chaotic way. let's get into it πŸŽ€


✨ NAME ✨

SSL_set_verify_result β€” override result of peer certificate verification

like, you just rewrite the vibe of whether the peer's cert checked out. no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <openssl/ssl.h>

void SSL_set_verify_result(SSL *ssl, long verify_result);

that's it. that's the whole signature. she takes an SSL *ssl and a long verify_result and gives you literally nothing back. icon behavior, honestly. πŸ’…


🌸 DESCRIPTION 🌸

okay so SSL_set_verify_result() sets verify_result of the object ssl to be the result of the verification of the X509 certificate presented by the peer, if any.

so like β€” you're telling the ssl object "hey babes, here's the tea on whether that cert passed." and if the peer didn't present one at all? "if any" β€” no cert, no problem, you still get to set the value. 🫢


πŸ’€ NOTES πŸ’€

okay this is the part where you need to pay attention, bestie, because this function is a little sneaky.

  • SSL_set_verify_result() overrides the verification result. it only changes the verification result of the ssl object.
  • it does NOT become part of the established session. so if the session is to be reused later, the original value will reappear. 😭 like not me setting a value and then the session just... forgetting it. the audacity.
  • the valid codes for verify_result are documented in openssl-verify(1).
⚠️ fr fr, that session-reuse thing is a real gotcha. you override it, you feel powerful, the session gets reused, and boom β€” original value is back like it never left. main character energy from the original value, honestly.

πŸŽ€ RETURN VALUES πŸŽ€

SSL_set_verify_result() does not provide a return value.

nope! nothing! she's void, she gives you zero feedback, she simply does the thing and walks away. ⭐


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, iykyk πŸ’œ


Copyright 2000-2016 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 gorgeous lil doc is from OpenSSL 4.0.3</>, dated 2026-09-29</>, and it lives under the manual name SSL_SET_VERIFY_RESULT(3SSL). slay, go forth, and set those verify results responsibly πŸ’–βœ¨πŸ“

πŸ“¦ where this page comes from