]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
*** empty log message ***
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 13 Nov 2003 09:59:30 +0000 (09:59 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Thu, 13 Nov 2003 09:59:30 +0000 (09:59 +0000)
lib/auth_cert.c
lib/ext_max_record.c
lib/gnutls_extensions.c
lib/gnutls_int.h
src/cli.c

index b25a6937aecd9c6e92dd7f967351985c0631c1ef..40e20f57d089dc0b2f6da2b5889155968d67944f 100644 (file)
@@ -1212,8 +1212,12 @@ int _gnutls_gen_cert_server_cert_req(gnutls_session session,
 }
 
 
-/* This function will return the appropriate certificate to use. The return
- * value depends on the side (client or server).
+/* This function will return the appropriate certificate to use. 
+ * Fills in the apr_cert_list, apr_cert_list_length and apr_pkey.
+ * The return value is a negative value on error.
+ *
+ * It is normal to return 0 with no certificates in client side.
+ *
  */
 int _gnutls_find_apr_cert(gnutls_session session,
                          gnutls_cert ** apr_cert_list,
index 0b00f4b0af0d4ef6a0d28ad66638f70193d0fecd..59e31590f88e73a0712afe6c607432708a4a9e60 100644 (file)
@@ -93,8 +93,6 @@ int _gnutls_max_record_send_params( gnutls_session session, opaque* data,
        if (session->security_parameters.entity == GNUTLS_CLIENT) {
 
                if (session->internals.proposed_record_size != DEFAULT_MAX_RECORD_SIZE) {
-                       gnutls_assert();
-                       
                        len = 1;
                        if (data_size < len) {
                                gnutls_assert();
index 256f5f6da4d76910b7d654fd6ed16d5db4f713e1..179f09cdf75b9cdf6943e7f23e9aa51f053af00f 100644 (file)
@@ -104,7 +104,7 @@ int next, ret;
 int pos=0;
 uint16 type;
 const opaque* sdata;
-int (*ext_func_recv)( gnutls_session, const opaque*, int);
+ext_recv_func ext_recv;
 uint16 size;
 
 #ifdef DEBUG
@@ -144,9 +144,9 @@ int i;
                sdata = &data[pos];
                pos+=size;
                
-               ext_func_recv = _gnutls_ext_func_recv(type);
-               if (ext_func_recv == NULL) continue;
-               if ( (ret=ext_func_recv( session, sdata, size)) < 0) {
+               ext_recv = _gnutls_ext_func_recv(type);
+               if (ext_recv == NULL) continue;
+               if ( (ret=ext_recv( session, sdata, size)) < 0) {
                        gnutls_assert();
                        return ret;
                }
@@ -178,7 +178,7 @@ int next, size;
 uint16 pos=0;
 opaque sdata[1024];
 int sdata_size = sizeof(sdata);
-int (*ext_func_send)( gnutls_session, opaque*, int);
+ext_send_func ext_send;
 
 
        (*data) = gnutls_malloc(2); /* allocate size for size */
@@ -191,9 +191,9 @@ int (*ext_func_send)( gnutls_session, opaque*, int);
        next = MAX_EXT_TYPES; /* maximum supported extensions */
        do {
                next--;
-               ext_func_send = _gnutls_ext_func_send(next);
-               if (ext_func_send == NULL) continue;
-               size = ext_func_send( session, sdata, sdata_size);
+               ext_send = _gnutls_ext_func_send(next);
+               if (ext_send == NULL) continue;
+               size = ext_send( session, sdata, sdata_size);
                if (size > 0) {
                        (*data) = gnutls_realloc_fast( (*data), pos+size+4);
                        if ((*data)==NULL) {
index b8f9eac40baf260be6308dbc799d41694b7b1934..5a2e47a2ddd6d18e7b7083afff747c1301962939 100644 (file)
@@ -230,7 +230,9 @@ typedef gnutls_datum (*gnutls_db_retr_func)(void*, gnutls_datum key);
 
 typedef struct AUTH_CRED {
        gnutls_credentials_type algorithm;
-       /* the type of credentials depends on algorithm */
+
+       /* the type of credentials depends on algorithm 
+        */
        void* credentials;
        struct AUTH_CRED* next;
 } AUTH_CRED;
index 228adde0932b7fe28d55330a40d9393ca438bad8..a9d14fef5e6d0da8fcb12d26490529abacdde246 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -595,6 +595,9 @@ ssize_t socket_send(socket_st socket, const void *buffer, int buffer_size)
                        ret = send(socket.fd, buffer, buffer_size, 0);
                } while (ret == -1 && errno == EINTR);
 
+       if (ret > 0 && ret != buffer_size && quiet)
+               fprintf(stderr,
+                       "*** Only sent %d bytes instead of %d.\n", ret, buffer_size);
 
        return ret;
 }