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 a gnutls_x509_crq_t type, that's the whole vibe πŸ¦‹
  • gnutls_x509_crt_fmt_t format β€” the format of the output params, and it's giving one of PEM or DER, no in-between πŸ’€
  • void * output_data β€” will contain a certificate request, PEM or DER encoded, so like, that's where it lands ✨
  • size_t * output_data_size β€” holds the size of output_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 Β© 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