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 from GNUTLS_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 Β© 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