gnutls_x509_crq_export(3)
β¨ NAME β¨
gnutls_x509_crq_export β bestie, it's literally the API function that turns your certificate request into bytes π (from the gnutls manual, iykyk)
π SYNOPSIS π
#include <gnutls/x509.h>
int gnutls_x509_crq_export(gnutls_x509_crq_t crq, gnutls_x509_crt_fmt_t
format, void * output_data, size_t * output_data_size);
π ARGUMENTS π
gnutls_x509_crq_t crqβ okay so this one should contain agnutls_x509_crq_ttype, that's the whole vibe π¦gnutls_x509_crt_fmt_t formatβ the format of the output params, and it's giving one ofPEMorDER, no in-between πvoid * output_dataβ will contain a certificate request,PEMorDERencoded, so like, that's where it lands β¨size_t * output_data_sizeβ holds the size ofoutput_data, and lowkey it gets replaced by the actual size of parameters afterwards π
π DESCRIPTION π
So this function will export the certificate request to a PEM or DER encoded PKCS10 structure. Periodt.
If the buffer you provided is not long enough to hold the output, then GNUTLS_E_SHORT_MEMORY_BUFFER will be returned and * output_data_size will be updated. Not me warning you about the buffer size, bestie, but like, fr fr check it π
If the structure is PEM encoded, it will have a header of "BEGIN NEW CERTIFICATE REQUEST". That's iconic, that's the whole main character energy of the output π
β RETURNS β
On success, GNUTLS_E_SUCCESS (0) is returned β slay π β otherwise a negative error value. So like, if it's negative, something went off and you should go look at it, ngl.
π REPORTING BUGS π
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. (Yes bestie, keep the notice, it's literally the rule π )
π 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/
Okay so that's the whole page, and if you got all the way here: obsessed with you π₯°
signing off with love from the gnutls manual, version 3.8.13, and the gnutls_x509_crq_export(3) page itself β mwah, take care of your buffers bestie π
π¦ 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