X509_GET1_EMAIL(3)
π NAME π
okay bestie, welcome to X509_GET1_EMAIL(3) from the Library Functions Manual β¨ This is the page for X509_get1_email, X509_get1_ocsp, and X509_email_free β literally utilities for stacks of strings. periodt π
β¨ SYNOPSIS β¨
library βlibcryptoβ #include <openssl/x509v3.h>
typedef char *OPENSSL_STRING;
STACK_OF(OPENSSL_STRING) *
X509_get1_email(X509 *certificate);
STACK_OF(OPENSSL_STRING) *
X509_get1_ocsp(X509 *certificate);
void
X509_email_free(STACK_OF(OPENSSL_STRING) *stack);
π¦ DESCRIPTION π¦
X509_get1_email()β retrieves all email addresses from thesubjectfield and from anySubject Alternative Nameextension of the certificate. like, all of them, bestie πX509_get1_ocsp()β retrieves all uniform resource identifiers from allAccessDescriptionobjects having anaccessMethodofOCSPwhich are contained in theAuthority Information Accessextension of the certificate. very specific, very iconic πX509_email_free()β frees all strings stored in the stack as well as the stack itself. Ifstackis aNULLpointer, no action occurs β literally nothing happens, no drama π«Ά
πΈ RETURN VALUES πΈ
X509_REQ_get1_email() and X509_get1_ocsp() return newly allocated stacks of char * containing copies of the addresses in question, or NULL if there are no addresses or if an error occurs.
yes, the page literally says X509_REQ_get1_email() right there β Iβm not editing it, Iβm just reporting the vibes π
π SEE ALSO π
OCSP_sendreq_new(3)OCSP_SERVICELOC_new(3)OPENSSL_sk_new(3)STACK_OF(3)X509_check_email(3)X509_get_ext_d2i(3)X509_get_subject_name(3)X509_new(3)x509v3.cnf(5)
π STANDARDS π
- RFC 5280: Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile
- section 4.1: Basic Certificate Fields
- section 4.1.2.6: Subject
- section 4.2.1.6: Subject Alternative Name
- section 4.2.2.1: Authority Information Access
- RFC 2985: PKCS #9: Selected Object Classes and Attribute Types
- section 5.2.1: Electronic-mail address
- appendix B.3.5: emailAddress
π HISTORY π
X509_get1_email()andX509_email_free()first appeared in OpenSSL 0.9.6 and have been available since OpenBSD 2.9.X509_get1_ocsp()first appeared in OpenSSL 0.9.8h and has been available since OpenBSD 4.5.
π BUGS π
X509_email_free() is utterly misnamed. It does not operate on any X509 object, nor is it in any way restricted to email addresses; instead, it simply frees a stack of strings.
the audacity π the name said email but the function said βbestie Iβm just a stack freerβ β iconic behavior, honestly
π xoxo bestie β this page came from Debian, dated June 8, 2025, and itβs X509_GET1_EMAIL(3) signing off. mwah π
π¦ 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) 2019 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