X509(7ossl)
π X509 β the OpenSSL manual, but make it make sense
okay so bestie, welcome to X509(7ossl) β the OpenSSL page for X.509 certificate handling. yes, the whole certificate saga. grab a boba, we're gonna get into it β¨
β¨ NAME β¨
x509 β X.509 certificate handling π
πΈ SYNOPSIS πΈ
#include <openssl/x509.h>
that's it. that's the whole synopsis. one include and you're in. iconic.
π¦ DESCRIPTION π¦
okay so picture this: an X.509 certificate is a structured grouping of information about an individual, a device, or literally anything one can imagine π«. like, anything. a person, a server, your weird little printer β the cert doesn't judge.
an X.509 CRL (that's a certificate revocation list, iykyk) is a tool to help determine if a certificate is still valid. so when a cert gets cancelled, this is the list that says so π.
the exact definition of those can be found in the X.509 document from ITU-T, or in RFC3280 from PKIX. in OpenSSL, the type X509 is used to express such a certificate, and the type X509_CRL is used to express a CRL. slay, naming consistency π€
π§ a related structure: the cert request
a related structure is a certificate request, defined in PKCS#10 from RSA Security, Inc, also reflected in RFC2896. in OpenSSL, the type X509_REQ is used to express such a certificate request. it's giving "please sign me" energy π
π the complex bits
to handle some complex parts of a certificate, there are the types X509_NAME (to express a certificate name), X509_ATTRIBUTE (to express a certificate attribute), X509_EXTENSION (to express a certificate extension) and a few more. the "a few more" is doing a LOT of heavy lifting there but okay, we move π
and finally β the main character β there's the supertype X509_INFO, which can contain a CRL, a certificate and a corresponding private key. all three. one struct. obsessed π₯
β which functions do what
okay this part is lowkey the important bit, so pay attention bestie:
X509_XXX,d2i_X509_XXX, andi2d_X509_XXXfunctions handle X.509 certificates, with some exceptions, shown below.X509_CRL_XXX,d2i_X509_CRL_XXX, andi2d_X509_CRL_XXXfunctions handle X.509 CRLs.X509_REQ_XXX,d2i_X509_REQ_XXX, andi2d_X509_REQ_XXXfunctions handle PKCS#10 certificate requests.X509_NAME_XXXfunctions handle certificate names.X509_ATTRIBUTE_XXXfunctions handle certificate attributes.X509_EXTENSION_XXXfunctions handle certificate extensions.
not the _XXX suffixes being literally every function π but fr fr, that's the convention and it ate.
heads up: the certificate line says "with some exceptions, shown below" β so don't assume every single X509_XXX is a cert function, okay? check the list π
π SEE ALSO π
X509_NAME_ENTRY_get_object(3)X509_NAME_add_entry_by_txt(3)X509_NAME_add_entry_by_NID(3)X509_NAME_print_ex(3)X509_NAME_new(3)PEM_X509_INFO_read(3)d2i_X509(3)d2i_X509_ALGOR(3)d2i_X509_CRL(3)d2i_X509_NAME(3)d2i_X509_REQ(3)d2i_X509_SIG(3)crypto(7)
the full reading list π go off, read them all, you'll be so smart.
π COPYRIGHT π
Copyright 2003-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
aaaaand that's the page!! π«Άβ¨ this was X509(7ossl) from OpenSSL, version 3.5.0, dated 2026-09-25 β go forth and handle those certificates, bestie, you've got this ππ
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- opensuse-leap 16.0: openssl-3 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms