diff options
author | Denys Vlasenko | 2017-02-03 18:19:59 +0100 |
---|---|---|
committer | Denys Vlasenko | 2017-02-03 18:23:52 +0100 |
commit | 5b05d9db29843144b2ed620ca437d6a3bacc3816 (patch) | |
tree | f468595c53a1e2b0dbfbb4fcca8d928149a68d39 /networking | |
parent | 5f7c82b32f548b5a1d6a4186630e8ef496a9d5e6 (diff) | |
download | busybox-5b05d9db29843144b2ed620ca437d6a3bacc3816.zip busybox-5b05d9db29843144b2ed620ca437d6a3bacc3816.tar.gz |
wget/tls: session_id of zero length is ok (arxiv.org responds with such)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/tls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/tls.c b/networking/tls.c index 3353245..4e9187d 100644 --- a/networking/tls.c +++ b/networking/tls.c @@ -1312,7 +1312,7 @@ static void get_server_hello(tls_state_t *tls) unsigned cipher; int len, len24; - len = tls_xread_handshake_block(tls, 74); + len = tls_xread_handshake_block(tls, 74 - 32); hp = (void*)tls->inbuf; // 74 bytes: @@ -1332,7 +1332,7 @@ static void get_server_hello(tls_state_t *tls) len24 = hp->len24_lo; if (hp->session_id_len != 32) { if (hp->session_id_len != 0) - tls_error_die(tls); + bad_record_die(tls, "'server hello'", len); // session_id_len == 0: no session id // "The server @@ -1347,7 +1347,7 @@ static void get_server_hello(tls_state_t *tls) // || cipherid[1] != (CIPHER_ID & 0xff) // || cipherid[2] != 0 /* comprtype */ ) { - tls_error_die(tls); + bad_record_die(tls, "'server hello'", len); } dbg("<< SERVER_HELLO\n"); |