From: Nikos Mavrogiannopoulos Date: Tue, 5 Jun 2001 08:34:13 +0000 (+0000) Subject: updated documentation and functions X-Git-Tag: gnutls_0_1_4~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2dfc64b45e825cf2e972260a2e1d43a246156e18;p=thirdparty%2Fgnutls.git updated documentation and functions --- diff --git a/lib/gnutls.c b/lib/gnutls.c index 6c93461106..9c32fb3204 100644 --- a/lib/gnutls.c +++ b/lib/gnutls.c @@ -401,14 +401,15 @@ int _gnutls_send_alert(int cd, GNUTLS_STATE state, AlertLevel level, AlertDescri } /** - * gnutls_close - This function terminates the current TLS/SSL connection. + * gnutls_bye - This function terminates the current TLS/SSL connection. * @cd: is a connection descriptor. * @state: is a &GNUTLS_STATE structure. * * Terminates the current TLS/SSL connection. If the return value is 0 - * you may continue using the TCP connection. + * you may continue using the TCP connection. The connection should + * have been initiated using gnutls_handshake() or similar function. **/ -int gnutls_close(int cd, GNUTLS_STATE state) +int gnutls_bye(int cd, GNUTLS_STATE state) { int ret; diff --git a/lib/gnutls.h.in b/lib/gnutls.h.in index 157224a703..24f7862cca 100644 --- a/lib/gnutls.h.in +++ b/lib/gnutls.h.in @@ -41,6 +41,8 @@ typedef enum AlertDescription { GNUTLS_CLOSE_NOTIFY, GNUTLS_UNEXPECTED_MESSAGE=1 #define GNUTLS_TLS1 0 #define GNUTLS_SSL3 1 +#define LIST ... + struct GNUTLS_STATE_INT; typedef struct GNUTLS_STATE_INT* GNUTLS_STATE; @@ -48,10 +50,10 @@ typedef struct GNUTLS_STATE_INT* GNUTLS_STATE; int gnutls_init(GNUTLS_STATE * state, ConnectionEnd con_end); int gnutls_deinit(GNUTLS_STATE state); -int gnutls_close(int cd, GNUTLS_STATE state); +int gnutls_bye(int cd, GNUTLS_STATE state); int gnutls_handshake(int cd, GNUTLS_STATE state); int gnutls_check_pending(GNUTLS_STATE state); -int gnutls_send_hello_request(int cd, GNUTLS_STATE state); +int gnutls_rehandshake(int cd, GNUTLS_STATE state); AlertDescription gnutls_get_last_alert( GNUTLS_STATE state); diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index 3a30045ae9..976a775a00 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -673,7 +673,7 @@ int _gnutls_recv_handshake(int cd, GNUTLS_STATE state, uint8 ** data, } /** - * gnutls_send_hello_request - This function will renegotiate security parameters + * gnutls_rehandshake - This function will renegotiate security parameters * @cd: is a connection descriptor, as returned by socket(). * @state: is a a &GNUTLS_STATE structure. * @@ -684,7 +684,7 @@ int _gnutls_recv_handshake(int cd, GNUTLS_STATE state, uint8 ** data, * GNUTLS_E_WARNING_ALERT_RECEIVED and the alert will be * GNUTLS_NO_RENEGOTIATION. **/ -int gnutls_send_hello_request(int cd, GNUTLS_STATE state) +int gnutls_rehandshake(int cd, GNUTLS_STATE state) { int ret; diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index 9350f19c37..b7167613a1 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -31,6 +31,8 @@ #define DEBUG */ +#define LIST ... + #define MAX32 4294967295 #define MAX24 16777215 #define MAX16 65535 diff --git a/lib/gnutls_priority.c b/lib/gnutls_priority.c index c07060f93a..0679ecc4e1 100644 --- a/lib/gnutls_priority.c +++ b/lib/gnutls_priority.c @@ -27,7 +27,7 @@ /** * gnutls_set_cipher_priority - Sets the priority on the ciphers supported by gnutls. * @state: is a &GNUTLS_STATE structure. - * @...: is a 0 terminated list of BulkCipherAlgorithm elements. + * @LIST: is a 0 terminated list of BulkCipherAlgorithm elements. * * Sets the priority on the ciphers supported by gnutls. * Priority is higher for ciphers specified before others. @@ -36,7 +36,7 @@ * not use the algorithm's priority except for disabling * algorithms that were not specified. **/ -void gnutls_set_cipher_priority( GNUTLS_STATE state, ...) { +void gnutls_set_cipher_priority( GNUTLS_STATE state, LIST) { va_list ap; int i, num=0; @@ -66,7 +66,7 @@ void gnutls_set_cipher_priority( GNUTLS_STATE state, ...) { /** * gnutls_set_kx_priority - Sets the priority on the key exchange algorithms supported by gnutls. * @state: is a &GNUTLS_STATE structure. - * @...: is a 0 terminated list of KXAlgorithm elements. + * @LIST: is a 0 terminated list of KXAlgorithm elements. * * Sets the priority on the key exchange algorithms supported by gnutls. * Priority is higher for algorithms specified before others. @@ -75,7 +75,7 @@ void gnutls_set_cipher_priority( GNUTLS_STATE state, ...) { * not use the algorithm's priority except for disabling * algorithms that were not specified. **/ -void gnutls_set_kx_priority( GNUTLS_STATE state, ...) { +void gnutls_set_kx_priority( GNUTLS_STATE state, LIST) { va_list ap; int i, num=0; @@ -105,7 +105,7 @@ void gnutls_set_kx_priority( GNUTLS_STATE state, ...) { /** * gnutls_set_mac_priority - Sets the priority on the mac algorithms supported by gnutls. * @state: is a &GNUTLS_STATE structure. - * @...: is a 0 terminated list of MACAlgorithm elements. + * @LIST: is a 0 terminated list of MACAlgorithm elements. * * Sets the priority on the mac algorithms supported by gnutls. * Priority is higher for algorithms specified before others. @@ -114,7 +114,7 @@ void gnutls_set_kx_priority( GNUTLS_STATE state, ...) { * not use the algorithm's priority except for disabling * algorithms that were not specified. **/ -void gnutls_set_mac_priority( GNUTLS_STATE state, ...) { +void gnutls_set_mac_priority( GNUTLS_STATE state, LIST) { va_list ap; int i, num=0; @@ -144,7 +144,7 @@ void gnutls_set_mac_priority( GNUTLS_STATE state, ...) { /** * gnutls_set_compression_priority - Sets the priority on the compression algorithms supported by gnutls. * @state: is a &GNUTLS_STATE structure. - * @...: is a 0 terminated list of CompressionMethod elements. + * @LIST: is a 0 terminated list of CompressionMethod elements. * * Sets the priority on the compression algorithms supported by gnutls. * Priority is higher for algorithms specified before others. @@ -153,7 +153,7 @@ void gnutls_set_mac_priority( GNUTLS_STATE state, ...) { * not use the algorithm's priority except for disabling * algorithms that were not specified. **/ -void gnutls_set_compression_priority( GNUTLS_STATE state, ...) { +void gnutls_set_compression_priority( GNUTLS_STATE state, LIST) { va_list ap; int i, num=0; diff --git a/lib/gnutls_priority.h b/lib/gnutls_priority.h index 500c35c4e0..fe01235ce8 100644 --- a/lib/gnutls_priority.h +++ b/lib/gnutls_priority.h @@ -18,7 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ -void gnutls_set_cipher_priority( GNUTLS_STATE state, ...); -void gnutls_set_kx_priority( GNUTLS_STATE state, ...); -void gnutls_set_mac_priority( GNUTLS_STATE state, ...); -void gnutls_set_compression_priority( GNUTLS_STATE state, ...); +void gnutls_set_cipher_priority( GNUTLS_STATE state, LIST); +void gnutls_set_kx_priority( GNUTLS_STATE state, LIST); +void gnutls_set_mac_priority( GNUTLS_STATE state, LIST); +void gnutls_set_compression_priority( GNUTLS_STATE state, LIST); diff --git a/src/Makefile.am b/src/Makefile.am index a8478f3fe4..780b912648 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = port.h prime.gaa crypt.gaa crypt-gaa.h README.crypt prime-gaa.h README +EXTRA_DIST = port.h prime.gaa crypt.gaa crypt-gaa.h README.crypt prime-gaa.h README tpasswd tpasswd.conf INCLUDES = -I../lib noinst_PROGRAMS = serv cli crypt prime serv_SOURCES = serv.c