SSL_CTX_GET_VERIFY_MODE(3ossl)
π SSL_CTX_GET_VERIFY_MODE π
okay bestie so this is an OpenSSL manual page (like, 3ossl section energy, iykyk) and it's literally just the β¨gettersβ¨ for your verification params. no cap, it's the chill half of the pair β the setters live over in SSL_CTX_set_verify(3). π
πΈ 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 β get currently set verification parameters π¦
like, they peek at what's already there. they do not change anything. main character observers only. π
β¨ 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 *);
yes the last two return a function pointer and yes the syntax is giving "who wrote this" but it's fine, it's iconic, we love her. π
π DESCRIPTION π
okay so, six little getters, all vibes, all read-only. here's the tea on each one:
SSL_CTX_get_verify_mode()β hands you back the verification mode that's currently set inctx. that's it, that's the whole job. π«ΆSSL_get_verify_mode()β same thing but forssl. the verification mode currently set inssl, served fresh. πSSL_CTX_get_verify_depth()β returns the verification depth limit currently set inctx. and here's the important bit bestie: if no limit has been explicitly set, you get-1back and the default value will be used. so-1isn't a real depth, it's a "girl idk, default" signal. πSSL_get_verify_depth()β thessltwin. returns the verification depth limit currently set inssl, and again: 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, you get theNULLpointer and the default callback will be used. soNULL= "not me, the default one is handling it". πSSL_get_verify_callback()β you already know. returns a function pointer to the verification callback currently set inssl, and if no callback was explicitly set,NULLis returned and the default callback will be used. π
so like, tl;dr: modes and depths come back as int, callbacks come back as a function pointer, and the "nothing was set" states are -1 for depth and NULL for the callback. the defaults swoop in to save the day in both cases. π§
π₯ RETURN VALUES π₯
See DESCRIPTION. literally. that's the whole section. go back up, bestie, it's all up there. π
π¦ SEE ALSO π¦
π 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>.
and that's the page!! π version 3.5.9, dated 2026-09-29, straight out of the OpenSSL universe β go set some verify params and then come back here to read them, slay, periodt. πβ¨π
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms