LIBRESSL-X509_STORE_CTX_GET_EX_NEW_INDEX(3)
okay so bestie, this page is from the Library Functions Manual, and the header title is LIBRESSL-X509_STORE_CTX_GET_EX_NEW_INDEX(3) π
itβs all about stashing application-specific data inside X509_STORE_CTX structures, and honestly? iconic little hooks.
β¨ NAME β¨
X509_STORE_CTX_get_ex_new_indexX509_STORE_CTX_set_ex_dataX509_STORE_CTX_get_ex_dataX509_STORE_CTX_set_app_dataX509_STORE_CTX_get_app_data
β all of these add application specific data to X509_STORE_CTX structures π«Ά
πΈ SYNOPSIS πΈ
library libcrypto and this include, bestie:
library βlibcryptoβ #include <openssl/x509_vfy.h>
int
X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,
CRYPTO_EX_free *free_func);
int
X509_STORE_CTX_set_ex_data(X509_STORE_CTX *d, int idx, void *arg);
void *
X509_STORE_CTX_get_ex_data(X509_STORE_CTX *d, int idx);
int
X509_STORE_CTX_set_app_data(X509_STORE_CTX *d, void *arg);
void *
X509_STORE_CTX_get_app_data(X509_STORE_CTX *d);
π¦ DESCRIPTION π¦
okay so these functions handle application specific data in X509_STORE_CTX structures. Their usage is identical to that of RSA_get_ex_new_index(3), RSA_set_ex_data(3), and RSA_get_ex_data(3) β literally same energy, just for X509_STORE_CTX π
This mechanism is used internally by the ssl(3) library to store the SSL structure associated with a verification operation in an X509_STORE_CTX structure. no cap, itβs the little internal hiding spot π
X509_STORE_CTX_set_app_data() and X509_STORE_CTX_get_app_data() are macros calling X509_STORE_CTX_set_ex_data() and X509_STORE_CTX_get_ex_data(), respectively, with an idx of 0. so theyβre the shortcut besties π
π RETURN VALUES π
X509_STORE_CTX_get_ex_new_index()returns a new index or-1on failure. slay when it works, sad little-1when it doesnβt.X509_STORE_CTX_set_ex_data()andX509_STORE_CTX_set_app_data()return1on success or0on failure. clean binary vibes.X509_STORE_CTX_get_ex_data()andX509_STORE_CTX_get_app_data()return the application data orNULLon failure.NULLmay also be valid application data, but currently these functions can only fail if given an invalididxargument. so likeβ¦NULLis not always a red flag, bestie π
π SEE ALSO π
go read these next, fr fr π
π HISTORY π
X509_STORE_CTX_set_app_data() and X509_STORE_CTX_get_app_data() first appeared in SSLeay 0.8.0, and X509_STORE_CTX_get_ex_new_index(), X509_STORE_CTX_set_ex_data(), and X509_STORE_CTX_get_ex_data() in SSLeay 0.9.0. All these functions have been available since OpenBSD 2.4. history lesson served, periodt π
mwah π signing off from the Debian source/version, dated June 8, 202X, with the page title X509_STORE_CTX_GET_EX_NEW_INDEX(3) β bye bestie, go add your app data responsibly π«Άβ¨
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2009, 2014 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms