SSL_DUP_CA_LIST(3)

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

πŸ’… 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 new STACK_OF(X509_NAME) β€” a whole new stack, fresh out the box 🎁
  • or it returns NULL on failure 😭 (yes, it can fail. check your return values, bestie, always.)

πŸ¦‹ SEE ALSO πŸ¦‹

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