X509_STORE_NEW(3ossl)
π
X509_STORE_NEW β bestie's guide to allocating, freeing and locking an X509_STORE
okay so this is the 3ossl manual page, and it's literally the lore drop for X509_STORE_new, X509_STORE_up_ref, X509_STORE_free, X509_STORE_lock and X509_STORE_unlock β the whole allocation/freeing/locking saga. it's giving "small API, big responsibilities" ngl π
β¨ NAME β¨
X509_STORE_new, X509_STORE_up_ref, X509_STORE_free, X509_STORE_lock, X509_STORE_unlock β the X509_STORE allocation, freeing and locking functions. that's the whole cast, no extras, no cameos π
πΈ SYNOPSIS πΈ
#include <openssl/x509_vfy.h>
X509_STORE *X509_STORE_new(void);
void X509_STORE_free(X509_STORE *xs);
int X509_STORE_lock(X509_STORE *xs);
int X509_STORE_unlock(X509_STORE *xs);
int X509_STORE_up_ref(X509_STORE *xs);
that's it. that's the whole menu. copy it exactly, bestie, don't get creative with the return types π
π¦ DESCRIPTION π¦
so like, here's what each one actually does:
X509_STORE_new()β returns a newX509_STORE. brand new, fresh out the box, main character energy β¨X509_STORE_up_ref()β increments the reference count associated with theX509_STOREobject. it's literally the "you're doing amazing sweetie" of refcounts β more refs, more love π«ΆX509_STORE_lock()β locks the store from modification by other threads, andX509_STORE_unlock()unlocks it. classic mutual exclusion moment, keep those threads from stepping on each other πX509_STORE_free()β frees up a singleX509_STOREobject. and important: if the argument isNULL, nothing is done. no crash, no drama, just vibes π
π₯ RETURN VALUES π₯
okay so the vibe check results:
X509_STORE_new()returns a newly createdX509_STOREorNULLif the call fails.NULL= it did not slay πX509_STORE_up_ref(),X509_STORE_lock()andX509_STORE_unlock()return1for success and0for failure. binary queen behavior πX509_STORE_free()does not return values. it just does the thing and leaves. iconic β
π SEE ALSO π
go read these next, iykyk:
π§ HISTORY π§
the X509_STORE_up_ref(), X509_STORE_lock() and X509_STORE_unlock() functions were added in OpenSSL 1.1.0. so they're not new new, but they're still that girl π
π 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>.
fr fr read the license, bestie. "may not use this file except in compliance with the License" is not a suggestion, it's a whole mood. π«Ά
and that's the page!! π
β¨ this was OpenSSL 3.5.0, dated 2026-09-25, page X509_STORE_NEW(3ossl) β go forth and refcount responsibly, mwah π
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms