dane_verify_crt(3)
π dane_verify_crt β the API function β¨
okay bestie, welcome to the dane_verify_crt(3) page from the gnutls manual, no cap. this is the one that checks whether a cert chain actually vibes with what DANE says it should be. buckle up π
π¦ SYNOPSIS
#include <gnutls/dane.h>
int dane_verify_crt(dane_state_t s, const gnutls_datum_t * chain,
unsigned chain_size, gnutls_certificate_type_t chain_type, const char *
hostname, const char * proto, unsigned int port, unsigned int sflags,
unsigned int vflags, unsigned int * verify);
πΈ ARGUMENTS
like, here's everybody walking into the function, one by one π
dane_state_t sβ a DANE state structure. it's giving optional, because it may beNULL.const gnutls_datum_t * chainβ a certificate chain. the whole squad.unsigned chain_sizeβ the size of the chain, i.e. how many besties are in it.gnutls_certificate_type_t chain_typeβ the type of the certificate chain.const char * hostnameβ the hostname associated with the chain.const char * protoβ the protocol of the service connecting (e.g.tcp).unsigned int portβ the port of the service connecting (e.g.443).unsigned int sflagsβ flags for the initialization ofs(ifNULL).unsigned int vflagsβ verification flags; an OR'ed list ofdane_verify_flags_t.unsigned int * verifyβ an OR'ed list ofdane_verify_status_t. this is where the tea gets reported back π«
π DESCRIPTION
so this function will verify the given certificate chain against the CA constrains and/or the certificate available via DANE. literally doing both checks at once, main character energy.
if no information via DANE can be obtained, the flag DANE_VERIFY_NO_DANE_INFO is set. and if a DNSSEC signature is not available for the DANE record then the verify flag DANE_VERIFY_NO_DNSSEC_DATA is set. π₯
now, real talk β due to the many possible options of DANE, there is no single threat model countered. so when you're notifying the user about DANE verification results, it may be better to say: DANE verification did not reject the certificate, rather than mentioning a successful DANE verification. words matter bestie, don't oversell it π
note that this function is designed to be run in addition to PKIX β certificate chain β verification. to be run independently, the DANE_VFLAG_ONLY_CHECK_EE_USAGE flag should be specified; then the function will check whether the key of the peer matches the key advertised in the DANE entry. slay.
β RETURNS
- a negative error code on error, and
DANE_E_SUCCESS(0) when the DANE entries were successfully parsed β irrespective of whether they were verified (peepverifyfor that info, that's literally what it's there for).- if no usable entries were encountered,
DANE_E_REQUESTED_DATA_NOT_AVAILABLEwill be returned.
π REPORTING BUGS
found a bug? don't suffer in silence, tell the devs:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π 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. iconic, 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/
and that's the whole page, bestie β¨ this was dane_verify_crt(3) from the gnutls manual, version 3.8.13 β go forth and verify responsibly, 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