summaryrefslogtreecommitdiffstats
path: root/test/ssl_test_ctx.h
diff options
context:
space:
mode:
authorEmilia Kasper <emilia@openssl.org>2016-06-10 00:39:22 +0200
committerEmilia Kasper <emilia@openssl.org>2016-06-13 16:03:06 +0200
commit81fc33c951b645f31727dc811e02200bde4a0982 (patch)
tree7b14f860635eb488254815300aecdf1792f46584 /test/ssl_test_ctx.h
parenta7be5759cf9d8e2bf7c1ecd0efa2d53aae9ab706 (diff)
Clean up following new SNI tests
- Only send SNI in SNI tests. This allows us to test handshakes without the SNI extension as well. - Move all handshake-specific machinery to handshake_helper.c - Use enum types to represent the enum everywhere (Resorting to plain ints can end in sign mismatch when the enum is represented by an unsigned type.) Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/ssl_test_ctx.h')
-rw-r--r--test/ssl_test_ctx.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/test/ssl_test_ctx.h b/test/ssl_test_ctx.h
index e7570856b1..e1541c0c98 100644
--- a/test/ssl_test_ctx.h
+++ b/test/ssl_test_ctx.h
@@ -27,7 +27,8 @@ typedef enum {
} ssl_verify_callback_t;
typedef enum {
- SSL_TEST_SERVERNAME_SERVER1 = 0, /* Default */
+ SSL_TEST_SERVERNAME_NONE = 0, /* Default */
+ SSL_TEST_SERVERNAME_SERVER1,
SSL_TEST_SERVERNAME_SERVER2
} ssl_servername_t;
@@ -36,7 +37,7 @@ typedef enum {
SSL_TEST_SESSION_TICKET_YES,
SSL_TEST_SESSION_TICKET_NO,
SSL_TEST_SESSION_TICKET_BROKEN, /* Special test */
-} ssl_session_ticket_expected_t;
+} ssl_session_ticket_t;
typedef struct ssl_test_ctx {
/* Test expectations. */
@@ -55,7 +56,7 @@ typedef struct ssl_test_ctx {
ssl_verify_callback_t client_verify_callback;
/* One of a number of predefined server names use by the client */
ssl_servername_t servername;
- ssl_session_ticket_expected_t session_ticket_expected;
+ ssl_session_ticket_t session_ticket_expected;
} SSL_TEST_CTX;
const char *ssl_test_result_name(ssl_test_result_t result);
@@ -63,7 +64,7 @@ const char *ssl_alert_name(int alert);
const char *ssl_protocol_name(int protocol);
const char *ssl_verify_callback_name(ssl_verify_callback_t verify_callback);
const char *ssl_servername_name(ssl_servername_t server);
-const char *ssl_session_ticket_expected_name(ssl_session_ticket_expected_t server);
+const char *ssl_session_ticket_name(ssl_session_ticket_t server);
/*
* Load the test case context from |conf|.