X509_STORE_NEW(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

okay so welcome to X509_STORE_NEW(3), bestie β€” this page lives in the Library Functions Manual, and it’s all about the allocation + freeing of X.509 certificate stores πŸ’…βœ¨

πŸ’– NAME πŸ’–

X509_STORE_new, X509_STORE_up_ref, X509_STORE_free β€” allocate and free X.509 certificate stores πŸŽ€

🌸 SYNOPSIS 🌸

first up, the actual signatures β€” keep these exactly as written, no cap:

library β€œlibcrypto”
#include <openssl/x509_vfy.h>

X509_STORE *
X509_STORE_new(void);

int
X509_STORE_up_ref(X509_STORE *store);

void
X509_STORE_free(X509_STORE *store);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here’s the vibe check on these three functions:

  • X509_STORE_new(void) β€” allocates and initializes an empty X.509 certificate store, and sets its reference count to 1 ✨
  • X509_STORE_up_ref(X509_STORE *store) β€” increments the reference count of store by 1 🫢
  • X509_STORE_free(X509_STORE *store) β€” decrements the reference count of store by 1. If the reference count reaches 0, all resources used by the store, including all certificates contained in it, are released and store itself is freed. If store is a NULL pointer, no action occurs πŸ™ˆ

✨ RETURN VALUES ✨

  • X509_STORE_new() returns a newly created X509_STORE object or NULL if an error occurs 😭
  • X509_STORE_up_ref() returns 1 for success and 0 for failure β€” that’s the whole return tea 🍡

πŸŽ€ SEE ALSO πŸŽ€

go sip some more manpages, bestie 🫢:

πŸ‘‘ HISTORY πŸ‘‘

  • X509_STORE_new() and X509_STORE_free() first appeared in SSLeay 0.8.0 and have been available since OpenBSD 2.4 🌈
  • X509_STORE_up_ref() first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 6.3 ⭐

okay that’s the page, bestie β€” mwah πŸ’‹πŸ«Ά. this footer tea is from Debian, dated June 8, 2025.

πŸ“¦ where this page comes from