From: Nikos Mavrogiannopoulos Date: Tue, 28 May 2002 10:23:17 +0000 (+0000) Subject: Minor fixes. Added documentation for gnutls_certificate_set_openpgp_trustdb() function. X-Git-Tag: gnutls_0_4_with_libtasn1~44 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=443b4c636a5d5955bf8abfe3cd944abe341c91e2;p=thirdparty%2Fgnutls.git Minor fixes. Added documentation for gnutls_certificate_set_openpgp_trustdb() function. --- diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c index 8a85ff87de..a08d4136b2 100644 --- a/libextra/gnutls_openpgp.c +++ b/libextra/gnutls_openpgp.c @@ -1490,6 +1490,7 @@ gnutls_certificate_set_openpgp_keyserver(GNUTLS_CERTIFICATE_CREDENTIALS res, if (!port) port = 11371; + gnutls_free( res->pgp_key_server); res->pgp_key_server = gnutls_strdup( keyserver ); if ( res->pgp_key_server == NULL) return GNUTLS_E_MEMORY_ERROR; @@ -1499,7 +1500,15 @@ gnutls_certificate_set_openpgp_keyserver(GNUTLS_CERTIFICATE_CREDENTIALS res, return 0; } -int +/** + * gnutls_certificate_set_openpgp_trustdb - Used to set an GnuPG trustdb + * @res: the destination context to save the data. + * @trustdb: is the trustdb filename + * + * This funtion will set a GnuPG trustdb which will be used in key + * verification functions. Only version 3 trustdb files are supported. + * + **/int gnutls_certificate_set_openpgp_trustdb( GNUTLS_CERTIFICATE_CREDENTIALS res, char* trustdb ) { @@ -1511,6 +1520,8 @@ gnutls_certificate_set_openpgp_trustdb( GNUTLS_CERTIFICATE_CREDENTIALS res, format is still used. We don't support this format. */ return GNUTLS_E_OPENPGP_TRUSTDB_VERSION_UNSUPPORTED; } + + gnutls_free( res->pgp_trustdb); res->pgp_trustdb = gnutls_strdup( trustdb ); if ( res->pgp_trustdb==NULL ) return GNUTLS_E_MEMORY_ERROR;