gnutls_certificate_type_get(3)

πŸ’– gnutls_certificate_type_get(3) β€” the gnutls girlies' guide πŸ’–

okay bestie, sit down, we're doing a gnutls manual page and it's literally so much less scary than it sounds. this is the gnutls_certificate_type_get situation, straight from the gnutls manual, and yes it's giving "short and sweet" for once. let's go πŸ¦‹


✨ NAME ✨

gnutls_certificate_type_get β€” API function πŸŽ€


✨ SYNOPSIS ✨

#include <gnutls/gnutls.h>

gnutls_certificate_type_t gnutls_certificate_type_get(gnutls_session_t
session);

✨ ARGUMENTS ✨

  • gnutls_session_t session β€” bestie, it's a gnutls_session_t type. that's it, that's the whole argument. iconic minimalism πŸ’…

✨ DESCRIPTION ✨

so what does this function actually do? it hands you back the type of the certificate that got negotiated for this side to send over to the peer. like, the cert type your side is planning to yeet across the connection. 🫢

by default, the certificate type is X.509 β€” that's the standard, the default, the main character. the only way you get something else is if an alternative certificate type got enabled by gnutls_init() and then actually negotiated during the session. no negotiation, no alternative, no drama. πŸ”₯

now, resumed sessions? they stay loyal. a resumed session will return the certificate type that was negotiated and used in the original session β€” no glow-up, no changing its mind mid-resume. periodt. πŸ‘‘

and here's the tea, as of version 3.6.4 it is recommended to use gnutls_certificate_type_get2() instead, because that one is more fine-grained. so if you're on a modern version, that's your girl. ✨


✨ RETURNS ✨

it returns the currently used gnutls_certificate_type_t certificate type β€” as negotiated for 'our' side of the connection. (yes, 'our' in quotes, because perspective is everything, bestie.) 🌸


✨ REPORTING BUGS ✨

found a bug? don't suffer in silence, tell the people πŸ›


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.


✨ 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, no cap. this one shipped in gnutls 3.8.13 β€” go forth and read your cert types with confidence. slay πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from