]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Doc fix.
authorSimon Josefsson <simon@josefsson.org>
Wed, 25 Aug 2004 13:14:48 +0000 (13:14 +0000)
committerSimon Josefsson <simon@josefsson.org>
Wed, 25 Aug 2004 13:14:48 +0000 (13:14 +0000)
includes/gnutls/extra.h
lib/gnutls_alert.c
libextra/gnutls_extra.c
libextra/gnutls_openpgp.c

index 2f164f57b133fc7b61ca6441296dd12be9e053c6..4ca4d425ee2572ae678fdb5420823b35d8bc5d9f 100644 (file)
 /* 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);
index 3bd3f83e86eb2d7937a6e2e84e095d4e8e029b1e..5accdd7b8d7d6cc1ff0f563a985e507c6c610c85 100644 (file)
@@ -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;
index f33b671c3f61e12cfd5c0487b3b51e0bd28a4a32..78652098090c33624373b8acceb8d8b5ee7819e0 100644 (file)
@@ -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;
index b997b0c3a6166a34cd30232165006caade04cf6a..d6f0464e1e6fdaa344b371087bdfa9914c9ba9f0 100644 (file)
@@ -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,