From: Simon Josefsson Date: Wed, 25 Aug 2004 13:14:48 +0000 (+0000) Subject: Doc fix. X-Git-Tag: gnutls_1_0_21~61 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6e6456ccd8aa59290d998224632ecf56b2fc09f;p=thirdparty%2Fgnutls.git Doc fix. --- diff --git a/includes/gnutls/extra.h b/includes/gnutls/extra.h index 2f164f57b1..4ca4d425ee 100644 --- a/includes/gnutls/extra.h +++ b/includes/gnutls/extra.h @@ -31,8 +31,23 @@ /* Openpgp certificate stuff */ -typedef int (*gnutls_openpgp_recv_key_func)(gnutls_session_t, const unsigned char *keyfpr, - unsigned int keyfpr_length, gnutls_datum_t *key); +/** + * gnutls_openpgp_recv_key_func - Callback prototype to get OpenPGP keys + * @session: a TLS session + * @keyfpr: key fingerprint + * @keyfpr_length: length of key fingerprint + * @key: output key. + * + * A callback of this type is used to retrieve OpenPGP keys. Only + * useful on the server, and will only be used if the peer send a key + * fingerprint instead of a full key. See also + * gnutls_openpgp_set_recv_key_function(). + * + */ +typedef int (*gnutls_openpgp_recv_key_func) (gnutls_session_t session, + const unsigned char *keyfpr, + unsigned int keyfpr_length, + gnutls_datum_t *key); void gnutls_openpgp_set_recv_key_function( gnutls_session_t session, gnutls_openpgp_recv_key_func func); diff --git a/lib/gnutls_alert.c b/lib/gnutls_alert.c index 3bd3f83e86..5accdd7b8d 100644 --- a/lib/gnutls_alert.c +++ b/lib/gnutls_alert.c @@ -239,24 +239,22 @@ int gnutls_error_to_alert(int err, int *level) } -/* Sends the appropriate alert, depending - * on the error message. Deprecated. May be removed. +/** + * gnutls_alert_send_appropriate - This function sends an alert to the peer depending on the error code + * @session: is a &gnutls_session_t structure. + * @err: is an integer + * + * This function is DEPRECATED, and may be removed. + * + * Sends an alert to the peer depending on the error code returned by a gnutls + * function. This function will call gnutls_error_to_alert() to determine + * the appropriate alert to send. + * + * This function may also return GNUTLS_E_AGAIN, or GNUTLS_E_INTERRUPTED. + * + * If the return value is GNUTLS_E_INVALID_REQUEST, then no alert has + * been sent to the peer. */ -/*- - * gnutls_alert_send_appropriate - This function sends an alert to the peer depending on the error code - * @session: is a &gnutls_session_t structure. - * @err: is an integer - * - * Sends an alert to the peer depending on the error code returned by a gnutls - * function. This function will call gnutls_error_to_alert() to determine - * the appropriate alert to send. - * - * This function may also return GNUTLS_E_AGAIN, or GNUTLS_E_INTERRUPTED. - * - * If the return value is GNUTLS_E_INVALID_REQUEST, then no alert has - * been sent to the peer. - * - -*/ int gnutls_alert_send_appropriate(gnutls_session_t session, int err) { int alert; diff --git a/libextra/gnutls_extra.c b/libextra/gnutls_extra.c index f33b671c3f..7865209809 100644 --- a/libextra/gnutls_extra.c +++ b/libextra/gnutls_extra.c @@ -206,12 +206,16 @@ static const char *parse_version_string(const char *s, int *major, return s; /* patchlevel */ } -/**************** - * Check that the version of the library is at minimum the requested one - * and return the version string; return NULL if the condition is not - * satisfied. If a NULL is passed to this function, no check is done, - * but the version string is simply returned. - */ +/** + * gnutls_extra_check_version - This function checks the library's version + * @req_version: the version to check + * + * Check that the version of the gnutls-extra library is at minimum + * the requested one and return the version string; return NULL if the + * condition is not satisfied. If a NULL is passed to this function, + * no check is done, but the version string is simply returned. + * + **/ const char *gnutls_extra_check_version(const char *req_version) { const char *ver = VERSION; diff --git a/libextra/gnutls_openpgp.c b/libextra/gnutls_openpgp.c index b997b0c3a6..d6f0464e1e 100644 --- a/libextra/gnutls_openpgp.c +++ b/libextra/gnutls_openpgp.c @@ -840,7 +840,18 @@ gnutls_certificate_set_openpgp_keyring_file(gnutls_certificate_credentials_t c, return gnutls_openpgp_add_keyring_file(&c->keyring, file); } - +/** + * gnutls_certificate_set_openpgp_keyring_mem - Add keyring data for OpenPGP + * @c: A certificate credentials structure + * @data: buffer with keyring data. + * @dlen: length of data buffer. + * + * The function is used to set keyrings that will be used internally + * by various OpenPGP functions. For example to find a key when it + * is needed for an operations. The keyring will also be used at the + * verification functions. + * + **/ int gnutls_certificate_set_openpgp_keyring_mem(gnutls_certificate_credentials_t c, const opaque * data,