diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libssl/client/clienttest.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/regress/lib/libssl/client/clienttest.c b/src/regress/lib/libssl/client/clienttest.c index b22b26eca4..5a76e66f8c 100644 --- a/src/regress/lib/libssl/client/clienttest.c +++ b/src/regress/lib/libssl/client/clienttest.c | |||
@@ -347,7 +347,6 @@ client_hello_test(int testno, struct client_hello_test *cht) | |||
347 | size_t client_hello_len; | 347 | size_t client_hello_len; |
348 | char *wbuf, rbuf[1]; | 348 | char *wbuf, rbuf[1]; |
349 | int ret = 1; | 349 | int ret = 1; |
350 | size_t i; | ||
351 | long len; | 350 | long len; |
352 | 351 | ||
353 | fprintf(stderr, "Test %i - %s\n", testno, cht->desc); | 352 | fprintf(stderr, "Test %i - %s\n", testno, cht->desc); |
@@ -402,14 +401,17 @@ client_hello_test(int testno, struct client_hello_test *cht) | |||
402 | } | 401 | } |
403 | 402 | ||
404 | /* We expect the client random to differ. */ | 403 | /* We expect the client random to differ. */ |
405 | i = cht->random_start + SSL3_RANDOM_SIZE; | 404 | if (memcmp(&client_hello[cht->random_start], &wbuf[cht->random_start], |
406 | if (memcmp(client_hello, wbuf, cht->random_start) != 0 || | 405 | SSL3_RANDOM_SIZE) == 0) { |
407 | memcmp(&client_hello[cht->random_start], | 406 | fprintf(stderr, "FAIL: ClientHello has zeroed random\n"); |
408 | &wbuf[cht->random_start], SSL3_RANDOM_SIZE) == 0 || | 407 | goto failure; |
409 | memcmp(&client_hello[i], &wbuf[i], len - i) != 0) { | 408 | } |
409 | |||
410 | memset(&wbuf[cht->random_start], 0, SSL3_RANDOM_SIZE); | ||
411 | |||
412 | if (memcmp(client_hello, wbuf, client_hello_len) != 0) { | ||
410 | fprintf(stderr, "FAIL: ClientHello differs:\n"); | 413 | fprintf(stderr, "FAIL: ClientHello differs:\n"); |
411 | fprintf(stderr, "received:\n"); | 414 | fprintf(stderr, "received:\n"); |
412 | memset(&wbuf[cht->random_start], 0, SSL3_RANDOM_SIZE); | ||
413 | hexdump(wbuf, len); | 415 | hexdump(wbuf, len); |
414 | fprintf(stderr, "test data:\n"); | 416 | fprintf(stderr, "test data:\n"); |
415 | hexdump(client_hello, client_hello_len); | 417 | hexdump(client_hello, client_hello_len); |