gnutls_register_custom_url(3)

πŸ’– gnutls_register_custom_url(3) πŸ’–

okay so bestie, welcome to the gnutls manual page for gnutls_register_custom_url β€” she's an API function and she's lowkey a whole vibe. pull up a chair, we're registering custom URLs today and it's gonna be iconic ✨


🌸 NAME 🌸

gnutls_register_custom_url β€” literally just an API function, that's her whole job title πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/urls.h>

int gnutls_register_custom_url(const gnutls_custom_url_st * st);

πŸŽ€ ARGUMENTS πŸŽ€

  • const gnutls_custom_url_st * st β€” a gnutls_custom_url_st structure. yes bestie, that exact struct, no substitutions 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she DO? she registers a custom URL. periodt. and registering that URL is gonna ripple through the whole friend group, because it affects all of these functions:

  • gnutls_url_is_supported()
  • gnutls_privkey_import_url()
  • gnutls_pubkey_import_url
  • gnutls_x509_crt_import_url()

…and literally every single function that depends on them, e.g. gnutls_certificate_set_x509_key_file2(). it's giving main character energy radiating outward, no cap πŸ”₯

⚠️ okay this part is important, don't scroll past it: the provided structure and callback functions must be valid throughout the lifetime of the process. like, the WHOLE lifetime. if they go out of scope on you it's over, bestie 😭

trying to register an existing URL type? it's gonna fail with GNUTLS_E_INVALID_REQUEST. not a vibe. but here's the glow-up: since GnuTLS 3.5.0 this function can be used to override the builtin URLs πŸ‘‘

and um. one more thing. this function is not thread safe. not me warning you about the chaos πŸ™ˆ


πŸ’œ RETURNS πŸ’œ

returns zero if the given structure was imported, or a negative value otherwise. that's it, that's the tea ⭐


🌈 SINCE 🌈

3.4.0 β€” she's been around, she's a legend, she ate πŸ’…


πŸ› REPORTING BUGS πŸ›

found a bug? don't be shy, tell the devs:


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. (slay, free as in freedom πŸ•ŠοΈ)


πŸ“ 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 lil masterpiece comes to you from gnutls, version 3.8.13, and yeah β€” go register those custom URLs, you absolute icon πŸ§šπŸ’–βœ¨

πŸ“¦ where this page comes from