From: Nikos Mavrogiannopoulos Date: Thu, 13 Nov 2003 09:59:30 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: gnutls_0_9_98~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a2efeaa183d3b3eed279541ff6c851bc75e7e21f;p=thirdparty%2Fgnutls.git *** empty log message *** --- diff --git a/lib/auth_cert.c b/lib/auth_cert.c index b25a6937ae..40e20f57d0 100644 --- a/lib/auth_cert.c +++ b/lib/auth_cert.c @@ -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, diff --git a/lib/ext_max_record.c b/lib/ext_max_record.c index 0b00f4b0af..59e31590f8 100644 --- a/lib/ext_max_record.c +++ b/lib/ext_max_record.c @@ -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(); diff --git a/lib/gnutls_extensions.c b/lib/gnutls_extensions.c index 256f5f6da4..179f09cdf7 100644 --- a/lib/gnutls_extensions.c +++ b/lib/gnutls_extensions.c @@ -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) { diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index b8f9eac40b..5a2e47a2dd 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -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; diff --git a/src/cli.c b/src/cli.c index 228adde093..a9d14fef5e 100644 --- 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; }