gnutls_x509_crt_get_pk_oid(3)
π gnutls_x509_crt_get_pk_oid π
okay bestie, welcome to the gnutls manual, section 3 (that's the library-functions section, iykyk). this page is all about gnutls_x509_crt_get_pk_oid, and yes it's a whole mouthful, but it's genuinely such a useful little function. let's get into it π«Ά
β¨ NAME β¨
gnutls_x509_crt_get_pk_oid β it's an API function, periodt.
π¦ SYNOPSIS π¦
#include <gnutls/x509.h>
int gnutls_x509_crt_get_pk_oid(gnutls_x509_crt_t cert, char * oid,
size_t * oid_size);
like. look at her. so clean. π
πΈ ARGUMENTS πΈ
gnutls_x509_crt_t certβ this one should contain agnutls_x509_crt_ttype. that's the vibe. that's the assignment.char * oidβ a pointer to a buffer that's gonna hold the OID. and listen, bestie, it may be null β no pressure, she's flexible πsize_t * oid_sizeβ this one initially holds the size ofoid. keyword: initially. she's the starting point, not the whole story.
π DESCRIPTION π
so what does this queen actually do? she returns the OID of the public key algorithm on that certificate. that's it. that's the whole job. slay. β¨
and why would you ever need that, you ask? okay so here's the tea β this function is useful in the case gnutls_x509_crt_get_pk_algorithm() returned GNUTLS_PK_UNKNOWN. like, your algorithm lookup came back with nothing?? unknown?? a mystery?? don't panic β this is your backup plan, your girl in the group chat who always knows what's going on. she'll get you the OID when the other function left you on read. π
β RETURNS β
she returns zero on success, or a negative error code on error. so if you see a negative number, that's not a vibe, that's an error. check it. fr fr.
π SINCE π
available since 3.5.0 β she's been around a minute, she's established, she's got main character energy π
π REPORTING BUGS π
found a bug? not me being the bearer of bad news but β report bugs to <bugs@gnutls.org>.
home page: https://www.gnutls.org
π COPYRIGHT π
Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.
and the legal bit, which we respect: 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. iconic behaviour honestly.
π 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/
go forth and read, bestie π¦
that's the whole page!! mwah π β this was gnutls_x509_crt_get_pk_oid(3) from gnutls 3.8.13, and yeah she's giving documentation, she's giving reference material, and honestly? she ate. stay hydrated, read your man pages, and remember: GNUTLS_PK_UNKNOWN is not the end of the world, it's just the beginning of this function's whole career β¨π«Ά
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms