SSL_GET_CERTIFICATE(3)
π SSL_GET_CERTIFICATE(3) π
hiii bestie, welcome to the SSL_GET_CERTIFICATE(3) manual page β this is the one about pulling certificate + private-key data out of an SSL object, and it is very much giving βinternal pointers, do not touchβ energy. π«Ά
πΈ NAME πΈ
SSL_get_certificate, SSL_get_privatekey β get SSL certificate and private key
β¨ SYNOPSIS β¨
okay so the signatures are literally right here, no cap:
library βlibsslβ libcrypto #include <openssl/ssl.h>
X509 *
SSL_get_certificate(const SSL *ssl);
EVP_PKEY *
SSL_get_privatekey(const SSL *ssl);
π¦ DESCRIPTION π¦
These functions retrieve certificate and key data from an SSL object, bestie. They hand you back internal pointers β and those pointers must not be freed by the application program.
β οΈ girlies please listen: internal pointers are not yours to free. the application program must not free them. periodt. π
π RETURN VALUES π
SSL_get_certificate()β returns the active X.509 certificate currently used byssl, orNULLif none is active. πSSL_get_privatekey()β returns the active private key currently used byssl, orNULLif none is active. π
π₯ SEE ALSO π₯
go check out these other icons too:
π HISTORY π
SSL_get_certificate() first appeared in SSLeay 0.5.2a. SSL_get_privatekey() first appeared in SSLeay 0.8.0. Both functions have been available since OpenBSD 2.4. β
okay thatβs the whole vibe check, bestie β mwah! π this page is from Debian, dated June 8, 2025, and you just read SSL_GET_CERTIFICATE(3). π¦
π¦ 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