SSL_CTX_GET_VERIFY_MODE(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… SSL_CTX_GET_VERIFY_MODE (3ossl) β€” the OpenSSL glow-up

okay so bestie, this is a page from the OpenSSL manual, section 3ossl, and it's literally just about peeking at your verification settings. not setting them β€” getting them. we're nosy, we're reading the vibes, we're not touching anything. πŸŽ€


✨ NAME ✨

SSL_CTX_get_verify_mode, SSL_get_verify_mode, SSL_CTX_get_verify_depth, SSL_get_verify_depth, SSL_get_verify_callback, SSL_CTX_get_verify_callback β€” these are the six little functions that hand you back whatever verification parameters are currently set. it's giving "read the room" but for TLS. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <openssl/ssl.h>

int SSL_CTX_get_verify_mode(const SSL_CTX *ctx);
int SSL_get_verify_mode(const SSL *ssl);
int SSL_CTX_get_verify_depth(const SSL_CTX *ctx);
int SSL_get_verify_depth(const SSL *ssl);
int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int, X509_STORE_CTX *);
int (*SSL_get_verify_callback(const SSL *ssl))(int, X509_STORE_CTX *);

like yes, those last two are function pointers returning function pointers, and no, they're not trying to be mysterious β€” that's just how the callback signature rolls. 🫢


🌸 DESCRIPTION 🌸

so here's the tea, function by function:

  • SSL_CTX_get_verify_mode() β€” returns the verification mode currently set in ctx. the whole context's mode. just hands it over, no judgment. ✨
  • SSL_get_verify_mode() β€” returns the verification mode currently set in ssl. same energy, but per-connection. πŸ’–
  • SSL_CTX_get_verify_depth() β€” returns the verification depth limit currently set in ctx. but β€” big but β€” if no limit has been explicitly set, it returns -1, and the default value will be used. it's not saying "depth unlimited," it's saying "girl, nobody set this, go look at the default." 😭
  • SSL_get_verify_depth() β€” returns the verification depth limit currently set in ssl. and same deal: if no limit has been explicitly set, -1 comes back and the default value will be used. πŸ™ˆ
  • SSL_CTX_get_verify_callback() β€” returns a function pointer to the verification callback currently set in ctx. if no callback was explicitly set, the NULL pointer is returned and the default callback will be used. so like, NULL here isn't broken, it's just "default behavior, bestie." 🧚
  • SSL_get_verify_callback() β€” returns a function pointer to the verification callback currently set in ssl. again, if no callback was explicitly set, the NULL pointer is returned and the default callback will be used. consistent queen. πŸ’…
lowkey the recurring theme of this whole page: -1 and NULL don't mean "error," they mean "not explicitly set, default vibes in effect." don't panic. πŸ“

πŸ’œ RETURN VALUES πŸ’œ

see DESCRIPTION. that's it. that's the whole section. short and iconic. 🌈


πŸ‘‘ SEE ALSO πŸ‘‘

iykyk β€” go read the setter if you actually wanna change things. this page is read-only main character energy. πŸ¦‹


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>.


okay that's the whole page, no notes. this was OpenSSL 3.5.0, dated 2026-09-25 β€” mwah, slay, periodt. πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from