From 54b7f2a5ca463072dde5590e4dd3112bd47bba28 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Fri, 27 Jan 2017 15:06:16 +0000 Subject: Add test support for TLS signature types. Reviewed-by: Richard Levitte Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/2301) --- test/ssl_test_ctx.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'test/ssl_test_ctx.c') diff --git a/test/ssl_test_ctx.c b/test/ssl_test_ctx.c index 3a937b3880..e88e577eab 100644 --- a/test/ssl_test_ctx.c +++ b/test/ssl_test_ctx.c @@ -432,9 +432,9 @@ IMPLEMENT_SSL_TEST_INT_OPTION(SSL_TEST_CTX, test, app_data_size) IMPLEMENT_SSL_TEST_INT_OPTION(SSL_TEST_CTX, test, max_fragment_size) -/***********************/ -/* Expected key types */ -/***********************/ +/*************************************/ +/* Expected key and signature types */ +/*************************************/ __owur static int parse_expected_key_type(int *ptype, const char *value) { @@ -473,6 +473,13 @@ __owur static int parse_expected_server_cert_type(SSL_TEST_CTX *test_ctx, value); } +__owur static int parse_expected_server_sign_type(SSL_TEST_CTX *test_ctx, + const char *value) +{ + return parse_expected_key_type(&test_ctx->expected_server_sign_type, + value); +} + __owur static int parse_expected_client_cert_type(SSL_TEST_CTX *test_ctx, const char *value) { @@ -480,6 +487,13 @@ __owur static int parse_expected_client_cert_type(SSL_TEST_CTX *test_ctx, value); } +__owur static int parse_expected_client_sign_type(SSL_TEST_CTX *test_ctx, + const char *value) +{ + return parse_expected_key_type(&test_ctx->expected_client_sign_type, + value); +} + /*************************/ /* Expected signing hash */ /*************************/ @@ -540,8 +554,10 @@ static const ssl_test_ctx_option ssl_test_ctx_options[] = { { "ExpectedTmpKeyType", &parse_expected_tmp_key_type }, { "ExpectedServerCertType", &parse_expected_server_cert_type }, { "ExpectedServerSignHash", &parse_expected_server_sign_hash }, + { "ExpectedServerSignType", &parse_expected_server_sign_type }, { "ExpectedClientCertType", &parse_expected_client_cert_type }, { "ExpectedClientSignHash", &parse_expected_client_sign_hash }, + { "ExpectedClientSignType", &parse_expected_client_sign_type }, }; /* Nested client options. */ -- cgit v1.2.3