]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Add ssl_ctx_test to test suite.
authorRich Salz <rsalz@akamai.com>
Sat, 2 Nov 2019 17:02:37 +0000 (13:02 -0400)
committerTomas Mraz <tmraz@fedoraproject.org>
Fri, 8 Nov 2019 07:23:15 +0000 (08:23 +0100)
Also fix the test as min version > max version is allowed because
the API calls to set min and max versions are separate and there
can be legitimately a temporary situation when the condition is
true even with correctly working application.

The failure in this condition will be detected only during
a handshake attempt.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10337)

test/recipes/71-test_ssl_ctx.t [new file with mode: 0644]
test/ssl_ctx_test.c

diff --git a/test/recipes/71-test_ssl_ctx.t b/test/recipes/71-test_ssl_ctx.t
new file mode 100644 (file)
index 0000000..6d5fc7a
--- /dev/null
@@ -0,0 +1,16 @@
+#! /usr/bin/env perl
+# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the Apache License 2.0 (the "License").  You may not use
+# this file except in compliance with the License.  You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+use strict;
+use warnings;
+use OpenSSL::Test;
+
+setup("ssl_ctx_test");
+
+plan tests => 1;
+ok(run(test(["ssl_ctx_test"])));
index 87d476d9ecbe4ef94899dc5ea74e9095bec76e8b..58ca60a788bda6c296c1c8e058598b4175d558d7 100644 (file)
@@ -24,7 +24,7 @@ static const version_test version_testdata[] = {
     {0,              0,              1, 1, 0,              0},
     {TLS1_VERSION,   TLS1_2_VERSION, 1, 1, TLS1_VERSION,   TLS1_2_VERSION},
     {TLS1_2_VERSION, TLS1_2_VERSION, 1, 1, TLS1_2_VERSION, TLS1_2_VERSION},
-    {TLS1_2_VERSION, TLS1_1_VERSION, 1, 0, TLS1_2_VERSION, 0},
+    {TLS1_2_VERSION, TLS1_1_VERSION, 1, 1, TLS1_2_VERSION, TLS1_1_VERSION},
     {7,              42,             0, 0, 0,              0},
 };