X509\_CHECK\_ISSUED(3ossl) OpenSSL X509\_CHECK\_ISSUED(3ossl)

# [NAME](#NAME)

X509\_check\_issued, X509\_check\_akid - helper functions to check whether one certificate is a potential issuer of another certificate

# [SYNOPSIS](#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](#DESCRIPTION)

**X509\_check\_issued()** checks if certificate *subject* was apparently issued using (CA) certificate *issuer*. It checks if the issuer field of *subject* equals the subject field of *issuer*. Moreover, it compares using **X509\_check\_akid()** all sub-fields of the **authorityKeyIdentifier** extension of *subject*, as far as present, with the respective **subjectKeyIdentifier**, 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 if any **keyUsage** field given in *issuer* allows certificate signing. It does not actually check the certificate signature. An error is returned if the *issuer* or the *subject* are incomplete certificates.

**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)](/man/os/openssl-4.0/X509_check_purpose.3) with its *id* parameter being -1. 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) or all the following conditions are met:

- if *akid* has the "keyIdentifier" field, its value matches the **subjectKeyIdentifier** (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.

# [RETURN VALUES](#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.

# [SEE ALSO](#SEE_ALSO)

[**X509\_verify\_cert**(3)](/man/os/openssl-4.0/X509_verify_cert.3), [**X509\_verify**(3)](/man/os/openssl-4.0/X509_verify.3), [**X509\_check\_ca**(3)](/man/os/openssl-4.0/X509_check_ca.3), [**openssl-verify**(1)](/man/os/openssl-4.0/openssl-verify.1), [**X509\_self\_signed**(3)](/man/os/openssl-4.0/X509_self_signed.3), [**X509\_check\_purpose**(3)](/man/os/openssl-4.0/X509_check_purpose.3)

# [HISTORY](#HISTORY)

**X509\_check\_issued()** has had its arguments altered to be const in OpenSSL 4.0.

# [COPYRIGHT](#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 &lt;https://www.openssl.org/source/license.html&gt;.

2026-09-29 4.0.3

---

Document: X509_check_issued(3ossl) from openssl-4.0 4.0.3-r8 (Chainguard OS)
