From 8cb533732b481ea9865669406aae64e4c2b9ac5e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zden=C4=9Bk=20Salvet?= Date: Fri, 24 Aug 2007 14:36:26 +0000 Subject: [PATCH] Remove SSL record aggregation since it works with SSLv3/TLSv1 only and not with client using SSLv2 Hello to initiate SSLv3/TLSv1 connection (which GSI requires anyway). Should fix bug #29017. --- org.glite.security.gsoap-plugin/src/glite_gss.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/org.glite.security.gsoap-plugin/src/glite_gss.c b/org.glite.security.gsoap-plugin/src/glite_gss.c index 359c54c..c2c34f9 100644 --- a/org.glite.security.gsoap-plugin/src/glite_gss.c +++ b/org.glite.security.gsoap-plugin/src/glite_gss.c @@ -317,12 +317,6 @@ end: return ret; } -#define SSL_TOKEN_HEADER_LENGTH 5 -static size_t ssl_token_length(char *t, int tl) { - unsigned char *b = t; - return (((size_t)(b[3]) << 8) | b[4]) + 5; -} - static int recv_token(int sock, void **token, size_t *token_length, struct timeval *to) { @@ -331,7 +325,6 @@ recv_token(int sock, void **token, size_t *token_length, struct timeval *to) char *t = NULL; char *tmp; size_t tl = 0; - size_t expect = 0; fd_set fds; struct timeval timeout,before,after; int ret; @@ -342,7 +335,6 @@ recv_token(int sock, void **token, size_t *token_length, struct timeval *to) } ret = 0; - expect = SSL_TOKEN_HEADER_LENGTH; do { FD_ZERO(&fds); FD_SET(sock,&fds); @@ -357,7 +349,7 @@ recv_token(int sock, void **token, size_t *token_length, struct timeval *to) break; } - count = read(sock, buf, MIN(expect - tl, sizeof(buf))); + count = read(sock, buf, sizeof(buf)); if (count < 0) { if (errno == EINTR) continue; @@ -381,12 +373,7 @@ recv_token(int sock, void **token, size_t *token_length, struct timeval *to) memcpy(t + tl, buf, count); tl += count; - if ((expect == SSL_TOKEN_HEADER_LENGTH) && - (tl >= SSL_TOKEN_HEADER_LENGTH)) { - expect = ssl_token_length(t, tl); - } - - } while (count != 0 && tl < expect); + } while (count < 0); /* restart on EINTR */ end: if (to) { -- 1.8.2.3