X509_STORE_GET0_PARAM(3ossl)
β¨ X509_STORE_GET0_PARAM β¨
okay bestie, pull up a chair, because we're doing the X509_STORE_GET0_PARAM(3ossl) page from the OpenSSL manual and honestly?? it's giving β¨certificate-store-gossipβ¨. it's all about getting stuff out of an X509_STORE and setting stuff into it. setters, getters, the whole friend group π«Ά
πΈ NAME πΈ
X509_STORE_get0_param, X509_STORE_set1_param, X509_STORE_get1_objects, X509_STORE_get0_objects, X509_STORE_get1_all_certs β the X509_STORE setter and getter squad π
π SYNOPSIS π
like, here's the whole vibe, verbatim, no notes:
#include <openssl/x509_vfy.h>
X509_VERIFY_PARAM *X509_STORE_get0_param(const X509_STORE *xs);
int X509_STORE_set1_param(X509_STORE *xs, const X509_VERIFY_PARAM *pm);
STACK_OF(X509_OBJECT) *X509_STORE_get1_objects(X509_STORE *xs);
STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(const X509_STORE *xs);
STACK_OF(X509) *X509_STORE_get1_all_certs(X509_STORE *xs);
π¦ DESCRIPTION π¦
okay so, one by one, main character by main character π
X509_STORE_set1_param()sets the verification parameters topmforxs. like, "here bestie, these are your rules now" πX509_STORE_get0_param()retrieves an internal pointer to the verification parameters forxs. and listen β the returned pointer must not be freed by the calling application. it's not yours, don't touch it, hands off πX509_STORE_get1_objects()returns a snapshot of all objects in the store's X509 cache. the cache containsX509andX509_CRLobjects. this one is yours though β the caller is responsible for freeing the returned list, usingsk_X509_OBJECT_pop_free(sk, X509_OBJECT_free). so like, you got it, you clean it up π§ΉX509_STORE_get0_objects()retrieves an internal pointer to the store's X509 object cache. the cache containsX509andX509_CRLobjects. the returned pointer must not be freed by the calling application. and here's the tea: if the store is shared across multiple threads, it is not safe to use the result of this function. useX509_STORE_get1_objects()instead, which avoids this problem. thread safety said "not today" πX509_STORE_get1_all_certs()returns a list of all certificates in the store. the caller is responsible for freeing the returned list withOSSL_STACK_OF_X509_free(). free it bestie, that's the rule π«Ά
β RETURN VALUES β
X509_STORE_get0_param()returns a pointer to anX509_VERIFY_PARAMstructure. πX509_STORE_set1_param()returns1for success and0for failure. classic binary slay.X509_STORE_get1_objects()returns a pointer to a stack of the retrieved objects on success, elseNULL. π when it'sNULLit's over fr frX509_STORE_get0_objects()returns a pointer to a stack ofX509_OBJECT.X509_STORE_get1_all_certs()returns a pointer to a stack of the retrieved certificates on success, elseNULL.
π SEE ALSO π
go read these next, iykyk:
π HISTORY π
the timeline, periodt:
X509_STORE_get0_paramandX509_STORE_get0_objectswere added in OpenSSL 1.1.0.X509_STORE_get1_certswas added in OpenSSL 3.0.X509_STORE_get1_objectswas added in OpenSSL 3.3.
π COPYRIGHT π
Copyright 2016-2024 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>.
aaaand that's the whole page bestie, you ate it up π β¨ this was version 3.5.9, dated 2026-09-29, straight from the OpenSSL fam β mwah, no cap, go forth and get0/ get1 responsibly ππ¦π
π¦ 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