1gnutls_store_commitment(3) gnutls gnutls_store_commitment(3)
2
3
4
6 gnutls_store_commitment - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_store_commitment(const char * db_name, gnutls_tdb_t tdb,
12 const char * host, const char * service, gnutls_digest_algorithm_t
13 hash_algo, const gnutls_datum_t * hash, time_t expiration, unsigned int
14 flags);
15
17 const char * db_name
18 A file specifying the stored keys (use NULL for the
19 default)
20
21 gnutls_tdb_t tdb
22 A storage structure or NULL to use the default
23
24 const char * host
25 The peer's name
26
27 const char * service
28 non-NULL if this key is specific to a service (e.g. http)
29
30 gnutls_digest_algorithm_t hash_algo
31 The hash algorithm type
32
33 const gnutls_datum_t * hash
34 The raw hash
35
36 time_t expiration
37 The expiration time (use 0 to disable expiration)
38
39 unsigned int flags
40 should be 0 or GNUTLS_SCOMMIT_FLAG_ALLOW_BROKEN.
41
43 This function will store the provided hash commitment to the list of
44 stored public keys. The key with the given hash will be considered
45 valid until the provided expiration time.
46
47 The store variable if non-null specifies a custom backend for the
48 storage of entries. If it is NULL then the default file backend will be
49 used.
50
51 Note that this function is not thread safe with the default backend.
52
54 On success, GNUTLS_E_SUCCESS [22m(0) is returned, otherwise a negative
55 error value.
56
58 3.0
59
61 Report bugs to <bugs@gnutls.org>.
62 Home page: http://www.gnutls.org
63
64
66 Copyright © 2001-2018 Free Software Foundation, Inc., and others.
67 Copying and distribution of this file, with or without modification,
68 are permitted in any medium without royalty provided the copyright
69 notice and this notice are preserved.
70
72 The full documentation for gnutls is maintained as a Texinfo manual.
73 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
74 visit
75
76 http://www.gnutls.org/manual/
77
78gnutls 3.6.5 gnutls_store_commitment(3)