Have OpenSSL::Test::Utils::available_protocols load configdata as well
authorRichard Levitte <levitte@openssl.org>
Wed, 3 Feb 2016 23:22:59 +0000 (00:22 +0100)
committerRichard Levitte <levitte@openssl.org>
Thu, 4 Feb 2016 09:55:38 +0000 (10:55 +0100)
Otherwise, it could typically always return an empty list, since it's
often called first if at all.

Reviewed-by: Ben Laurie <ben@openssl.org>
test/testlib/OpenSSL/Test/Utils.pm

index c0248322a7579c26c7a58aa3f09a715fcd6818cc..8f75013a6c55bc7949ca0549fe33fc32676436e8 100644 (file)
@@ -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}}