OpenBSD manual page server

Manual Page Search Parameters

X509_FIND_BY_SUBJECT(3) Library Functions Manual X509_FIND_BY_SUBJECT(3)

X509_find_by_subject, X509_find_by_issuer_and_serialsearch an array of X.509 certificates

#include <openssl/x509.h>

X509 *
X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *subject);

X509 *
X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *issuer, ASN1_INTEGER *serial);

() searches the variable-sized array sk for a certificate with a matching subject name.

() searches the array for a certificate where both the issuer name and the serial number match the arguments.

These functions return a pointer to the first matching certificate or NULL if sk is NULL or does not contain a matching certificate.

ASN1_INTEGER_new(3), STACK_OF(3), X509_cmp(3), X509_get_serialNumber(3), X509_get_subject_name(3), X509_NAME_new(3), X509_new(3)

These functions first appeared in SSLeay 0.8.1 and have been available since OpenBSD 2.4.

July 4, 2021 OpenBSD-current