libressl-d2i_OCSP_REQUEST(3)

libressl-d2i_OCSP_REQUEST3

Decode and encode ocsp requests

Usage

Crypto Library (libcrypto, -lcrypto)

#include <openssl/ocsp.h>

OCSP_REQUEST *

d2i_OCSP_REQUEST(OCSP_REQUEST **val_out, const unsigned char **der_in, long length);

int

i2d_OCSP_REQUEST(OCSP_REQUEST *val_in, unsigned char **der_out);

OCSP_SIGNATURE *

d2i_OCSP_SIGNATURE(OCSP_SIGNATURE **val_out, const unsigned char **der_in, long length);

int

i2d_OCSP_SIGNATURE(OCSP_SIGNATURE *val_in, unsigned char **der_out);

OCSP_REQINFO *

d2i_OCSP_REQINFO(OCSP_REQINFO **val_out, const unsigned char **der_in, long length);

int

i2d_OCSP_REQINFO(OCSP_REQINFO *val_in, unsigned char **der_out);

OCSP_ONEREQ *

d2i_OCSP_ONEREQ(OCSP_ONEREQ **val_out, const unsigned char **der_in, long length);

int

i2d_OCSP_ONEREQ(OCSP_ONEREQ *val_in, unsigned char **der_out);

OCSP_CERTID *

d2i_OCSP_CERTID(OCSP_CERTID **val_out, const unsigned char **der_in, long length);

int

i2d_OCSP_CERTID(OCSP_CERTID *val_in, unsigned char **der_out);

OCSP_SERVICELOC *

d2i_OCSP_SERVICELOC(OCSP_SERVICELOC **val_out, const unsigned char **der_in, long length);

int

i2d_OCSP_SERVICELOC(OCSP_SERVICELOC *val_in, unsigned char **der_out);

Overview

These functions decode and encode ASN.1 structures used for OCSP requests. For details about the semantics, examples, caveats, and bugs, see ASN1_item_d2i(3).

d2i_OCSP_REQUEST() and i2d_OCSP_REQUEST() decode and encode an ASN.1 OCSPRequest structure defined in RFC 6960 section 4.1.1.

d2i_OCSP_SIGNATURE() and i2d_OCSP_SIGNATURE() decode and encode an ASN.1 Signature structure defined in RFC 6960 section 4.1.1.

d2i_OCSP_REQINFO() and i2d_OCSP_REQINFO() decode and encode an ASN.1 TBSRequest structure defined in RFC 6960 section 4.1.1.

d2i_OCSP_ONEREQ() and i2d_OCSP_ONEREQ() decode and encode an ASN.1 Request structure defined in RFC 6960 section 4.1.1.

d2i_OCSP_CERTID() and i2d_OCSP_CERTID() decode and encode an ASN.1 CertID structure defined in RFC 6960 section 4.1.1.

d2i_OCSP_SERVICELOC() and i2d_OCSP_SERVICELOC() decode and encode an ASN.1 ServiceLocator structure defined in RFC 6960 section 4.4.6.

Return values

d2i_OCSP_REQUEST(), d2i_OCSP_SIGNATURE(), d2i_OCSP_REQINFO(), d2i_OCSP_ONEREQ(), d2i_OCSP_CERTID(), and d2i_OCSP_SERVICELOC() return an object of the respective type or NULL if an error occurs.

i2d_OCSP_REQUEST(), i2d_OCSP_SIGNATURE(), i2d_OCSP_REQINFO(), i2d_OCSP_ONEREQ(), i2d_OCSP_CERTID(), and i2d_OCSP_SERVICELOC() return the number of bytes successfully encoded or a negative value if an error occurs.

Standards

RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate Status Protocol, section 4.1: Request Syntax

History

These functions first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 3.2.

From libressl 4.4.0-1 in Arch Linux 2026-11-01. Parsed by carta from the page's mdoc source.