X509_REQ_NEW(3)
π X509_REQ_NEW(3) β PKCS#10 certification requests π
okay so bestie, welcome to the X509_REQ_NEW(3) page β manual name right there, iconic. This whole vibe is PKCS#10 certification requests. π
π NAME π
X509_REQ_new, X509_REQ_dup, X509_to_X509_REQ, X509_REQ_free, X509_REQ_INFO_new, X509_REQ_INFO_free β PKCS#10 certification requests.
β¨ SYNOPSIS β¨
library βlibcryptoβ #include <openssl/x509.h>
X509_REQ *
X509_REQ_new(void);
X509_REQ *
X509_REQ_dup(X509_REQ *req);
X509_REQ *
X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md);
void
X509_REQ_free(X509_REQ *req);
X509_REQ_INFO *
X509_REQ_INFO_new(void);
void
X509_REQ_INFO_free(X509_REQ_INFO *req_info);
π¦ DESCRIPTION π¦
okay so hereβs the tea, function by function:
X509_REQ_new()β allocates and initializes an emptyX509_REQobject, representing an ASN.1CertificationRequeststructure defined in RFC 2986 section 4.2. It can hold a pointer to anX509_REQ_INFOobject discussed below together with a cryptographic signature and information about the signature algorithm used.X509_REQ_dup()β creates a deep copy ofrequsingASN1_item_dup(3), setting the reference count of the copy to1.X509_to_X509_REQ()β allocates a new certification request object, copies the subject name and the public key into it from the certificatex, and sets the version to zero. UnlesspkeyisNULL, it also signs the request withX509_REQ_sign(3)usingpkeyandmd.X509_REQ_free()β freesreq. Ifreqis aNULLpointer, no action occurs.X509_REQ_INFO_new()β allocates and initializes an emptyX509_REQ_INFOobject, representing an ASN.1CertificationRequestInfostructure defined in RFC 2986 section 4.1. It is used inside theX509_REQobject and can hold the subject and the public key of the requested certificate and additional attributes.X509_REQ_INFO_free()β freesreq_info. Ifreq_infois aNULLpointer, no action occurs.
π RETURN VALUES π
X509_REQ_new(), X509_REQ_dup(), X509_to_X509_REQ(), and X509_REQ_INFO_new() return the new X509_REQ or X509_REQ_INFO object, respectively, or NULL if an error occurs. No cap. π
π₯ SEE ALSO π₯
d2i_X509_REQ(3)PEM_read_X509_REQ(3)X509_new(3)X509_REQ_add1_attr(3)X509_REQ_add_extensions(3)X509_REQ_check_private_key(3)X509_REQ_digest(3)X509_REQ_get0_signature(3)X509_REQ_get_pubkey(3)X509_REQ_get_subject_name(3)X509_REQ_get_version(3)X509_REQ_print_ex(3)X509_REQ_sign(3)
π STANDARDS π
RFC 2986: PKCS #10: Certification Request Syntax Specification
π HISTORY π
X509_REQ_new(), X509_REQ_free(), X509_REQ_INFO_new(), and X509_REQ_INFO_free() first appeared in SSLeay 0.4.4, X509_REQ_dup() in SSLeay 0.5.1, and X509_to_X509_REQ() in SSLeay 0.6.0. These functions have been available since OpenBSD 2.4.
This pageβs footer says Debian, June 8, 2025, and X509_REQ_NEW(3) β thatβs the source/version-and-date moment, bestie. Bye! π
β¨
π¦ 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, 2021 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