SSL_CTX_GET_VERIFY_MODE(3ossl)
π 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 inctx. the whole context's mode. just hands it over, no judgment. β¨SSL_get_verify_mode()β returns the verification mode currently set inssl. same energy, but per-connection. πSSL_CTX_get_verify_depth()β returns the verification depth limit currently set inctx. 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 inssl. and same deal: if no limit has been explicitly set,-1comes back and the default value will be used. πSSL_CTX_get_verify_callback()β returns a function pointer to the verification callback currently set inctx. if no callback was explicitly set, theNULLpointer is returned and the default callback will be used. so like,NULLhere isn't broken, it's just "default behavior, bestie." π§SSL_get_verify_callback()β returns a function pointer to the verification callback currently set inssl. again, if no callback was explicitly set, theNULLpointer is returned and the default callback will be used. consistent queen. π
lowkey the recurring theme of this whole page:-1andNULLdon'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 π
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
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms