1gnutls_store_pubkey(3) gnutls gnutls_store_pubkey(3)
2
3
4
6 gnutls_store_pubkey - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_store_pubkey(const char * db_name, gnutls_tdb_t tdb, const
12 char * host, const char * service, gnutls_certificate_type_t cert_type,
13 const gnutls_datum_t * cert, time_t expiration, unsigned int flags);
14
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 data of the certificate
34
35 time_t expiration
36 The expiration time (use 0 to disable expiration)
37
38 unsigned int flags
39 should be 0.
40
42 This function will store the provided (raw or DER-encoded) certificate
43 to the list of stored public keys. The key will be considered valid
44 until the provided expiration time.
45
46 The store variable if non-null specifies a custom backend for the
47 storage of entries. If it is NULL then the default file backend will be
48 used.
49
51 On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative
52 error value.
53
55 3.0.13
56
58 Report bugs to <bugs@gnutls.org>.
59 Home page: http://www.gnutls.org
60
61
63 Copyright © 2001-2014 Free Software Foundation, Inc..
64 Copying and distribution of this file, with or without modification,
65 are permitted in any medium without royalty provided the copyright
66 notice and this notice are preserved.
67
69 The full documentation for gnutls is maintained as a Texinfo manual.
70 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
71 visit
72
73 http://www.gnutls.org/manual/
74
75gnutls 3.3.29 gnutls_store_pubkey(3)