@showfuncdesc{gnutls_verify_stored_pubkey}
@showfuncdesc{gnutls_store_pubkey}
+The storage and verification functions may be used with the default
+text file based backend, or another backend may be specified. Such
+backend should contain a storage and a retrieval function. The format
+of those functions is shown below.
+@example
+ typedef int (*gnutls_trust_db_store_func) (const char* db_name,
+ const char* host,
+ const char* service,
+ time_t expiration,
+ const gnutls_datum_t* pubkey);
+
+ typedef int (*gnutls_trust_db_retr_func) (const char* db_name,
+ const char* host,
+ const char* service,
+ const gnutls_datum_t *pubkey);
+
+ typedef struct {
+ gnutls_trust_db_store_func store;
+ gnutls_trust_db_retr_func retrieve;
+ } trust_storage_st;
+@end example
+
@node OpenPGP certificates
@section @acronym{OpenPGP} certificates
@cindex OpenPGP certificates
gnutls_trust_db_store_func store;
gnutls_trust_db_retr_func retrieve;
} trust_storage_st;
-
+
int gnutls_verify_stored_pubkey(const char* db_name,
const trust_storage_st * tdb,
const char* host,
* a list of stored public keys. The @service field if non-NULL should
* be a port number.
*
- * The @tdb variable if non-null specifies a custom back-end for
+ * The @tdb variable if non-null specifies a custom backend for
* the storage and retrieval of entries. If it is NULL then the
- * default file back-end will be used. In POSIX-like systems the
- * file back-end uses the $HOME/.gnutls/known_hosts file.
+ * default file backend will be used. In POSIX-like systems the
+ * file backend uses the $HOME/.gnutls/known_hosts file.
*
- * Note that if the custom storage back-end is provided the
+ * Note that if the custom storage backend is provided the
* retrieval function should return %GNUTLS_E_CERTIFICATE_KEY_MISMATCH
* if the host/service pair is found but key doesn't match,
* %GNUTLS_E_NO_CERTIFICATE_FOUND if no such host/service with
* the list of stored public keys. The key will be considered valid until
* the provided expiration time.
*
- * The @tdb variable if non-null specifies a custom back-end for
+ * The @tdb variable if non-null specifies a custom backend for
* the storage and retrieval of entries. If it is NULL then the
- * default file back-end will be used.
+ * default file backend will be used.
*
* Note that this function is not thread safe with the default backend.
*