1.48b: SSL handling bugfixes
- A fix to SSL handling to avoid mystery fetch failures when talking to certain servers.
This commit is contained in:
parent
99fdd5f699
commit
0d9f8c7fc5
|
@ -1,3 +1,9 @@
|
|||
Version 1.48b:
|
||||
--------------
|
||||
|
||||
- A fix to SSL handling to avoid mystery fetch failures when
|
||||
talking to certain servers.
|
||||
|
||||
Version 1.47b:
|
||||
--------------
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -20,7 +20,7 @@
|
|||
#
|
||||
|
||||
PROGNAME = skipfish
|
||||
VERSION = 1.47b
|
||||
VERSION = 1.48b
|
||||
|
||||
OBJFILES = http_client.c database.c crawler.c analysis.c report.c
|
||||
INCFILES = alloc-inl.h string-inl.h debug.h types.h http_client.h \
|
||||
|
|
|
@ -2022,6 +2022,8 @@ network_error:
|
|||
s32 read_res;
|
||||
u8 p_ret;
|
||||
|
||||
SSL_read_more:
|
||||
|
||||
c->read_buf = ck_realloc(c->read_buf, c->read_len + READ_CHUNK + 1);
|
||||
|
||||
if (c->proto == PROTO_HTTPS) {
|
||||
|
@ -2029,6 +2031,7 @@ network_error:
|
|||
|
||||
c->SSL_rd_w_wr = 0;
|
||||
|
||||
|
||||
read_res = SSL_read(c->srv_ssl, c->read_buf + c->read_len,
|
||||
READ_CHUNK);
|
||||
|
||||
|
@ -2051,6 +2054,10 @@ network_error:
|
|||
c->read_len += read_res;
|
||||
c->read_buf = ck_realloc(c->read_buf, c->read_len + 1);
|
||||
|
||||
/* Retry reading until SSL_ERROR_WANT_READ. */
|
||||
|
||||
if (read_res && c->read_len < size_limit) goto SSL_read_more;
|
||||
|
||||
c->read_buf[c->read_len] = 0; /* NUL-terminate for sanity. */
|
||||
|
||||
/* We force final parse_response() if response length exceeded
|
||||
|
|
Loading…
Reference in New Issue