1gnutls_verify_stored_pubkey(3)      gnutls      gnutls_verify_stored_pubkey(3)
2
3
4

NAME

6       gnutls_verify_stored_pubkey - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       int gnutls_verify_stored_pubkey(const char * db_name, gnutls_tdb_t tdb,
12       const char * host,  const  char  *  service,  gnutls_certificate_type_t
13       cert_type, const gnutls_datum_t * cert, unsigned int flags);
14

ARGUMENTS

16       const char * db_name
17                   A  file  specifying  the  stored  keys  (use  NULL  for the
18                   default)
19
20       gnutls_tdb_t tdb
21                   A storage structure or NULL to use the default
22
23       const char * host
24                   The peer's name
25
26       const char * service
27                   non-NULL if this key is specific to a service (e.g. http)
28
29       gnutls_certificate_type_t cert_type
30                   The type of the certificate
31
32       const gnutls_datum_t * cert
33                   The raw (der) data of the certificate
34
35       unsigned int flags
36                   should be 0.
37

DESCRIPTION

39       This function will try to verify the provided (raw or DER-encoded) cer‐
40       tificate  using  a  list  of stored public keys.  The  service field if
41       non-NULL should be a port number.
42
43       The  retrieve variable if non-null specifies a custom backend  for  the
44       retrieval  of entries. If it is NULL then the default file backend will
45       be  used.  In  POSIX-like   systems   the   file   backend   uses   the
46       $HOME/.gnutls/known_hosts file.
47
48       Note that if the custom storage backend is provided the retrieval func‐
49       tion should return GNUTLS_E_CERTIFICATE_KEY_MISMATCH if  the  host/ser‐
50       vice pair is found but key doesn't match, GNUTLS_E_NO_CERTIFICATE_FOUND
51       if no such host/service with the given key is found, and 0  if  it  was
52       found. The storage function should return 0 on success.
53

RETURNS

55       If no associated public key is found then GNUTLS_E_NO_CERTIFICATE_FOUND
56       will be returned. If a key is found but does  not  match  GNUTLS_E_CER‐
57       TIFICATE_KEY_MISMATCH  is returned. On success, GNUTLS_E_SUCCESS (0) is
58       returned, or a negative error value on other errors.
59

SINCE

61       3.0.13
62

REPORTING BUGS

64       Report bugs to <bugs@gnutls.org>.
65       Home page: http://www.gnutls.org
66
67
69       Copyright © 2001-2014 Free Software Foundation, Inc..
70       Copying and distribution of this file, with  or  without  modification,
71       are  permitted  in  any  medium  without royalty provided the copyright
72       notice and this notice are preserved.
73

SEE ALSO

75       The full documentation for gnutls is maintained as  a  Texinfo  manual.
76       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
77       visit
78
79       http://www.gnutls.org/manual/
80
81gnutls                              3.3.29      gnutls_verify_stored_pubkey(3)
Impressum