gnutls_pkcs11_token_get_ptr(3)
π NAME π
gnutls_pkcs11_token_get_ptr β ok bestie, this is an API function from the gnutls manual and it's about grabbing the raw function pointer for a PKCS#11 token, no cap π
β¨ SYNOPSIS β¨
#include <gnutls/pkcs11.h>
int gnutls_pkcs11_token_get_ptr(const char * url, void ** ptr, unsigned
long * slot_id, unsigned int flags);
like. that's the whole vibe. one header, one function, four args, periodt π
π«Ά ARGUMENTS π«Ά
const char * urlβ this one should contain a PKCS11 URL that identifies a token πΈ so like, you're telling it which token you want, iykykvoid ** ptrβ on the way out this will contain theCK_FUNCTION_LIST_PTRpointer β that's the actual good stuff right thereunsigned long * slot_idβ this will contain theslot_idπ¦ and heads up: it may beNULL, so it's optional, she's flexible πunsigned int flagsβ should be zero π that's it. zero. nothing else. don't be creative with it bestie
π§ DESCRIPTION π§
Okay so here's the tea β β this function will return the function pointer of the specified token by the URL. You hand it a URL, it hands you back the function pointer for that token, and you go off and do your little PKCS#11 things with it. Iconic behaviour honestly π
BUT. and this is the important part, the part where you listen to me β the returned pointers are valid until gnutls is deinitialized, c.f. _global_deinit(). So the moment gnutls gets deinitialized, those pointers are gone gone, they are not yours anymore, do not touch them, do not keep them in a little jar π it's giving expired milk. use them before then or perish π
π₯ RETURNS π₯
GNUTLS_E_SUCCESS(0) on success π she ate- or a negative error code on error π and if that happens, bestie, check your URL, it's probably not the vibe
π SINCE π
3.6.3 β she's been here since 3.6.3, a whole elder, respect her π
β¨
π REPORTING BUGS π
Found a bug? Report bugs to <bugs@gnutls.org> π§
Home page: https://www.gnutls.org π
They want to hear about it fr fr, don't just suffer in silence π«Ά
π COPYRIGHT π
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, copy 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/
like, that's the plug. go read it πΈ
k bye bestie, this page is from gnutls 3.8.13 and it's the gnutls_pkcs11_token_get_ptr(3) page, mwah πβ¨
π¦ 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