gnutls_x509_crt_get_fingerprint(3)

✨ NAME ✨

gnutls_x509_crt_get_fingerprint β€” it's an API function bestie, and it's here to hand you your certificate's fingerprint πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_get_fingerprint(gnutls_x509_crt_t cert,
gnutls_digest_algorithm_t algo, void * buf, size_t * buf_size);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_crt_t cert β€” should contain a gnutls_x509_crt_t type, like that's the whole assignment ok
  • gnutls_digest_algorithm_t algo β€” is a digest algorithm, pick your fave πŸ¦‹
  • void * buf β€” a pointer to a structure to hold the fingerprint, and it may be null (we love a flexible king)
  • size_t * buf_size β€” initially holds the size of buf

πŸ’– DESCRIPTION πŸ’–

okay so this function will calculate and copy the certificate's fingerprint into the provided buffer. and what even is the fingerprint? it's a hash of the DER-encoded data of the certificate. iconic behavior honestly 🫢

and if the buffer is null then only the size will be filled. no notes, she's efficient like that ✨


πŸ‘‘ RETURNS πŸ‘‘

  • GNUTLS_E_SHORT_MEMORY_BUFFER if the provided buffer is not long enough β€” and in that case the *buf_size will be updated with the required size (so she tells you exactly how much room she needs, a considerate queen)
  • on success 0 is returned. periodt. πŸ’…

πŸ™ˆ REPORTING BUGS πŸ™ˆ

found something cursed? 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.


🌈 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 was gnutls version 3.8.13 β€” go get your fingerprint, you absolute main character, iykyk πŸŒΈπŸ¦‹πŸ’…

πŸ“¦ where this page comes from