diff options
author | Matt Caswell <matt@openssl.org> | 2017-03-02 14:42:55 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-03-02 17:44:16 +0000 |
commit | f533fbd44a36daac9cc304ff648782e366391b00 (patch) | |
tree | 43cb39ba3b60bd4fec763464082600971e2df208 /test/sslapitest.c | |
parent | ef466accdc196fe796301a06cdc6e94cb315ae9b (diff) |
Rename SSL_read_early() to SSL_read_early_data()
This is for consistency with the rest of the API where all the functions
are called *early_data*.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2737)
Diffstat (limited to 'test/sslapitest.c')
-rw-r--r-- | test/sslapitest.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/test/sslapitest.c b/test/sslapitest.c index 331790bfdf..1cd850c1ce 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -1610,8 +1610,8 @@ static int test_early_data_read_write(void) goto end; } - if (SSL_read_early(serverssl, buf, sizeof(buf), &readbytes) - != SSL_READ_EARLY_SUCCESS + if (SSL_read_early_data(serverssl, buf, sizeof(buf), &readbytes) + != SSL_READ_EARLY_DATA_SUCCESS || readbytes != strlen(MSG1) || memcmp(MSG1, buf, strlen(MSG1))) { printf("Failed reading early data message 1\n"); @@ -1648,8 +1648,8 @@ static int test_early_data_read_write(void) } /* Server should still be able read early data after writing normal data */ - if (SSL_read_early(serverssl, buf, sizeof(buf), &readbytes) - != SSL_READ_EARLY_SUCCESS + if (SSL_read_early_data(serverssl, buf, sizeof(buf), &readbytes) + != SSL_READ_EARLY_DATA_SUCCESS || readbytes != strlen(MSG3) || memcmp(MSG3, buf, strlen(MSG3))) { printf("Failed reading early data message 3\n"); @@ -1686,8 +1686,8 @@ static int test_early_data_read_write(void) } /* Server should be told that there is no more early data */ - if (SSL_read_early(serverssl, buf, sizeof(buf), &readbytes) - != SSL_READ_EARLY_FINISH + if (SSL_read_early_data(serverssl, buf, sizeof(buf), &readbytes) + != SSL_READ_EARLY_DATA_FINISH || readbytes != 0) { printf("Failed finishing read of early data\n"); goto end; @@ -1707,8 +1707,8 @@ static int test_early_data_read_write(void) } ERR_clear_error(); - if (SSL_read_early(serverssl, buf, sizeof(buf), &readbytes) - != SSL_READ_EARLY_ERROR) { + if (SSL_read_early_data(serverssl, buf, sizeof(buf), &readbytes) + != SSL_READ_EARLY_DATA_ERROR) { printf("Unexpected success reading early data\n"); goto end; } @@ -1751,8 +1751,8 @@ static int test_early_data_read_write(void) goto end; } - if (SSL_read_early(serverssl, buf, sizeof(buf), &readbytes) - != SSL_READ_EARLY_SUCCESS + if (SSL_read_early_data(serverssl, buf, sizeof(buf), &readbytes) + != SSL_READ_EARLY_DATA_SUCCESS || readbytes != strlen(MSG1) || memcmp(MSG1, buf, strlen(MSG1))) { printf("Failed reading early data message 1\n"); @@ -1785,8 +1785,8 @@ static int test_early_data_read_write(void) } ERR_clear_error(); - if (SSL_read_early(serverssl, buf, sizeof(buf), &readbytes) - != SSL_READ_EARLY_ERROR) { + if (SSL_read_early_data(serverssl, buf, sizeof(buf), &readbytes) + != SSL_READ_EARLY_DATA_ERROR) { printf("Unexpected success reading early data (2)\n"); goto end; } @@ -1854,8 +1854,8 @@ static int test_early_data_skip(void) } /* Server should reject the early data and skip over it */ - if (SSL_read_early(serverssl, buf, sizeof(buf), &readbytes) - != SSL_READ_EARLY_FINISH + if (SSL_read_early_data(serverssl, buf, sizeof(buf), &readbytes) + != SSL_READ_EARLY_DATA_FINISH || readbytes != 0) { printf("Failed reading early data\n"); goto end; @@ -1926,8 +1926,8 @@ static int test_early_data_not_sent(void) } /* Server should detect that early data has not been sent */ - if (SSL_read_early(serverssl, buf, sizeof(buf), &readbytes) - != SSL_READ_EARLY_FINISH + if (SSL_read_early_data(serverssl, buf, sizeof(buf), &readbytes) + != SSL_READ_EARLY_DATA_FINISH || readbytes != 0) { printf("Failed reading early data\n"); goto end; @@ -2106,11 +2106,11 @@ static int test_early_data_tls1_2(void) /* * Server should do TLSv1.2 handshake. First it will block waiting for more - * messages from client after ServerDone. Then SSL_read_early should finish - * and detect that early data has not been sent + * messages from client after ServerDone. Then SSL_read_early_data should + * finish and detect that early data has not been sent */ - if (SSL_read_early(serverssl, buf, sizeof(buf), &readbytes) - != SSL_READ_EARLY_ERROR) { + if (SSL_read_early_data(serverssl, buf, sizeof(buf), &readbytes) + != SSL_READ_EARLY_DATA_ERROR) { printf("Unexpected success reading early data\n"); goto end; } @@ -2124,8 +2124,8 @@ static int test_early_data_tls1_2(void) goto end; } - if (SSL_read_early(serverssl, buf, sizeof(buf), &readbytes) - != SSL_READ_EARLY_FINISH + if (SSL_read_early_data(serverssl, buf, sizeof(buf), &readbytes) + != SSL_READ_EARLY_DATA_FINISH || readbytes != 0) { printf("Failed reading early data\n"); goto end; |