libressl-X509_check_issued3
Check whether a certificate was issued using a given ca certificate
Usage
Crypto Library (libcrypto, -lcrypto)
#include <openssl/x509v3.h>
int
X509_check_issued(X509 *issuer, X509 *subject);
Overview
This function checks whether the certificate subject was issued using the CA certificate issuer. It does the following checks:
-
match the issuer field of subject against the subject field of issuer
-
if
authorityKeyIdentifieris present in the subject certificate, compare it to thesubjectKeyIdentifierof issuer -
check the
keyUsagefield of issuer.
Return values
This function returns X509_V_OK if the certificate subject is issued by issuer, or some X509_V_ERR* constant to indicate an error.