Fix long SNI lengths in test/handshake_helper.c
authorBenjamin Kaduk <bkaduk@akamai.com>
Fri, 1 Sep 2017 17:37:05 +0000 (12:37 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 1 Sep 2017 17:44:58 +0000 (12:44 -0500)
commitc4604e9b97a4f6c4fd532dbab0fc4b1fdad81276
tree5ce277ed112cb7d99a86b3bc68bde708f7a76061
parentde0dc006a524f335bc99f354bb8bc91258aad32d
Fix long SNI lengths in test/handshake_helper.c

If the server_name extension is long enough to require two bytes to
hold the length of either field, the test suite would not decode
the length properly.  Using the PACKET_ APIs would have avoided this,
but it was desired to avoid using private APIs in this part of the
test suite, to keep ourselves honest.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4318)
test/handshake_helper.c