gnutls_x509_crt_get_pk_ecc_raw(3)

✨ gnutls_x509_crt_get_pk_ecc_raw(3) ✨

okay bestie so this is a page from the gnutls manual, and today's main character is gnutls_x509_crt_get_pk_ecc_raw πŸ’– it's an API function, and it's about pulling the elliptic-curve public key parameters out of a certificate. yes, that kind of certificate. let's go πŸ¦‹


🌸 NAME 🌸

gnutls_x509_crt_get_pk_ecc_raw β€” literally just, API function πŸ’… no cap.


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509.h>

int gnutls_x509_crt_get_pk_ecc_raw(gnutls_x509_crt_t crt,
gnutls_ecc_curve_t * curve, gnutls_datum_t * x, gnutls_datum_t * y);

like. look at her. four arguments, one return value, zero drama 🌈


πŸ’œ ARGUMENTS πŸ’œ

  • gnutls_x509_crt_t crt β€” holds the certificate. she's the one carrying the whole thing, respect her πŸ‘‘
  • gnutls_ecc_curve_t * curve β€” will hold the curve. yep, she gets filled in for you ✨
  • gnutls_datum_t * x β€” will hold the x-coordinate πŸ“
  • gnutls_datum_t * y β€” will hold the y-coordinate πŸ’–

🧚 DESCRIPTION 🧚

so this function will export the ECC public key's parameters found in the given certificate. that's it, that's the vibe.

the new parameters will be allocated using gnutls_malloc() and will be stored in the appropriate datum. so like, you own that memory now β€” that's a you problem, bestie, don't forget to free it πŸ™ˆ

and here's the lil plot twist: in EdDSA curves the y parameter will be NULL and the other parameters will be in the native format for the curve. not me finding that out the hard way 😭 it's giving "the rules are different here" and honestly? iconic.

⭐ RETURNS ⭐

GNUTLS_E_SUCCESS on success β€” slay πŸ’… otherwise a negative error code, which is the universe's way of saying "no <3" πŸ’€


πŸ¦‹ SINCE πŸ¦‹

3.4.1 β€” she's been around, she's not new here, lowkey a legend ⭐


😀 REPORTING BUGS 😀

found a bug? not the cute kind? report it, fr fr:


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. so like, go off, share it, just keep the receipts 🫢


🌈 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 was gnutls 3.8.13 energy, mwah, go read your certificate's curves, stay hydrated, and remember: free your datums πŸŽ€βœ¨

πŸ“¦ where this page comes from