QSC Post Quantum Cryptographic Library 1.1.0.2 (B2)
A post quantum secure library written in Ansi C
Loading...
Searching...
No Matches
x509aia.h File Reference

Authority Information Access extension helpers. More...

#include "qsccommon.h"

Go to the source code of this file.

Functions

QSC_EXPORT_API bool qsc_x509_aia_get_ocsp_url (const uint8_t *ext, size_t extlen, char *url, size_t *urllen)
 Extract the OCSP responder URI from an Authority Information Access extension.

Detailed Description

Authority Information Access extension helpers.

Function Documentation

◆ qsc_x509_aia_get_ocsp_url()

QSC_EXPORT_API bool qsc_x509_aia_get_ocsp_url ( const uint8_t * ext,
size_t extlen,
char * url,
size_t * urllen )

Extract the OCSP responder URI from an Authority Information Access extension.

Parses the DER-encoded Authority Information Access extension value and locates an id-ad-ocsp access descriptor. When present, the URI is copied to the caller-supplied buffer and NUL-terminated.

This function does not allocate memory. The caller must provide an output buffer and set urllen to the capacity of that buffer on entry. On success, urllen receives the URI byte length excluding the terminating NUL.

Parameters
ext[const] Pointer to the DER-encoded Authority Information Access extension value.
extlenThe extension length in bytes.
urlOutput buffer receiving the URI string.
urllen[in,out] On input, the output buffer capacity; on output, the URI length excluding the terminating NUL.
Returns
Returns true on success; otherwise returns false.