aboutsummaryrefslogtreecommitdiffstats
path: root/test/ssl_test.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2017-01-27 15:06:16 +0000
committerDr. Stephen Henson <steve@openssl.org>2017-01-30 13:00:17 +0000
commit54b7f2a5ca463072dde5590e4dd3112bd47bba28 (patch)
tree6bb15f9f030001e5daa8553f751d8e2ff32353a5 /test/ssl_test.c
parenta593cffe48e923f9db9c1eb5540d0851fa165ad6 (diff)
downloadopenssl-54b7f2a5ca463072dde5590e4dd3112bd47bba28.tar.gz
Add test support for TLS signature types.
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2301)
Diffstat (limited to 'test/ssl_test.c')
-rw-r--r--test/ssl_test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ssl_test.c b/test/ssl_test.c
index 58ddca4ec0..752de6396b 100644
--- a/test/ssl_test.c
+++ b/test/ssl_test.c
@@ -217,6 +217,13 @@ static int check_server_sign_hash(HANDSHAKE_RESULT *result,
result->server_sign_hash);
}
+static int check_server_sign_type(HANDSHAKE_RESULT *result,
+ SSL_TEST_CTX *test_ctx)
+{
+ return check_nid("Server signing", test_ctx->expected_server_sign_type,
+ result->server_sign_type);
+}
+
static int check_client_cert_type(HANDSHAKE_RESULT *result,
SSL_TEST_CTX *test_ctx)
{
@@ -231,6 +238,13 @@ static int check_client_sign_hash(HANDSHAKE_RESULT *result,
result->client_sign_hash);
}
+static int check_client_sign_type(HANDSHAKE_RESULT *result,
+ SSL_TEST_CTX *test_ctx)
+{
+ return check_nid("Client signing", test_ctx->expected_client_sign_type,
+ result->client_sign_type);
+}
+
/*
* This could be further simplified by constructing an expected
* HANDSHAKE_RESULT, and implementing comparison methods for
@@ -254,8 +268,10 @@ static int check_test(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx)
ret &= check_tmp_key(result, test_ctx);
ret &= check_server_cert_type(result, test_ctx);
ret &= check_server_sign_hash(result, test_ctx);
+ ret &= check_server_sign_type(result, test_ctx);
ret &= check_client_cert_type(result, test_ctx);
ret &= check_client_sign_hash(result, test_ctx);
+ ret &= check_client_sign_type(result, test_ctx);
}
return ret;
}