Latest update.
This commit is contained in:
@@ -16,7 +16,6 @@ use OpenSSL::Test::Utils;
|
||||
setup("test_bf");
|
||||
|
||||
plan skip_all => "Low-level Blowfish APIs are disabled in this build"
|
||||
if disabled("deprecated")
|
||||
&& (!defined config("api") || config("api") >= 30000);
|
||||
if disabled('deprecated-3.0');
|
||||
|
||||
simple_test("test_bf", "bftest", "bf");
|
||||
@@ -17,7 +17,6 @@ use OpenSSL::Test::Utils;
|
||||
setup("test_cast");
|
||||
|
||||
plan skip_all => "Low-level CAST APIs are disabled in this build"
|
||||
if disabled("deprecated")
|
||||
&& (!defined config("api") || config("api") >= 30000);
|
||||
if disabled('deprecated-3.0');
|
||||
|
||||
simple_test("test_cast", "casttest", "cast");
|
||||
@@ -76,11 +76,12 @@ my @sha_tests =
|
||||
expected => '$6$rounds=1000$roundstoolow$kUMsbe306n21p9R.FRkW3IGn.S9NPN0x50YhH1xhLsPuWGsUSklZt58jaTfF4ZEQpyUNGc0dqbpBYYBaHHrsX.' }
|
||||
);
|
||||
|
||||
plan tests => (disabled("des") ? 9 : 11) + scalar @sha_tests;
|
||||
plan tests => (disabled("des") || disabled('deprecated-3.0') ? 9 : 11) + scalar @sha_tests;
|
||||
|
||||
|
||||
ok(compare1stline_re([qw{openssl passwd password}], '^.{13}\R$'),
|
||||
'crypt password with random salt') if !disabled("des");
|
||||
'crypt password with random salt')
|
||||
if !disabled("des") && !disabled('deprecated-3.0');
|
||||
ok(compare1stline_re([qw{openssl passwd -1 password}], '^\$1\$.{8}\$.{22}\R$'),
|
||||
'BSD style MD5 password with random salt');
|
||||
ok(compare1stline_re([qw{openssl passwd -apr1 password}], '^\$apr1\$.{8}\$.{22}\R$'),
|
||||
@@ -91,7 +92,8 @@ ok(compare1stline_re([qw{openssl passwd -6 password}], '^\$6\$.{16}\$.{86}\R$'),
|
||||
'Apache SHA512 password with random salt');
|
||||
|
||||
ok(compare1stline([qw{openssl passwd -salt xx password}], 'xxj31ZMTZzkVA'),
|
||||
'crypt password with salt xx') if !disabled("des");
|
||||
'crypt password with salt xx')
|
||||
if !disabled("des") && !disabled('deprecated-3.0');
|
||||
ok(compare1stline([qw{openssl passwd -salt xxxxxxxx -1 password}], '$1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a.'),
|
||||
'BSD style MD5 password with salt xxxxxxxx');
|
||||
ok(compare1stline([qw{openssl passwd -salt xxxxxxxx -apr1 password}], '$apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0'),
|
||||
|
||||
@@ -336,14 +336,14 @@ ok(!verify("badalt9-cert", "sslserver", ["root-cert"], ["ncca1-cert", "ncca3-cer
|
||||
ok(!verify("badalt10-cert", "sslserver", ["root-cert"], ["ncca1-cert", "ncca3-cert"], ),
|
||||
"Name constraints nested DNS name excluded");
|
||||
|
||||
ok(verify("ee-pss-sha1-cert", "sslserver", ["root-cert"], ["ca-cert"], ),
|
||||
"Certificate PSS signature using SHA1");
|
||||
ok(verify("ee-pss-sha1-cert", "sslserver", ["root-cert"], ["ca-cert"], "-auth_level", "0"),
|
||||
"Accept PSS signature using SHA1 at auth level 0");
|
||||
|
||||
ok(verify("ee-pss-sha256-cert", "sslserver", ["root-cert"], ["ca-cert"], ),
|
||||
"CA with PSS signature using SHA256");
|
||||
|
||||
ok(!verify("ee-pss-sha1-cert", "sslserver", ["root-cert"], ["ca-cert"], "-auth_level", "2"),
|
||||
"Reject PSS signature using SHA1 and auth level 2");
|
||||
ok(!verify("ee-pss-sha1-cert", "sslserver", ["root-cert"], ["ca-cert"], "-auth_level", "1"),
|
||||
"Reject PSS signature using SHA1 and auth level 1");
|
||||
|
||||
ok(verify("ee-pss-sha256-cert", "sslserver", ["root-cert"], ["ca-cert"], "-auth_level", "2"),
|
||||
"PSS signature using SHA256 and auth level 2");
|
||||
|
||||
@@ -67,11 +67,11 @@ push @defltfiles, @chachafiles unless disabled("chacha");
|
||||
my @bffiles = qw( evpciph_bf.txt );
|
||||
push @defltfiles, @bffiles unless disabled("bf");
|
||||
|
||||
my @bffiles = qw( evpmd_md2.txt );
|
||||
push @defltfiles, @bffiles unless disabled("md2");
|
||||
my @md2files = qw( evpmd_md2.txt );
|
||||
push @defltfiles, @md2files unless disabled("md2");
|
||||
|
||||
my @bffiles = qw( evpmd_mdc2.txt );
|
||||
push @defltfiles, @bffiles unless disabled("mdc2");
|
||||
my @mdc2files = qw( evpmd_mdc2.txt );
|
||||
push @defltfiles, @mdc2files unless disabled("mdc2");
|
||||
|
||||
plan tests =>
|
||||
($no_fips ? 0 : 1) # FIPS install test
|
||||
|
||||
@@ -53,7 +53,7 @@ use constant {
|
||||
|
||||
#Test 1: Default sig algs should succeed
|
||||
$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
|
||||
plan tests => 22;
|
||||
plan tests => 24;
|
||||
ok(TLSProxy::Message->success, "Default sigalgs");
|
||||
my $testtype;
|
||||
|
||||
@@ -132,19 +132,40 @@ SKIP: {
|
||||
}
|
||||
|
||||
SKIP: {
|
||||
skip "EC or TLSv1.2 disabled", 8 if disabled("tls1_2") || disabled("ec");
|
||||
skip "EC or TLSv1.2 disabled", 10 if disabled("tls1_2") || disabled("ec");
|
||||
|
||||
$proxy->filter(\&sigalgs_filter);
|
||||
|
||||
#Test 10: Sending no sig algs extension in TLSv1.2 should succeed
|
||||
#Test 10: Sending no sig algs extension in TLSv1.2 should succeed at
|
||||
# security level 1
|
||||
$proxy->clear();
|
||||
$testtype = NO_SIG_ALGS_EXT;
|
||||
$proxy->clientflags("-no_tls1_3");
|
||||
$proxy->ciphers("ECDHE-RSA-AES128-SHA");
|
||||
$proxy->clientflags("-no_tls1_3 -cipher DEFAULT\@SECLEVEL=1");
|
||||
$proxy->ciphers("ECDHE-RSA-AES128-SHA\@SECLEVEL=1");
|
||||
$proxy->start();
|
||||
ok(TLSProxy::Message->success, "No TLSv1.2 sigalgs");
|
||||
ok(TLSProxy::Message->success, "No TLSv1.2 sigalgs seclevel 1");
|
||||
|
||||
#Test 11: Sending an empty sig algs extension in TLSv1.2 should fail
|
||||
#Test 11: Sending no sig algs extension in TLSv1.2 should fail at security
|
||||
# level 2 since it will try to use SHA1. Testing client at level 1,
|
||||
# server level 2.
|
||||
$proxy->clear();
|
||||
$testtype = NO_SIG_ALGS_EXT;
|
||||
$proxy->clientflags("-tls1_2 -cipher DEFAULT\@SECLEVEL=1");
|
||||
$proxy->ciphers("DEFAULT\@SECLEVEL=2");
|
||||
$proxy->start();
|
||||
ok(TLSProxy::Message->fail, "No TLSv1.2 sigalgs server seclevel 2");
|
||||
|
||||
#Test 12: Sending no sig algs extension in TLSv1.2 should fail at security
|
||||
# level 2 since it will try to use SHA1. Testing client at level 2,
|
||||
# server level 1.
|
||||
$proxy->clear();
|
||||
$testtype = NO_SIG_ALGS_EXT;
|
||||
$proxy->clientflags("-tls1_2 -cipher DEFAULT\@SECLEVEL=2");
|
||||
$proxy->ciphers("DEFAULT\@SECLEVEL=1");
|
||||
$proxy->start();
|
||||
ok(TLSProxy::Message->fail, "No TLSv1.2 sigalgs client seclevel 2");
|
||||
|
||||
#Test 13: Sending an empty sig algs extension in TLSv1.2 should fail
|
||||
$proxy->clear();
|
||||
$testtype = EMPTY_SIG_ALGS_EXT;
|
||||
$proxy->clientflags("-no_tls1_3");
|
||||
@@ -152,7 +173,7 @@ SKIP: {
|
||||
$proxy->start();
|
||||
ok(TLSProxy::Message->fail, "Empty TLSv1.2 sigalgs");
|
||||
|
||||
#Test 12: Sending a list with no recognised sig algs in TLSv1.2 should fail
|
||||
#Test 14: Sending a list with no recognised sig algs in TLSv1.2 should fail
|
||||
$proxy->clear();
|
||||
$testtype = NO_KNOWN_SIG_ALGS;
|
||||
$proxy->clientflags("-no_tls1_3");
|
||||
@@ -160,7 +181,7 @@ SKIP: {
|
||||
$proxy->start();
|
||||
ok(TLSProxy::Message->fail, "No known TLSv1.3 sigalgs");
|
||||
|
||||
#Test 13: Sending a sig algs list without pss for an RSA cert in TLSv1.2
|
||||
#Test 15: Sending a sig algs list without pss for an RSA cert in TLSv1.2
|
||||
# should succeed
|
||||
$proxy->clear();
|
||||
$testtype = NO_PSS_SIG_ALGS;
|
||||
@@ -169,7 +190,7 @@ SKIP: {
|
||||
$proxy->start();
|
||||
ok(TLSProxy::Message->success, "No PSS TLSv1.2 sigalgs");
|
||||
|
||||
#Test 14: Sending only TLSv1.3 PSS sig algs in TLSv1.2 should succeed
|
||||
#Test 16: Sending only TLSv1.3 PSS sig algs in TLSv1.2 should succeed
|
||||
$proxy->clear();
|
||||
$testtype = PSS_ONLY_SIG_ALGS;
|
||||
$proxy->serverflags("-no_tls1_3");
|
||||
@@ -177,7 +198,7 @@ SKIP: {
|
||||
$proxy->start();
|
||||
ok(TLSProxy::Message->success, "PSS only sigalgs in TLSv1.2");
|
||||
|
||||
#Test 15: Responding with a sig alg we did not send in TLSv1.2 should fail
|
||||
#Test 17: Responding with a sig alg we did not send in TLSv1.2 should fail
|
||||
# We send rsa_pkcs1_sha256 and respond with rsa_pss_rsae_sha256
|
||||
# TODO(TLS1.3): Add a similar test to the TLSv1.3 section above
|
||||
# when we have an API capable of configuring the TLSv1.3 sig algs
|
||||
@@ -188,7 +209,7 @@ SKIP: {
|
||||
$proxy->start();
|
||||
ok(TLSProxy::Message->fail, "Sigalg we did not send in TLSv1.2");
|
||||
|
||||
#Test 16: Sending a valid sig algs list but not including a sig type that
|
||||
#Test 18: Sending a valid sig algs list but not including a sig type that
|
||||
# matches the certificate should fail in TLSv1.2
|
||||
$proxy->clear();
|
||||
$proxy->clientflags("-no_tls1_3 -sigalgs ECDSA+SHA256");
|
||||
@@ -198,7 +219,7 @@ SKIP: {
|
||||
ok(TLSProxy::Message->fail, "No matching TLSv1.2 sigalgs");
|
||||
$proxy->filter(\&sigalgs_filter);
|
||||
|
||||
#Test 17: No sig algs extension, ECDSA cert, TLSv1.2 should succeed
|
||||
#Test 19: No sig algs extension, ECDSA cert, TLSv1.2 should succeed
|
||||
$proxy->clear();
|
||||
$testtype = NO_SIG_ALGS_EXT;
|
||||
$proxy->clientflags("-no_tls1_3");
|
||||
@@ -214,7 +235,7 @@ SKIP: {
|
||||
my ($dsa_status, $sha1_status, $sha224_status);
|
||||
SKIP: {
|
||||
skip "TLSv1.3 disabled", 2 if disabled("tls1_3") || disabled("dsa");
|
||||
#Test 18: signature_algorithms with 1.3-only ClientHello
|
||||
#Test 20: signature_algorithms with 1.3-only ClientHello
|
||||
$testtype = PURE_SIGALGS;
|
||||
$dsa_status = $sha1_status = $sha224_status = 0;
|
||||
$proxy->clear();
|
||||
@@ -224,7 +245,7 @@ SKIP: {
|
||||
ok($dsa_status && $sha1_status && $sha224_status,
|
||||
"DSA/SHA2 sigalg sent for 1.3-only ClientHello");
|
||||
|
||||
#Test 19: signature_algorithms with backwards compatible ClientHello
|
||||
#Test 21: signature_algorithms with backwards compatible ClientHello
|
||||
SKIP: {
|
||||
skip "TLSv1.2 disabled", 1 if disabled("tls1_2");
|
||||
$testtype = COMPAT_SIGALGS;
|
||||
@@ -239,21 +260,21 @@ SKIP: {
|
||||
|
||||
SKIP: {
|
||||
skip "TLSv1.3 disabled", 3 if disabled("tls1_3");
|
||||
#Test 20: Insert signature_algorithms_cert that match normal sigalgs
|
||||
#Test 22: Insert signature_algorithms_cert that match normal sigalgs
|
||||
$testtype = SIGALGS_CERT_ALL;
|
||||
$proxy->clear();
|
||||
$proxy->filter(\&modify_sigalgs_cert_filter);
|
||||
$proxy->start();
|
||||
ok(TLSProxy::Message->success, "sigalgs_cert in TLSv1.3");
|
||||
|
||||
#Test 21: Insert signature_algorithms_cert that forces PKCS#1 cert
|
||||
#Test 23: Insert signature_algorithms_cert that forces PKCS#1 cert
|
||||
$testtype = SIGALGS_CERT_PKCS;
|
||||
$proxy->clear();
|
||||
$proxy->filter(\&modify_sigalgs_cert_filter);
|
||||
$proxy->start();
|
||||
ok(TLSProxy::Message->success, "sigalgs_cert in TLSv1.3 with PKCS#1 cert");
|
||||
|
||||
#Test 22: Insert signature_algorithms_cert that fails
|
||||
#Test 24: Insert signature_algorithms_cert that fails
|
||||
$testtype = SIGALGS_CERT_INVALID;
|
||||
$proxy->clear();
|
||||
$proxy->filter(\&modify_sigalgs_cert_filter);
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2020 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 OpenSSL::Test qw/:DEFAULT srctop_file/;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
setup("test_http");
|
||||
|
||||
plan tests => 1;
|
||||
|
||||
SKIP: {
|
||||
skip "sockets disabled", 1 if disabled("sock");
|
||||
ok(run(test(["http_test",
|
||||
srctop_file("test", "certs", "ca-cert.pem")])));
|
||||
}
|
||||
@@ -17,7 +17,6 @@ use OpenSSL::Test::Utils;
|
||||
setup("test_ige");
|
||||
|
||||
plan skip_all => "AES_ige support is disabled in this build"
|
||||
if disabled("deprecated")
|
||||
&& (!defined config("api") || config("api") >= 30000);
|
||||
if disabled('deprecated-3.0');
|
||||
|
||||
simple_test("test_ige", "igetest");
|
||||
@@ -0,0 +1,21 @@
|
||||
#! /usr/bin/env perl
|
||||
# Copyright 2016-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 OpenSSL::Test::Utils;
|
||||
use OpenSSL::Test qw/:DEFAULT srctop_dir/;
|
||||
|
||||
setup("test_sslprovider");
|
||||
|
||||
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(["sslprovidertest", srctop_dir("test", "certs")])),
|
||||
"running sslprovidertest");
|
||||
@@ -10,6 +10,7 @@
|
||||
use OpenSSL::Test;
|
||||
use OpenSSL::Test::Utils;
|
||||
use OpenSSL::Test qw/:DEFAULT data_file srctop_file bldtop_dir/;
|
||||
use Cwd qw(abs_path);
|
||||
|
||||
setup("test_external_krb5");
|
||||
|
||||
@@ -20,6 +21,7 @@ plan skip_all => "krb5 not available"
|
||||
|
||||
plan tests => 1;
|
||||
|
||||
$ENV{OPENSSL_CONF} = srctop_file("test", "default-and-legacy.cnf");
|
||||
$ENV{OPENSSL_MODULES} = abs_path($ENV{OPENSSL_MODULES});
|
||||
$ENV{OPENSSL_CONF} = abs_path(srctop_file("test", "default-and-legacy.cnf"));
|
||||
|
||||
ok(run(cmd([data_file("krb5.sh")])), "running krb5 tests");
|
||||
Reference in New Issue
Block a user