SSL_DUP_CA_LIST(3)
π SSL_dup_CA_list(3) β the deep-copy glow-up π
okay so real talk, bestie, this one lives in the Library Functions Manual for libssl/libcrypto, and it's honestly such a clean little function. no drama, no weird edge cases, just a stack that gets a whole new twin. slay.
β¨ SYNOPSIS β¨
library βlibsslβ libcrypto #include <openssl/ssl.h>
STACK_OF(X509_NAME) *
SSL_dup_CA_list(const STACK_OF(X509_NAME) *sk);
yes that's the whole thing. one function, one argument, one return type. she's lowkey minimalist and I respect it π«Ά
πΈ DESCRIPTION πΈ
okay so picture this: you've got a stack of X509_NAME objects chilling on sk. SSL_dup_CA_list() goes and constructs a brand new STACK_OF(X509_NAME) object, and then it places copies of all the X509_NAME objects it found on sk onto that new stack.
it's giving deep copy, not "here's a pointer, good luck". the originals stay exactly as they are, untouched, unbothered, main character energy β¨. the copies get their own whole stack to live on. truly iconic behaviour, no cap.
π RETURN VALUES π
SSL_dup_CA_list()hands you back the newSTACK_OF(X509_NAME)β a whole new stack, fresh out the box π- or it returns
NULLon failure π (yes, it can fail. check your return values, bestie, always.)
π¦ SEE ALSO π¦
ssl(3)SSL_CTX_set_client_CA_list(3)SSL_get_client_CA_list(3)SSL_load_client_CA_file(3)X509_NAME_new(3)
go read those if you want the full lore. the vibes are immaculate, iykyk π
π HISTORY π
so SSL_dup_CA_list() first appeared in SSLeay 0.8.0, and it's been available since OpenBSD 2.4 π§ likeβ¦ she's been doing this since before most of us were born and she has never once missed. periodt.
and that's the whole page, bestie!! π this legend of a manpage came from Debian, dated June 8, 2025 β so go forth, duplicate those CA lists, and remember: deep copy = no shared pointers, no regrets πβπ
π¦ 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) 2016 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms