The branch master has been updated via 47c1a0e06e2f25d8bf6c6568ba4e3a11fdae422a (commit) via c02bcb66782dd0378336aa7ec31e371b8353b90e (commit) via 1fff160bc00d1c575440cd5e596fa2d4f5ab913e (commit) from d9f777267409a064ee0931b69425009a79771278 (commit)
- Log ----------------------------------------------------------------- commit 47c1a0e06e2f25d8bf6c6568ba4e3a11fdae422a Author: Richard Levitte <levi...@openssl.org> Date: Thu Feb 4 00:25:49 2016 +0100 Only use TLS1.2 when it's available Reviewed-by: Ben Laurie <b...@openssl.org> commit c02bcb66782dd0378336aa7ec31e371b8353b90e Author: Richard Levitte <levi...@openssl.org> Date: Thu Feb 4 00:24:16 2016 +0100 Have 70-test_clienthello.t be selective on when it can be run The test program clienthello checks TLS extensions, so there's no point running it when no TLS protocol is available. Reviewed-by: Ben Laurie <b...@openssl.org> commit 1fff160bc00d1c575440cd5e596fa2d4f5ab913e Author: Richard Levitte <levi...@openssl.org> Date: Thu Feb 4 00:22:59 2016 +0100 Have OpenSSL::Test::Utils::available_protocols load configdata as well Otherwise, it could typically always return an empty list, since it's often called first if at all. Reviewed-by: Ben Laurie <b...@openssl.org> ----------------------------------------------------------------------- Summary of changes: test/clienthellotest.c | 5 +++++ test/recipes/70-test_clienthello.t | 12 ++++++++++-- test/testlib/OpenSSL/Test/Utils.pm | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/test/clienthellotest.c b/test/clienthellotest.c index 9cb563c..66fc27f 100644 --- a/test/clienthellotest.c +++ b/test/clienthellotest.c @@ -55,6 +55,7 @@ #include <string.h> +#include <openssl/opensslconf.h> #include <openssl/bio.h> #include <openssl/crypto.h> #include <openssl/evp.h> @@ -117,7 +118,11 @@ int main(int argc, char *argv[]) for (; currtest < TOTAL_NUM_TESTS; currtest++) { testresult = 0; if (currtest == TEST_SET_SESSION_TICK_DATA_TLS_1_2) { +#ifndef OPENSSL_NO_TLS1_2 ctx = SSL_CTX_new(TLSv1_2_method()); +#else + continue; +#endif } else { ctx = SSL_CTX_new(TLS_method()); } diff --git a/test/recipes/70-test_clienthello.t b/test/recipes/70-test_clienthello.t index 73b83f2..2032d6d 100644 --- a/test/recipes/70-test_clienthello.t +++ b/test/recipes/70-test_clienthello.t @@ -1,5 +1,13 @@ #! /usr/bin/perl -use OpenSSL::Test::Simple; +use OpenSSL::Test; +use OpenSSL::Test::Utils; -simple_test("test_clienthello", "clienthellotest"); +setup("test_clienthello"); + +plan skip_all => "No TLS/SSL protocols are supported by this OpenSSL build" + if alldisabled(grep { $_ ne "ssl3" } available_protocols("tls")); + +plan tests => 1; + +ok(run(test(["clienthellotest"])), "running clienthellotest"); diff --git a/test/testlib/OpenSSL/Test/Utils.pm b/test/testlib/OpenSSL/Test/Utils.pm index c024832..8f75013 100644 --- a/test/testlib/OpenSSL/Test/Utils.pm +++ b/test/testlib/OpenSSL/Test/Utils.pm @@ -130,6 +130,7 @@ sub disabled { } sub available_protocols { + load_configdata() unless $configdata_loaded; my $protocol_class = shift; if (exists $available_protocols{lc $protocol_class}) { return @{$available_protocols{lc $protocol_class}} _____ openssl-commits mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-commits