SSL_CTX_GET_VERIFY_MODE(3SSL)
π SSL_CTX_GET_VERIFY_MODE(3SSL) β the OpenSSL manual, but make it make sense π
okay so bestie, you're in the OpenSSL docs and this one is literally just the "hey what's my verification setup rn" page. no setters here, only getters. we're reading, not writing. periodt. β¨
πΈ 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 β grab the verification parameters that are currently set. that's it, that's the whole gig. π
β¨ 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 *);
look at those function-pointer return types, they're giving unhinged-but-correct and honestly? iconic. π
π¦ DESCRIPTION π¦
six functions, three vibes, one mission: tell you what's already configured. let's go one by one, bestie.
SSL_CTX_get_verify_mode()β hands you back the verification mode that's currently set inctx. that's the mode living on the whole context, affecting everybody under it.SSL_get_verify_mode()β same energy, different scope: gives you the verification mode currently set inssl. this one's per-connection.SSL_CTX_get_verify_depth()β returns the verification depth limit currently set inctx. BUT if nobody ever explicitly set a limit, it comes back as-1and the default value gets used instead. so-1is not a real depth, it's the "no thoughts, use the default" signal. π«ΆSSL_get_verify_depth()β returns the verification depth limit currently set inssl. and yeah, same deal: if no limit has been explicitly set,-1is returned and the default value will be used.SSL_CTX_get_verify_callback()β gives you a function pointer to the verification callback currently set inctx. if no callback was explicitly set, you get theNULLpointer back and the default callback will be used. so don't panic when you seeNULL, it's just the default doing its thing. π§SSL_get_verify_callback()β returns a function pointer to the verification callback currently set inssl. and yep, if no callback was explicitly set, theNULLpointer is returned and the default callback will be used. consistency, we love her.
ngl the theme here is: everything unset reports-1orNULL, and the library quietly falls back to its defaults. no drama, just defaults. π
β RETURN VALUES β
See DESCRIPTION. that's the whole section, she's short but she knows it. π
π SEE ALSO π
(the setters live over there, this page is strictly the getters, iykyk π)
π 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 a wrap bestie π this was OpenSSL 4.0.3, dated 2026-09-29, filed under SSL_CTX_GET_VERIFY_MODE(3SSL). go set some verify params and then come right back here to read them. main character energy only. πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms