X509_CHECK_ISSUED(3SSL)
π X509_CHECK_ISSUED(3SSL) π
okay bestie, welcome to the OpenSSL x509v3 girlies' corner!! today we're talking about X509_check_issued and X509_check_akid β they're helper functions that check whether one certificate is a potential issuer of another certificate. it's giving "are u my mom or not" energy, and honestly? iconic. β¨
β¨ SYNOPSIS β¨
#include <openssl/x509v3.h>
int X509_check_issued(const X509 *issuer, const X509 *subject);
int X509_check_akid(const X509 *issuer, const AUTHORITY_KEYID *akid);
πΈ DESCRIPTION πΈ
X509_check_issued() β the main character π
X509_check_issued() checks if certificate subject was apparently issued using (CA) certificate issuer. no cap, that's the whole vibe. here's the receipts it goes through:
- it checks if the issuer field of subject equals the subject field of issuer. matching besties fr fr π
- moreover, it compares β using
X509_check_akid()β all sub-fields of theauthorityKeyIdentifierextension of subject, as far as present, with the respectivesubjectKeyIdentifier, serial number, and issuer fields of issuer, as far as present. - it also checks if the subject signature algorithm matches the issuer public key algorithm π¦
- and it checks if any
keyUsagefield given in issuer allows certificate signing βοΈ
β οΈ real talk tho: it does NOT actually check the certificate signature. like at all. do not come for it. and also: an error is returned if the issuer or the subject are incomplete certificates. so make sure they're fully formed before you show up, okay?? π
X509_check_akid() β the low-level understudy π
X509_check_akid() is a more low-level function. it assumes that various internal fields of issuer have already been filled in, for instance by calling X509_check_purpose(3) with its id parameter being -1. (yes bestie, -1. that's the magic number, don't ask π«)
it checks whether the fields of the subject certificate's authority key identifier akid match the corresponding fields of the issuer certificate.
in more detail: it returns X509_V_OK if akid is NULL (because this means no restriction, we love a chill queen π) or all the following conditions are met:
- if akid has the
"keyIdentifier"field, its value matches thesubjectKeyIdentifier(SKID) extension of issuer if present, - if akid has the
"authorityCertSerialNumber"field, its value equals the serial number of the issuer certificate, and - if akid has the
"authorityCertIssuer"field and its"GeneralNames"include at least one"directoryName", the first such name equals the"issuer"field of the issuer certificate.
periodt. all three, or it's a no from me π ββοΈ
π RETURN VALUES π
X509_check_issued() and X509_check_akid() return X509_V_OK if all checks are successful, or some X509_V_ERR* constant indicating why the issuer does not match. so if you get something other than X509_V_OK, that constant is literally telling u exactly what went wrong. read it. it's yapping for a reason π£οΈπ
π₯ SEE ALSO π₯
X509_verify_cert(3)X509_verify(3)X509_check_ca(3)openssl-verify(1)X509_self_signed(3)X509_check_purpose(3)
(every single one of these is a banger, go read them when u get a sec π«Ά)
π HISTORY π
X509_check_issued() has had its arguments altered to be const in OpenSSL 4.0. glow-up achieved, structure preserved, obsessed πβ¨
π COPYRIGHT π
Copyright 2015-2026 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>.
and that's the whole page bestie!! this was X509_CHECK_ISSUED(3SSL) from OpenSSL version 4.0.3, dated 2026-09-29 β mwah, go check some issuers, u got this ππ¦π
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms