D2I_OCSP_RESPONSE(3)
π NAME π
Okay bestie, this is the D2I_OCSP_RESPONSE(3) manual page, and the whole squad is: d2i_OCSP_RESPONSE, i2d_OCSP_RESPONSE, d2i_OCSP_RESPBYTES, i2d_OCSP_RESPBYTES, d2i_OCSP_BASICRESP, i2d_OCSP_BASICRESP, d2i_OCSP_RESPDATA, i2d_OCSP_RESPDATA, d2i_OCSP_RESPID, i2d_OCSP_RESPID, d2i_OCSP_SINGLERESP, i2d_OCSP_SINGLERESP, d2i_OCSP_CERTSTATUS, i2d_OCSP_CERTSTATUS, d2i_OCSP_REVOKEDINFO, i2d_OCSP_REVOKEDINFO, d2i_OCSP_CRLID, and i2d_OCSP_CRLID β decode and encode OCSP responses. That's the vibe. π
β¨ SYNOPSIS β¨
Here's the exact API lineup, no cap. The library is libcrypto, and you'll need #include <openssl/ocsp.h>. π«Ά
library βlibcryptoβ #include <openssl/ocsp.h>
OCSP_RESPONSE *
d2i_OCSP_RESPONSE(OCSP_RESPONSE **val_out, const unsigned char **der_in,
long length);
int
i2d_OCSP_RESPONSE(OCSP_RESPONSE *val_in, unsigned char **der_out);
OCSP_RESPBYTES *
d2i_OCSP_RESPBYTES(OCSP_RESPBYTES **val_out,
const unsigned char **der_in, long length);
int
i2d_OCSP_RESPBYTES(OCSP_RESPBYTES *val_in, unsigned char **der_out);
OCSP_BASICRESP *
d2i_OCSP_BASICRESP(OCSP_BASICRESP **val_out,
const unsigned char **der_in, long length);
int
i2d_OCSP_BASICRESP(OCSP_BASICRESP *val_in, unsigned char **der_out);
OCSP_RESPDATA *
d2i_OCSP_RESPDATA(OCSP_RESPDATA **val_out, const unsigned char **der_in,
long length);
int
i2d_OCSP_RESPDATA(OCSP_RESPDATA *val_in, unsigned char **der_out);
OCSP_RESPID *
d2i_OCSP_RESPID(OCSP_RESPID **val_out, const unsigned char **der_in,
long length);
int
i2d_OCSP_RESPID(OCSP_RESPID *val_in, unsigned char **der_out);
OCSP_SINGLERESP *
d2i_OCSP_SINGLERESP(OCSP_SINGLERESP **val_out,
const unsigned char **der_in, long length);
int
i2d_OCSP_SINGLERESP(OCSP_SINGLERESP *val_in, unsigned char **der_out);
OCSP_CERTSTATUS *
d2i_OCSP_CERTSTATUS(OCSP_CERTSTATUS **val_out,
const unsigned char **der_in, long length);
int
i2d_OCSP_CERTSTATUS(OCSP_CERTSTATUS *val_in, unsigned char **der_out);
OCSP_REVOKEDINFO *
d2i_OCSP_REVOKEDINFO(OCSP_REVOKEDINFO **val_out,
const unsigned char **der_in, long length);
int
i2d_OCSP_REVOKEDINFO(OCSP_REVOKEDINFO *val_in, unsigned char **der_out);
OCSP_CRLID *
d2i_OCSP_CRLID(OCSP_CRLID **val_out, const unsigned char **der_in,
long length);
int
i2d_OCSP_CRLID(OCSP_CRLID *val_in, unsigned char **der_out);
πΈ DESCRIPTION πΈ
These functions decode and encode ASN.1 structures used for OCSP responses. For the deep lore β semantics, examples, caveats, and bugs β see ASN1_item_d2i(3). That's the source of truth, bestie. β¨
d2i_OCSP_RESPONSE()andi2d_OCSP_RESPONSE()β decode and encode an ASN.1OCSPResponsestructure defined in RFC 6960 section 4.2.1. πd2i_OCSP_RESPBYTES()andi2d_OCSP_RESPBYTES()β decode and encode an ASN.1ResponseBytesstructure defined in RFC 6960 section 4.2.1. πd2i_OCSP_BASICRESP()andi2d_OCSP_BASICRESP()β decode and encode an ASN.1BasicOCSPResponsestructure defined in RFC 6960 section 4.2.1. π¦d2i_OCSP_RESPDATA()andi2d_OCSP_RESPDATA()β decode and encode an ASN.1ResponseDatastructure defined in RFC 6960 section 4.2.1. πΈd2i_OCSP_RESPID()andi2d_OCSP_RESPID()β decode and encode an ASN.1ResponderIDstructure defined in RFC 6960 section 4.2.1. π«Άd2i_OCSP_SINGLERESP()andi2d_OCSP_SINGLERESP()β decode and encode an ASN.1SingleResponsestructure defined in RFC 6960 section 4.2.1. πd2i_OCSP_CERTSTATUS()andi2d_OCSP_CERTSTATUS()β decode and encode an ASN.1CertStatusstructure defined in RFC 6960 section 4.2.1. π₯d2i_OCSP_REVOKEDINFO()andi2d_OCSP_REVOKEDINFO()β decode and encode an ASN.1RevokedInfostructure defined in RFC 6960 section 4.2.1. πd2i_OCSP_CRLID()andi2d_OCSP_CRLID()β decode and encode an ASN.1CrlIDstructure defined in RFC 6960 section 4.4.2. π
π¦ RETURN VALUES π¦
The d2i_... girlies are the decoders: d2i_OCSP_RESPONSE(), d2i_OCSP_RESPBYTES(), d2i_OCSP_BASICRESP(), d2i_OCSP_RESPDATA(), d2i_OCSP_RESPID(), d2i_OCSP_SINGLERESP(), d2i_OCSP_CERTSTATUS(), d2i_OCSP_REVOKEDINFO(), and d2i_OCSP_CRLID() return an object of the respective type or NULL if an error occurs. π
The i2d_... crew are the encoders: i2d_OCSP_RESPONSE(), i2d_OCSP_RESPBYTES(), i2d_OCSP_BASICRESP(), i2d_OCSP_RESPDATA(), i2d_OCSP_RESPID(), i2d_OCSP_SINGLERESP(), i2d_OCSP_CERTSTATUS(), i2d_OCSP_REVOKEDINFO(), and i2d_OCSP_CRLID() return the number of bytes successfully encoded or a negative value if an error occurs. π₯
π SEE ALSO π
Go touch grass in these other pages, bestie:
π STANDARDS π
RFC 6960: X.509 Internet Public Key Infrastructure Online Certificate Status Protocol, section 4.2: Response Syntax
π§ HISTORY π§
These functions first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 3.2. History ate, no crumbs. π
Source/version/date sign-off: Debian, June 8, 2025 β D2I_OCSP_RESPONSE(3). Bye bestie, go encode responsibly! π
π¦ where this page comes from
- alpine 3.24: libressl-doc 4.3.1-r0 Β· custom
- arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
- Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms