GNUTLS_CERTIFICATE_SET_OCSP_STATUS_REQUEST_MEM(3)
β¨ NAME β¨
gnutls_certificate_set_ocsp_status_request_mem β bestie, it's an API function π
This one lives in the gnutls manual (section 3, the library-functions girlies), so if you were looking for a command to run in your shell... no babe, this is C code you call. π«Ά
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
int
gnutls_certificate_set_ocsp_status_request_mem(gnutls_certificate_credentials_t
sc, const gnutls_datum_t * resp_data, unsigned idx,
gnutls_x509_crt_fmt_t fmt);
π ARGUMENTS π
gnutls_certificate_credentials_t scβ okay so this is your credentials structure. The main character. πconst gnutls_datum_t * resp_dataβ a memory buffer holding an OCSP response. It's giving "I brought the receipts" but the receipts are literally in RAM. π§ β¨unsigned idxβ the certificate index, as returned bygnutls_certificate_set_key()and friends (you know, the whole friend group π―).gnutls_x509_crt_fmt_t fmtβ it's PEM or DER, pick your fighter. π₯
π¦ DESCRIPTION π¦
So what this function does, bestie, is it sets the OCSP responses to be sent to the peer for the certificate chain specified by idx. No cap. π¨
And listen β when fmt is set to PEM, you can load multiple responses at once. Slay. π
π NOTE π
Okay this part is important, don't skip it, I'm being so serious right now. π
The ability to set multiple OCSP responses per credential structure via the index idx was added in version 3.5.6. And to keep backwards compatibility, it requires using gnutls_certificate_set_flags() with the GNUTLS_CERTIFICATE_API_V2 flag, which is what makes the set certificate functions return an index that this function can actually use. It's giving "you gotta opt in, the old ways still gotta work." π
This function must be called after setting any certificates, and it cannot be used for certificates that are provided via a callback β that is, when gnutls_certificate_set_retrieve_function() is used. So if you're on the callback route, this is not the vibe for you, sorry babe. π
You can call this function multiple times when multiple responses which apply to the certificate chain are available. Obsessed with the flexibility, honestly. π
And now the plot twists:
- If the response provided does not match any certificates present in the chain, the code
GNUTLS_E_OCSP_MISMATCH_WITH_CERTSis returned. Mismatch. Not the moment. π - If the response is already expired at the time of loading, the code
GNUTLS_E_EXPIREDis returned. It's giving "girl you're late, the party's over." β
β RETURNS β
On success, you get the number of loaded responses back. Otherwise, it's a negative error code β a little frown, an L, a "not today." π
π SINCE π
3.6.3 β a classic, an icon, been here since then. π
π REPORTING BUGS π
Found a bug? Tell the girlies at <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. (Translation: go off, share it, just keep the receipts. π)
π₯ 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 β gnutls 3.8.13, page gnutls_certific...tus_request_mem(3). Go forth and set those OCSP responses, you absolute legend. π
β¨π¦πΈπ
π¦ 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