X509_STORE_GET0_PARAM(3ossl)

πŸ“¦ version 3.5.0, in opensuse-leap 16.0

πŸ’… X509_STORE_GET0_PARAM β€” the OpenSSL 3ossl edition πŸŽ€

okay so bestie, welcome to the manual page for X509_STORE_get0_param, X509_STORE_set1_param, X509_STORE_get1_objects, X509_STORE_get0_objects, and X509_STORE_get1_all_certs β€” aka the X509_STORE setter and getter functions. yes that's five (5) whole functions, they're all fam, and we're gonna meet every single one 🫢


✨ 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 functions, all together in one iconic little group chat πŸ’–


🌸 SYNOPSIS 🌸

#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);

like, look at them. all consistent. all gorgeous. const-correct where it matters 😌


πŸ¦‹ DESCRIPTION πŸ¦‹

X509_STORE_set1_param() sets the verification parameters to pm for xs. boom. done. slay.

X509_STORE_get0_param() retrieves an internal pointer to the verification parameters for xs. and listen β€” the returned pointer must not be freed by the calling application, okay? 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 contains X509 and X509_CRL objects. the caller is responsible for freeing the returned list β€” so this one is yours, take care of it please πŸŽ€

X509_STORE_get0_objects() retrieves an internal pointer to the store's X509 object cache. the cache contains X509 and X509_CRL objects. same deal as before: the returned pointer must not be freed by the calling application.

⚠️ and here's the important bit, bestie: if the store is shared across multiple threads, it is not safe to use the result of this function. like genuinely not safe. use X509_STORE_get1_objects() instead, which avoids this problem entirely. no cap πŸ”₯

X509_STORE_get1_all_certs() returns a list of all certificates in the store. and yeah, the caller is responsible for freeing the returned list. yours. free it. πŸ’œ


🧚 RETURN VALUES 🧚

  • X509_STORE_get0_param() β€” returns a pointer to an X509_VERIFY_PARAM structure.
  • X509_STORE_set1_param() β€” returns 1 for success and 0 for failure.
  • X509_STORE_get1_objects() β€” returns a pointer to a stack of the retrieved objects on success, else NULL.
  • X509_STORE_get0_objects() β€” returns a pointer to a stack of X509_OBJECT.
  • X509_STORE_get1_all_certs() β€” returns a pointer to a stack of the retrieved certificates on success, else NULL.

like, 1 and 0, or pointer vs NULL β€” very "did it work or did it not" energy, and honestly? we respect it πŸ‘‘


⭐ SEE ALSO ⭐

go read that one too, it's giving prequel πŸ¦‹


🌈 HISTORY 🌈

X509_STORE_get0_param and X509_STORE_get0_objects were added in OpenSSL 1.1.0. X509_STORE_get1_certs was added in OpenSSL 3.0. X509_STORE_get1_objects was added in OpenSSL 3.3.

(the glow-up timeline, basically ✨)


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>.


and that's the whole page, bestie πŸ’– this was all from OpenSSL 3.5.0, dated 2026-09-25, filed under X509_STORE_GET0_PARAM(3ossl) β€” periodt, go forth and verify those params responsibly πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from