GNUTLS_CERTIFICATE_SET_OCSP_STATUS_REQUEST_FILE2(3)
π NAME π
gnutls_certificate_set_ocsp_status_request_file2 β bestie, it's an API function and it's here to load your OCSP responses from a file, no cap π
β¨ SYNOPSIS β¨
#include <gnutls/gnutls.h>
int
gnutls_certificate_set_ocsp_status_request_file2(gnutls_certificate_credentials_t
sc, const char * response_file, unsigned idx, gnutls_x509_crt_fmt_t
fmt);
πΈ ARGUMENTS πΈ
gnutls_certificate_credentials_t scβ ok so this is your credentials structure. the whole vibe lives here πconst char * response_fileβ literally just a filename. the filename of the OCSP response. that's it π¦unsigned idxβ a certificate index, and it's the same kind of index thatgnutls_certificate_set_key()and friends hand back to you β¨gnutls_x509_crt_fmt_t fmtβ it's PEM or DER. pick one, bestie π
π DESCRIPTION π
So this function loads up the OCSP responses that are gonna be sent to the peer, for the certificate chain you picked with idx. And here's the cute part: when fmt is set to PEM, you can load multiple responses at once. iconic behavior fr fr π
Timing matters, bestie! This function must be called after setting any certificates. And it cannot be used for certificates that are provided via a callback β that is, whengnutls_certificate_set_retrieve_function()is used. In that case, consider usinggnutls_certificate_set_retrieve_function3()instead. the way that's a whole different function π
You can also call this function multiple times when multiple responses applicable to the certificate chain are available. stacking responses? we love to see it π«Ά
Now for the β¨dramaβ¨ β the error codes:
- If the response you provided does not match any certificates present in the chain, you get
GNUTLS_E_OCSP_MISMATCH_WITH_CERTSback. mismatch, not me π - If the response is already expired at the time of loading, you get
GNUTLS_E_EXPIREDback. expired? in this economy? π
π RETURNS π
On success, you get the number of loaded responses returned to you. slay. otherwise you get a negative error code. sad girl hours π§οΈ
β SINCE β
3.1.3 β vintage, honestly. a classic π°οΈ
π REPORTING BUGS π
Found a bug? Don't just sit there, tell the gnutls girlies:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. fr fr, that's the whole license and it's lowkey generous π
π¦ SEE ALSO π¦
The full documentation for gnutls is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit
https://www.gnutls.org/manual/
and that's the whole page, bestie π
this was the gnutls_certificate_set_ocsp_status_request_file2 page from the gnutls manual, version 3.8.13 β thanks for reading, ily, go load some OCSP responses responsibly πβ¨
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms