gnutls_pkcs11_crt_is_known(3)
π gnutls_pkcs11_crt_is_known(3) π
okay bestie, welcome to the gnutls manual β this one's from the gnutls section, and it's literally the "is this cert already in the token" detector. let's get into it π«Ά
β¨ NAME β¨
gnutls_pkcs11_crt_is_known β API function. that's it, that's the name, slay π
πΈ SYNOPSIS πΈ
#include <gnutls/pkcs11.h>
unsigned gnutls_pkcs11_crt_is_known(const char * url, gnutls_x509_crt_t
cert, unsigned int flags);
π ARGUMENTS π
const char * urlβ a PKCS 11 url that identifies a token. yes it's a url, no it's not a website, iykyk πgnutls_x509_crt_t certβ is the certificate to find issuer for πunsigned int flagsβ use zero, or flags fromGNUTLS_PKCS11_OBJ_FLAGπ
π¦ DESCRIPTION π¦
so this function will check whether the provided certificate is stored in the specified token. vibe check for your cert, fr fr β¨
this is useful in combination with GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_TRUSTED or GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_DISTRUSTED, to check whether a CA is present or a certificate is distrusted in a trust PKCS 11 module. like, is this CA in the group chat or has it been kicked out π
this function can be used with a url of "pkcs11:", and in that case all modules will be searched. to restrict the modules to the marked as trusted in p11-kit use the GNUTLS_PKCS11_OBJ_FLAG_PRESENT_IN_TRUSTED_MODULE flag. no cap, it'll go through every single module if you don't narrow it down.
note that the flag GNUTLS_PKCS11_OBJ_FLAG_RETRIEVE_DISTRUSTED is specific to p11-kit trust modules. like, that's a p11-kit-exclusive behaviour, don't come for anyone else π
β RETURNS β
if the certificate exists non-zero is returned, otherwise zero. so: found = not zero, not found = zero. main character energy either way π
π SINCE π
3.3.0 β old money, lowkey iconic π
π REPORTING BUGS π
report bugs to <bugs@gnutls.org>. home page: https://www.gnutls.org
like, tell them, don't just suffer in silence bestie π«Ά
π 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. generous queen 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 read it, it's giving comprehensive π
and that's the whole page, bestie β this was gnutls_pkcs11_crt_is_known(3) from gnutls version 3.8.13. mwah, go check your tokens, ily πππ¦
π¦ 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