Imported OpenSSL 1.1.1a
This commit is contained in:
78
test/ssl-tests/01-simple.conf
Normal file
78
test/ssl-tests/01-simple.conf
Normal file
@@ -0,0 +1,78 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 3
|
||||
|
||||
test-0 = 0-default
|
||||
test-1 = 1-Server signature algorithms bug
|
||||
test-2 = 2-verify-cert
|
||||
# ===========================================================
|
||||
|
||||
[0-default]
|
||||
ssl_conf = 0-default-ssl
|
||||
|
||||
[0-default-ssl]
|
||||
server = 0-default-server
|
||||
client = 0-default-client
|
||||
|
||||
[0-default-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-default-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-Server signature algorithms bug]
|
||||
ssl_conf = 1-Server signature algorithms bug-ssl
|
||||
|
||||
[1-Server signature algorithms bug-ssl]
|
||||
server = 1-Server signature algorithms bug-server
|
||||
client = 1-Server signature algorithms bug-client
|
||||
|
||||
[1-Server signature algorithms bug-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ClientSignatureAlgorithms = PSS+SHA512:RSA+SHA512
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-Server signature algorithms bug-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = PSS+SHA256:RSA+SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-verify-cert]
|
||||
ssl_conf = 2-verify-cert-ssl
|
||||
|
||||
[2-verify-cert-ssl]
|
||||
server = 2-verify-cert-server
|
||||
client = 2-verify-cert-client
|
||||
|
||||
[2-verify-cert-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-verify-cert-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedClientAlert = UnknownCA
|
||||
ExpectedResult = ClientFail
|
||||
|
||||
|
||||
42
test/ssl-tests/01-simple.conf.in
Normal file
42
test/ssl-tests/01-simple.conf.in
Normal file
@@ -0,0 +1,42 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
package ssltests;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "default",
|
||||
server => { },
|
||||
client => { },
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
},
|
||||
|
||||
{
|
||||
name => "Server signature algorithms bug",
|
||||
# Should have no effect as we aren't doing client auth
|
||||
server => { "ClientSignatureAlgorithms" => "PSS+SHA512:RSA+SHA512" },
|
||||
client => { "SignatureAlgorithms" => "PSS+SHA256:RSA+SHA256" },
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
},
|
||||
|
||||
{
|
||||
name => "verify-cert",
|
||||
server => { },
|
||||
client => {
|
||||
# Don't set up the client root file.
|
||||
"VerifyCAFile" => undef,
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ClientFail",
|
||||
"ExpectedClientAlert" => "UnknownCA",
|
||||
},
|
||||
},
|
||||
);
|
||||
18822
test/ssl-tests/02-protocol-version.conf
Normal file
18822
test/ssl-tests/02-protocol-version.conf
Normal file
File diff suppressed because it is too large
Load Diff
19
test/ssl-tests/02-protocol-version.conf.in
Normal file
19
test/ssl-tests/02-protocol-version.conf.in
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test TLS version negotiation
|
||||
|
||||
package ssltests;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use protocol_version;
|
||||
|
||||
our @tests = generate_version_tests("TLS");
|
||||
238
test/ssl-tests/03-custom_verify.conf
Normal file
238
test/ssl-tests/03-custom_verify.conf
Normal file
@@ -0,0 +1,238 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 9
|
||||
|
||||
test-0 = 0-verify-success
|
||||
test-1 = 1-verify-custom-reject
|
||||
test-2 = 2-verify-custom-allow
|
||||
test-3 = 3-noverify-success
|
||||
test-4 = 4-noverify-ignore-custom-reject
|
||||
test-5 = 5-noverify-accept-custom-allow
|
||||
test-6 = 6-verify-fail-no-root
|
||||
test-7 = 7-verify-custom-success-no-root
|
||||
test-8 = 8-verify-custom-fail-no-root
|
||||
# ===========================================================
|
||||
|
||||
[0-verify-success]
|
||||
ssl_conf = 0-verify-success-ssl
|
||||
|
||||
[0-verify-success-ssl]
|
||||
server = 0-verify-success-server
|
||||
client = 0-verify-success-client
|
||||
|
||||
[0-verify-success-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-verify-success-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-verify-custom-reject]
|
||||
ssl_conf = 1-verify-custom-reject-ssl
|
||||
|
||||
[1-verify-custom-reject-ssl]
|
||||
server = 1-verify-custom-reject-server
|
||||
client = 1-verify-custom-reject-client
|
||||
|
||||
[1-verify-custom-reject-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-verify-custom-reject-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedClientAlert = HandshakeFailure
|
||||
ExpectedResult = ClientFail
|
||||
client = 1-verify-custom-reject-client-extra
|
||||
|
||||
[1-verify-custom-reject-client-extra]
|
||||
VerifyCallback = RejectAll
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-verify-custom-allow]
|
||||
ssl_conf = 2-verify-custom-allow-ssl
|
||||
|
||||
[2-verify-custom-allow-ssl]
|
||||
server = 2-verify-custom-allow-server
|
||||
client = 2-verify-custom-allow-client
|
||||
|
||||
[2-verify-custom-allow-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-verify-custom-allow-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
client = 2-verify-custom-allow-client-extra
|
||||
|
||||
[2-verify-custom-allow-client-extra]
|
||||
VerifyCallback = AcceptAll
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-noverify-success]
|
||||
ssl_conf = 3-noverify-success-ssl
|
||||
|
||||
[3-noverify-success-ssl]
|
||||
server = 3-noverify-success-server
|
||||
client = 3-noverify-success-client
|
||||
|
||||
[3-noverify-success-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-noverify-success-client]
|
||||
CipherString = DEFAULT
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-noverify-ignore-custom-reject]
|
||||
ssl_conf = 4-noverify-ignore-custom-reject-ssl
|
||||
|
||||
[4-noverify-ignore-custom-reject-ssl]
|
||||
server = 4-noverify-ignore-custom-reject-server
|
||||
client = 4-noverify-ignore-custom-reject-client
|
||||
|
||||
[4-noverify-ignore-custom-reject-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-noverify-ignore-custom-reject-client]
|
||||
CipherString = DEFAULT
|
||||
|
||||
[test-4]
|
||||
ExpectedResult = Success
|
||||
client = 4-noverify-ignore-custom-reject-client-extra
|
||||
|
||||
[4-noverify-ignore-custom-reject-client-extra]
|
||||
VerifyCallback = RejectAll
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-noverify-accept-custom-allow]
|
||||
ssl_conf = 5-noverify-accept-custom-allow-ssl
|
||||
|
||||
[5-noverify-accept-custom-allow-ssl]
|
||||
server = 5-noverify-accept-custom-allow-server
|
||||
client = 5-noverify-accept-custom-allow-client
|
||||
|
||||
[5-noverify-accept-custom-allow-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-noverify-accept-custom-allow-client]
|
||||
CipherString = DEFAULT
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = Success
|
||||
client = 5-noverify-accept-custom-allow-client-extra
|
||||
|
||||
[5-noverify-accept-custom-allow-client-extra]
|
||||
VerifyCallback = AcceptAll
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-verify-fail-no-root]
|
||||
ssl_conf = 6-verify-fail-no-root-ssl
|
||||
|
||||
[6-verify-fail-no-root-ssl]
|
||||
server = 6-verify-fail-no-root-server
|
||||
client = 6-verify-fail-no-root-client
|
||||
|
||||
[6-verify-fail-no-root-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-verify-fail-no-root-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedClientAlert = UnknownCA
|
||||
ExpectedResult = ClientFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-verify-custom-success-no-root]
|
||||
ssl_conf = 7-verify-custom-success-no-root-ssl
|
||||
|
||||
[7-verify-custom-success-no-root-ssl]
|
||||
server = 7-verify-custom-success-no-root-server
|
||||
client = 7-verify-custom-success-no-root-client
|
||||
|
||||
[7-verify-custom-success-no-root-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-verify-custom-success-no-root-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedResult = Success
|
||||
client = 7-verify-custom-success-no-root-client-extra
|
||||
|
||||
[7-verify-custom-success-no-root-client-extra]
|
||||
VerifyCallback = AcceptAll
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-verify-custom-fail-no-root]
|
||||
ssl_conf = 8-verify-custom-fail-no-root-ssl
|
||||
|
||||
[8-verify-custom-fail-no-root-ssl]
|
||||
server = 8-verify-custom-fail-no-root-server
|
||||
client = 8-verify-custom-fail-no-root-client
|
||||
|
||||
[8-verify-custom-fail-no-root-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-verify-custom-fail-no-root-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedClientAlert = HandshakeFailure
|
||||
ExpectedResult = ClientFail
|
||||
client = 8-verify-custom-fail-no-root-client-extra
|
||||
|
||||
[8-verify-custom-fail-no-root-client-extra]
|
||||
VerifyCallback = RejectAll
|
||||
|
||||
|
||||
145
test/ssl-tests/03-custom_verify.conf.in
Normal file
145
test/ssl-tests/03-custom_verify.conf.in
Normal file
@@ -0,0 +1,145 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
package ssltests;
|
||||
|
||||
our @tests = (
|
||||
|
||||
# Sanity-check that verification indeed succeeds without the
|
||||
# restrictive callback.
|
||||
{
|
||||
name => "verify-success",
|
||||
server => { },
|
||||
client => { },
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
},
|
||||
|
||||
# Same test as above but with a custom callback that always fails.
|
||||
{
|
||||
name => "verify-custom-reject",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
"VerifyCallback" => "RejectAll",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ClientFail",
|
||||
"ExpectedClientAlert" => "HandshakeFailure",
|
||||
},
|
||||
},
|
||||
|
||||
# Same test as above but with a custom callback that always succeeds.
|
||||
{
|
||||
name => "verify-custom-allow",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
"VerifyCallback" => "AcceptAll",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
|
||||
# Sanity-check that verification indeed succeeds if peer verification
|
||||
# is not requested.
|
||||
{
|
||||
name => "noverify-success",
|
||||
server => { },
|
||||
client => {
|
||||
"VerifyMode" => undef,
|
||||
"VerifyCAFile" => undef,
|
||||
},
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
},
|
||||
|
||||
# Same test as above but with a custom callback that always fails.
|
||||
# The callback return has no impact on handshake success in this mode.
|
||||
{
|
||||
name => "noverify-ignore-custom-reject",
|
||||
server => { },
|
||||
client => {
|
||||
"VerifyMode" => undef,
|
||||
"VerifyCAFile" => undef,
|
||||
extra => {
|
||||
"VerifyCallback" => "RejectAll",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
|
||||
# Same test as above but with a custom callback that always succeeds.
|
||||
# The callback return has no impact on handshake success in this mode.
|
||||
{
|
||||
name => "noverify-accept-custom-allow",
|
||||
server => { },
|
||||
client => {
|
||||
"VerifyMode" => undef,
|
||||
"VerifyCAFile" => undef,
|
||||
extra => {
|
||||
"VerifyCallback" => "AcceptAll",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
|
||||
# Sanity-check that verification indeed fails without the
|
||||
# permissive callback.
|
||||
{
|
||||
name => "verify-fail-no-root",
|
||||
server => { },
|
||||
client => {
|
||||
# Don't set up the client root file.
|
||||
"VerifyCAFile" => undef,
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ClientFail",
|
||||
"ExpectedClientAlert" => "UnknownCA",
|
||||
},
|
||||
},
|
||||
|
||||
# Same test as above but with a custom callback that always succeeds.
|
||||
{
|
||||
name => "verify-custom-success-no-root",
|
||||
server => { },
|
||||
client => {
|
||||
"VerifyCAFile" => undef,
|
||||
extra => {
|
||||
"VerifyCallback" => "AcceptAll",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
|
||||
# Same test as above but with a custom callback that always fails.
|
||||
{
|
||||
name => "verify-custom-fail-no-root",
|
||||
server => { },
|
||||
client => {
|
||||
"VerifyCAFile" => undef,
|
||||
extra => {
|
||||
"VerifyCallback" => "RejectAll",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ClientFail",
|
||||
"ExpectedClientAlert" => "HandshakeFailure",
|
||||
},
|
||||
},
|
||||
);
|
||||
1132
test/ssl-tests/04-client_auth.conf
Normal file
1132
test/ssl-tests/04-client_auth.conf
Normal file
File diff suppressed because it is too large
Load Diff
196
test/ssl-tests/04-client_auth.conf.in
Normal file
196
test/ssl-tests/04-client_auth.conf.in
Normal file
@@ -0,0 +1,196 @@
|
||||
# -*- mode: perl; -*-
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
package ssltests;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use OpenSSL::Test;
|
||||
use OpenSSL::Test::Utils qw(anydisabled disabled);
|
||||
setup("no_test_here");
|
||||
|
||||
# We test version-flexible negotiation (undef) and each protocol version.
|
||||
my @protocols = (undef, "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "DTLSv1", "DTLSv1.2");
|
||||
|
||||
my @is_disabled = (0);
|
||||
push @is_disabled, anydisabled("ssl3", "tls1", "tls1_1", "tls1_2", "dtls1", "dtls1_2");
|
||||
|
||||
our @tests = ();
|
||||
|
||||
sub generate_tests() {
|
||||
foreach (0..$#protocols) {
|
||||
my $protocol = $protocols[$_];
|
||||
my $protocol_name = $protocol || "flex";
|
||||
my $caalert;
|
||||
my $method;
|
||||
my $sctpenabled = 0;
|
||||
if (!$is_disabled[$_]) {
|
||||
if ($protocol_name eq "SSLv3") {
|
||||
$caalert = "BadCertificate";
|
||||
} else {
|
||||
$caalert = "UnknownCA";
|
||||
}
|
||||
if ($protocol_name =~ m/^DTLS/) {
|
||||
$method = "DTLS";
|
||||
$sctpenabled = 1 if !disabled("sctp");
|
||||
}
|
||||
my $clihash;
|
||||
my $clisigtype;
|
||||
my $clisigalgs;
|
||||
# TODO(TLS1.3) add TLSv1.3 versions
|
||||
if ($protocol_name eq "TLSv1.2") {
|
||||
$clihash = "SHA256";
|
||||
$clisigtype = "RSA";
|
||||
$clisigalgs = "SHA256+RSA";
|
||||
}
|
||||
for (my $sctp = 0; $sctp <= $sctpenabled; $sctp++) {
|
||||
# Sanity-check simple handshake.
|
||||
push @tests, {
|
||||
name => "server-auth-${protocol_name}"
|
||||
.($sctp ? "-sctp" : ""),
|
||||
server => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
"Method" => $method,
|
||||
},
|
||||
};
|
||||
$tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp;
|
||||
|
||||
# Handshake with client cert requested but not required or received.
|
||||
push @tests, {
|
||||
name => "client-auth-${protocol_name}-request"
|
||||
.($sctp ? "-sctp" : ""),
|
||||
server => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"VerifyMode" => "Request"
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
"Method" => $method,
|
||||
},
|
||||
};
|
||||
$tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp;
|
||||
|
||||
# Handshake with client cert required but not present.
|
||||
push @tests, {
|
||||
name => "client-auth-${protocol_name}-require-fail"
|
||||
.($sctp ? "-sctp" : ""),
|
||||
server => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"ExpectedServerAlert" =>
|
||||
($protocol_name eq "flex" && !disabled("tls1_3"))
|
||||
? "CertificateRequired" : "HandshakeFailure",
|
||||
"Method" => $method,
|
||||
},
|
||||
};
|
||||
$tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp;
|
||||
|
||||
# Successful handshake with client authentication.
|
||||
push @tests, {
|
||||
name => "client-auth-${protocol_name}-require"
|
||||
.($sctp ? "-sctp" : ""),
|
||||
server => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"ClientSignatureAlgorithms" => $clisigalgs,
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Request",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
"ExpectedClientCertType" => "RSA",
|
||||
"ExpectedClientSignType" => $clisigtype,
|
||||
"ExpectedClientSignHash" => $clihash,
|
||||
"ExpectedClientCANames" => "empty",
|
||||
"Method" => $method,
|
||||
},
|
||||
};
|
||||
$tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp;
|
||||
|
||||
# Successful handshake with client authentication non-empty names
|
||||
push @tests, {
|
||||
name => "client-auth-${protocol_name}-require-non-empty-names"
|
||||
.($sctp ? "-sctp" : ""),
|
||||
server => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"ClientSignatureAlgorithms" => $clisigalgs,
|
||||
"ClientCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Request",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
"ExpectedClientCertType" => "RSA",
|
||||
"ExpectedClientSignType" => $clisigtype,
|
||||
"ExpectedClientSignHash" => $clihash,
|
||||
"ExpectedClientCANames" => test_pem("root-cert.pem"),
|
||||
"Method" => $method,
|
||||
},
|
||||
};
|
||||
$tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp;
|
||||
|
||||
# Handshake with client authentication but without the root certificate.
|
||||
push @tests, {
|
||||
name => "client-auth-${protocol_name}-noroot"
|
||||
.($sctp ? "-sctp" : ""),
|
||||
server => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"VerifyMode" => "Require",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"ExpectedServerAlert" => $caalert,
|
||||
"Method" => $method,
|
||||
},
|
||||
};
|
||||
$tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
generate_tests();
|
||||
308
test/ssl-tests/05-sni.conf
Normal file
308
test/ssl-tests/05-sni.conf
Normal file
@@ -0,0 +1,308 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 9
|
||||
|
||||
test-0 = 0-SNI-switch-context
|
||||
test-1 = 1-SNI-keep-context
|
||||
test-2 = 2-SNI-no-server-support
|
||||
test-3 = 3-SNI-no-client-support
|
||||
test-4 = 4-SNI-bad-sni-ignore-mismatch
|
||||
test-5 = 5-SNI-bad-sni-reject-mismatch
|
||||
test-6 = 6-SNI-bad-clienthello-sni-ignore-mismatch
|
||||
test-7 = 7-SNI-bad-clienthello-sni-reject-mismatch
|
||||
test-8 = 8-SNI-clienthello-disable-v12
|
||||
# ===========================================================
|
||||
|
||||
[0-SNI-switch-context]
|
||||
ssl_conf = 0-SNI-switch-context-ssl
|
||||
|
||||
[0-SNI-switch-context-ssl]
|
||||
server = 0-SNI-switch-context-server
|
||||
client = 0-SNI-switch-context-client
|
||||
server2 = 0-SNI-switch-context-server
|
||||
|
||||
[0-SNI-switch-context-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-SNI-switch-context-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
server = 0-SNI-switch-context-server-extra
|
||||
server2 = 0-SNI-switch-context-server-extra
|
||||
client = 0-SNI-switch-context-client-extra
|
||||
|
||||
[0-SNI-switch-context-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[0-SNI-switch-context-client-extra]
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-SNI-keep-context]
|
||||
ssl_conf = 1-SNI-keep-context-ssl
|
||||
|
||||
[1-SNI-keep-context-ssl]
|
||||
server = 1-SNI-keep-context-server
|
||||
client = 1-SNI-keep-context-client
|
||||
server2 = 1-SNI-keep-context-server
|
||||
|
||||
[1-SNI-keep-context-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-SNI-keep-context-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
server = 1-SNI-keep-context-server-extra
|
||||
server2 = 1-SNI-keep-context-server-extra
|
||||
client = 1-SNI-keep-context-client-extra
|
||||
|
||||
[1-SNI-keep-context-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[1-SNI-keep-context-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-SNI-no-server-support]
|
||||
ssl_conf = 2-SNI-no-server-support-ssl
|
||||
|
||||
[2-SNI-no-server-support-ssl]
|
||||
server = 2-SNI-no-server-support-server
|
||||
client = 2-SNI-no-server-support-client
|
||||
|
||||
[2-SNI-no-server-support-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-SNI-no-server-support-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
client = 2-SNI-no-server-support-client-extra
|
||||
|
||||
[2-SNI-no-server-support-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-SNI-no-client-support]
|
||||
ssl_conf = 3-SNI-no-client-support-ssl
|
||||
|
||||
[3-SNI-no-client-support-ssl]
|
||||
server = 3-SNI-no-client-support-server
|
||||
client = 3-SNI-no-client-support-client
|
||||
server2 = 3-SNI-no-client-support-server
|
||||
|
||||
[3-SNI-no-client-support-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-SNI-no-client-support-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
server = 3-SNI-no-client-support-server-extra
|
||||
server2 = 3-SNI-no-client-support-server-extra
|
||||
|
||||
[3-SNI-no-client-support-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-SNI-bad-sni-ignore-mismatch]
|
||||
ssl_conf = 4-SNI-bad-sni-ignore-mismatch-ssl
|
||||
|
||||
[4-SNI-bad-sni-ignore-mismatch-ssl]
|
||||
server = 4-SNI-bad-sni-ignore-mismatch-server
|
||||
client = 4-SNI-bad-sni-ignore-mismatch-client
|
||||
server2 = 4-SNI-bad-sni-ignore-mismatch-server
|
||||
|
||||
[4-SNI-bad-sni-ignore-mismatch-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-SNI-bad-sni-ignore-mismatch-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
server = 4-SNI-bad-sni-ignore-mismatch-server-extra
|
||||
server2 = 4-SNI-bad-sni-ignore-mismatch-server-extra
|
||||
client = 4-SNI-bad-sni-ignore-mismatch-client-extra
|
||||
|
||||
[4-SNI-bad-sni-ignore-mismatch-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[4-SNI-bad-sni-ignore-mismatch-client-extra]
|
||||
ServerName = invalid
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-SNI-bad-sni-reject-mismatch]
|
||||
ssl_conf = 5-SNI-bad-sni-reject-mismatch-ssl
|
||||
|
||||
[5-SNI-bad-sni-reject-mismatch-ssl]
|
||||
server = 5-SNI-bad-sni-reject-mismatch-server
|
||||
client = 5-SNI-bad-sni-reject-mismatch-client
|
||||
server2 = 5-SNI-bad-sni-reject-mismatch-server
|
||||
|
||||
[5-SNI-bad-sni-reject-mismatch-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-SNI-bad-sni-reject-mismatch-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = UnrecognizedName
|
||||
server = 5-SNI-bad-sni-reject-mismatch-server-extra
|
||||
server2 = 5-SNI-bad-sni-reject-mismatch-server-extra
|
||||
client = 5-SNI-bad-sni-reject-mismatch-client-extra
|
||||
|
||||
[5-SNI-bad-sni-reject-mismatch-server-extra]
|
||||
ServerNameCallback = RejectMismatch
|
||||
|
||||
[5-SNI-bad-sni-reject-mismatch-client-extra]
|
||||
ServerName = invalid
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-SNI-bad-clienthello-sni-ignore-mismatch]
|
||||
ssl_conf = 6-SNI-bad-clienthello-sni-ignore-mismatch-ssl
|
||||
|
||||
[6-SNI-bad-clienthello-sni-ignore-mismatch-ssl]
|
||||
server = 6-SNI-bad-clienthello-sni-ignore-mismatch-server
|
||||
client = 6-SNI-bad-clienthello-sni-ignore-mismatch-client
|
||||
server2 = 6-SNI-bad-clienthello-sni-ignore-mismatch-server
|
||||
|
||||
[6-SNI-bad-clienthello-sni-ignore-mismatch-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-SNI-bad-clienthello-sni-ignore-mismatch-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
server = 6-SNI-bad-clienthello-sni-ignore-mismatch-server-extra
|
||||
server2 = 6-SNI-bad-clienthello-sni-ignore-mismatch-server-extra
|
||||
client = 6-SNI-bad-clienthello-sni-ignore-mismatch-client-extra
|
||||
|
||||
[6-SNI-bad-clienthello-sni-ignore-mismatch-server-extra]
|
||||
ServerNameCallback = ClientHelloIgnoreMismatch
|
||||
|
||||
[6-SNI-bad-clienthello-sni-ignore-mismatch-client-extra]
|
||||
ServerName = invalid
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-SNI-bad-clienthello-sni-reject-mismatch]
|
||||
ssl_conf = 7-SNI-bad-clienthello-sni-reject-mismatch-ssl
|
||||
|
||||
[7-SNI-bad-clienthello-sni-reject-mismatch-ssl]
|
||||
server = 7-SNI-bad-clienthello-sni-reject-mismatch-server
|
||||
client = 7-SNI-bad-clienthello-sni-reject-mismatch-client
|
||||
server2 = 7-SNI-bad-clienthello-sni-reject-mismatch-server
|
||||
|
||||
[7-SNI-bad-clienthello-sni-reject-mismatch-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-SNI-bad-clienthello-sni-reject-mismatch-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = UnrecognizedName
|
||||
server = 7-SNI-bad-clienthello-sni-reject-mismatch-server-extra
|
||||
server2 = 7-SNI-bad-clienthello-sni-reject-mismatch-server-extra
|
||||
client = 7-SNI-bad-clienthello-sni-reject-mismatch-client-extra
|
||||
|
||||
[7-SNI-bad-clienthello-sni-reject-mismatch-server-extra]
|
||||
ServerNameCallback = ClientHelloRejectMismatch
|
||||
|
||||
[7-SNI-bad-clienthello-sni-reject-mismatch-client-extra]
|
||||
ServerName = invalid
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-SNI-clienthello-disable-v12]
|
||||
ssl_conf = 8-SNI-clienthello-disable-v12-ssl
|
||||
|
||||
[8-SNI-clienthello-disable-v12-ssl]
|
||||
server = 8-SNI-clienthello-disable-v12-server
|
||||
client = 8-SNI-clienthello-disable-v12-client
|
||||
server2 = 8-SNI-clienthello-disable-v12-server
|
||||
|
||||
[8-SNI-clienthello-disable-v12-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-SNI-clienthello-disable-v12-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedProtocol = TLSv1.1
|
||||
ExpectedServerName = server2
|
||||
server = 8-SNI-clienthello-disable-v12-server-extra
|
||||
server2 = 8-SNI-clienthello-disable-v12-server-extra
|
||||
client = 8-SNI-clienthello-disable-v12-client-extra
|
||||
|
||||
[8-SNI-clienthello-disable-v12-server-extra]
|
||||
ServerNameCallback = ClientHelloNoV12
|
||||
|
||||
[8-SNI-clienthello-disable-v12-client-extra]
|
||||
ServerName = server2
|
||||
|
||||
|
||||
169
test/ssl-tests/05-sni.conf.in
Normal file
169
test/ssl-tests/05-sni.conf.in
Normal file
@@ -0,0 +1,169 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "SNI-switch-context",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ServerName" => "server2",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server2",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "SNI-keep-context",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ServerName" => "server1",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server1",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "SNI-no-server-support",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
"ServerName" => "server1",
|
||||
},
|
||||
},
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
},
|
||||
{
|
||||
name => "SNI-no-client-support",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
client => { },
|
||||
test => {
|
||||
# We expect that the callback is still called
|
||||
# to let the application decide whether they tolerate
|
||||
# missing SNI (as our test callback does).
|
||||
"ExpectedServerName" => "server1",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "SNI-bad-sni-ignore-mismatch",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ServerName" => "invalid",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server1",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "SNI-bad-sni-reject-mismatch",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "RejectMismatch",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ServerName" => "invalid",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"ExpectedServerAlert" => "UnrecognizedName"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "SNI-bad-clienthello-sni-ignore-mismatch",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "ClientHelloIgnoreMismatch",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ServerName" => "invalid",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server1",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "SNI-bad-clienthello-sni-reject-mismatch",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "ClientHelloRejectMismatch",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ServerName" => "invalid",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"ExpectedServerAlert" => "UnrecognizedName"
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
our @tests_tls_1_1 = (
|
||||
{
|
||||
name => "SNI-clienthello-disable-v12",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "ClientHelloNoV12",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ServerName" => "server2",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedProtocol" => "TLSv1.1",
|
||||
"ExpectedServerName" => "server2",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
push @tests, @tests_tls_1_1 unless disabled("tls1_1");
|
||||
767
test/ssl-tests/06-sni-ticket.conf
Normal file
767
test/ssl-tests/06-sni-ticket.conf
Normal file
@@ -0,0 +1,767 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 17
|
||||
|
||||
test-0 = 0-sni-session-ticket
|
||||
test-1 = 1-sni-session-ticket
|
||||
test-2 = 2-sni-session-ticket
|
||||
test-3 = 3-sni-session-ticket
|
||||
test-4 = 4-sni-session-ticket
|
||||
test-5 = 5-sni-session-ticket
|
||||
test-6 = 6-sni-session-ticket
|
||||
test-7 = 7-sni-session-ticket
|
||||
test-8 = 8-sni-session-ticket
|
||||
test-9 = 9-sni-session-ticket
|
||||
test-10 = 10-sni-session-ticket
|
||||
test-11 = 11-sni-session-ticket
|
||||
test-12 = 12-sni-session-ticket
|
||||
test-13 = 13-sni-session-ticket
|
||||
test-14 = 14-sni-session-ticket
|
||||
test-15 = 15-sni-session-ticket
|
||||
test-16 = 16-sni-session-ticket
|
||||
# ===========================================================
|
||||
|
||||
[0-sni-session-ticket]
|
||||
ssl_conf = 0-sni-session-ticket-ssl
|
||||
|
||||
[0-sni-session-ticket-ssl]
|
||||
server = 0-sni-session-ticket-server
|
||||
client = 0-sni-session-ticket-client
|
||||
server2 = 0-sni-session-ticket-server2
|
||||
|
||||
[0-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
SessionTicketExpected = No
|
||||
server = 0-sni-session-ticket-server-extra
|
||||
client = 0-sni-session-ticket-client-extra
|
||||
|
||||
[0-sni-session-ticket-server-extra]
|
||||
BrokenSessionTicket = Yes
|
||||
|
||||
[0-sni-session-ticket-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-sni-session-ticket]
|
||||
ssl_conf = 1-sni-session-ticket-ssl
|
||||
|
||||
[1-sni-session-ticket-ssl]
|
||||
server = 1-sni-session-ticket-server
|
||||
client = 1-sni-session-ticket-client
|
||||
server2 = 1-sni-session-ticket-server2
|
||||
|
||||
[1-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = Yes
|
||||
server = 1-sni-session-ticket-server-extra
|
||||
client = 1-sni-session-ticket-client-extra
|
||||
|
||||
[1-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[1-sni-session-ticket-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-sni-session-ticket]
|
||||
ssl_conf = 2-sni-session-ticket-ssl
|
||||
|
||||
[2-sni-session-ticket-ssl]
|
||||
server = 2-sni-session-ticket-server
|
||||
client = 2-sni-session-ticket-client
|
||||
server2 = 2-sni-session-ticket-server2
|
||||
|
||||
[2-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = Yes
|
||||
server = 2-sni-session-ticket-server-extra
|
||||
client = 2-sni-session-ticket-client-extra
|
||||
|
||||
[2-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[2-sni-session-ticket-client-extra]
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-sni-session-ticket]
|
||||
ssl_conf = 3-sni-session-ticket-ssl
|
||||
|
||||
[3-sni-session-ticket-ssl]
|
||||
server = 3-sni-session-ticket-server
|
||||
client = 3-sni-session-ticket-client
|
||||
server2 = 3-sni-session-ticket-server2
|
||||
|
||||
[3-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = Yes
|
||||
server = 3-sni-session-ticket-server-extra
|
||||
client = 3-sni-session-ticket-client-extra
|
||||
|
||||
[3-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[3-sni-session-ticket-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-sni-session-ticket]
|
||||
ssl_conf = 4-sni-session-ticket-ssl
|
||||
|
||||
[4-sni-session-ticket-ssl]
|
||||
server = 4-sni-session-ticket-server
|
||||
client = 4-sni-session-ticket-client
|
||||
server2 = 4-sni-session-ticket-server2
|
||||
|
||||
[4-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 4-sni-session-ticket-server-extra
|
||||
client = 4-sni-session-ticket-client-extra
|
||||
|
||||
[4-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[4-sni-session-ticket-client-extra]
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-sni-session-ticket]
|
||||
ssl_conf = 5-sni-session-ticket-ssl
|
||||
|
||||
[5-sni-session-ticket-ssl]
|
||||
server = 5-sni-session-ticket-server
|
||||
client = 5-sni-session-ticket-client
|
||||
server2 = 5-sni-session-ticket-server2
|
||||
|
||||
[5-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 5-sni-session-ticket-server-extra
|
||||
client = 5-sni-session-ticket-client-extra
|
||||
|
||||
[5-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[5-sni-session-ticket-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-sni-session-ticket]
|
||||
ssl_conf = 6-sni-session-ticket-ssl
|
||||
|
||||
[6-sni-session-ticket-ssl]
|
||||
server = 6-sni-session-ticket-server
|
||||
client = 6-sni-session-ticket-client
|
||||
server2 = 6-sni-session-ticket-server2
|
||||
|
||||
[6-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 6-sni-session-ticket-server-extra
|
||||
client = 6-sni-session-ticket-client-extra
|
||||
|
||||
[6-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[6-sni-session-ticket-client-extra]
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-sni-session-ticket]
|
||||
ssl_conf = 7-sni-session-ticket-ssl
|
||||
|
||||
[7-sni-session-ticket-ssl]
|
||||
server = 7-sni-session-ticket-server
|
||||
client = 7-sni-session-ticket-client
|
||||
server2 = 7-sni-session-ticket-server2
|
||||
|
||||
[7-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 7-sni-session-ticket-server-extra
|
||||
client = 7-sni-session-ticket-client-extra
|
||||
|
||||
[7-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[7-sni-session-ticket-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-sni-session-ticket]
|
||||
ssl_conf = 8-sni-session-ticket-ssl
|
||||
|
||||
[8-sni-session-ticket-ssl]
|
||||
server = 8-sni-session-ticket-server
|
||||
client = 8-sni-session-ticket-client
|
||||
server2 = 8-sni-session-ticket-server2
|
||||
|
||||
[8-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 8-sni-session-ticket-server-extra
|
||||
client = 8-sni-session-ticket-client-extra
|
||||
|
||||
[8-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[8-sni-session-ticket-client-extra]
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[9-sni-session-ticket]
|
||||
ssl_conf = 9-sni-session-ticket-ssl
|
||||
|
||||
[9-sni-session-ticket-ssl]
|
||||
server = 9-sni-session-ticket-server
|
||||
client = 9-sni-session-ticket-client
|
||||
server2 = 9-sni-session-ticket-server2
|
||||
|
||||
[9-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-9]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 9-sni-session-ticket-server-extra
|
||||
client = 9-sni-session-ticket-client-extra
|
||||
|
||||
[9-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[9-sni-session-ticket-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[10-sni-session-ticket]
|
||||
ssl_conf = 10-sni-session-ticket-ssl
|
||||
|
||||
[10-sni-session-ticket-ssl]
|
||||
server = 10-sni-session-ticket-server
|
||||
client = 10-sni-session-ticket-client
|
||||
server2 = 10-sni-session-ticket-server2
|
||||
|
||||
[10-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[10-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[10-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-10]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 10-sni-session-ticket-server-extra
|
||||
client = 10-sni-session-ticket-client-extra
|
||||
|
||||
[10-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[10-sni-session-ticket-client-extra]
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[11-sni-session-ticket]
|
||||
ssl_conf = 11-sni-session-ticket-ssl
|
||||
|
||||
[11-sni-session-ticket-ssl]
|
||||
server = 11-sni-session-ticket-server
|
||||
client = 11-sni-session-ticket-client
|
||||
server2 = 11-sni-session-ticket-server2
|
||||
|
||||
[11-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-11]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 11-sni-session-ticket-server-extra
|
||||
client = 11-sni-session-ticket-client-extra
|
||||
|
||||
[11-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[11-sni-session-ticket-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[12-sni-session-ticket]
|
||||
ssl_conf = 12-sni-session-ticket-ssl
|
||||
|
||||
[12-sni-session-ticket-ssl]
|
||||
server = 12-sni-session-ticket-server
|
||||
client = 12-sni-session-ticket-client
|
||||
server2 = 12-sni-session-ticket-server2
|
||||
|
||||
[12-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[12-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[12-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-12]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 12-sni-session-ticket-server-extra
|
||||
client = 12-sni-session-ticket-client-extra
|
||||
|
||||
[12-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[12-sni-session-ticket-client-extra]
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[13-sni-session-ticket]
|
||||
ssl_conf = 13-sni-session-ticket-ssl
|
||||
|
||||
[13-sni-session-ticket-ssl]
|
||||
server = 13-sni-session-ticket-server
|
||||
client = 13-sni-session-ticket-client
|
||||
server2 = 13-sni-session-ticket-server2
|
||||
|
||||
[13-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-13]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 13-sni-session-ticket-server-extra
|
||||
client = 13-sni-session-ticket-client-extra
|
||||
|
||||
[13-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[13-sni-session-ticket-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[14-sni-session-ticket]
|
||||
ssl_conf = 14-sni-session-ticket-ssl
|
||||
|
||||
[14-sni-session-ticket-ssl]
|
||||
server = 14-sni-session-ticket-server
|
||||
client = 14-sni-session-ticket-client
|
||||
server2 = 14-sni-session-ticket-server2
|
||||
|
||||
[14-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[14-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[14-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-14]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 14-sni-session-ticket-server-extra
|
||||
client = 14-sni-session-ticket-client-extra
|
||||
|
||||
[14-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[14-sni-session-ticket-client-extra]
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[15-sni-session-ticket]
|
||||
ssl_conf = 15-sni-session-ticket-ssl
|
||||
|
||||
[15-sni-session-ticket-ssl]
|
||||
server = 15-sni-session-ticket-server
|
||||
client = 15-sni-session-ticket-client
|
||||
server2 = 15-sni-session-ticket-server2
|
||||
|
||||
[15-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[15-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[15-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-15]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 15-sni-session-ticket-server-extra
|
||||
client = 15-sni-session-ticket-client-extra
|
||||
|
||||
[15-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[15-sni-session-ticket-client-extra]
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[16-sni-session-ticket]
|
||||
ssl_conf = 16-sni-session-ticket-ssl
|
||||
|
||||
[16-sni-session-ticket-ssl]
|
||||
server = 16-sni-session-ticket-server
|
||||
client = 16-sni-session-ticket-client
|
||||
server2 = 16-sni-session-ticket-server2
|
||||
|
||||
[16-sni-session-ticket-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[16-sni-session-ticket-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[16-sni-session-ticket-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-16]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
SessionIdExpected = Yes
|
||||
SessionTicketExpected = No
|
||||
server = 16-sni-session-ticket-server-extra
|
||||
client = 16-sni-session-ticket-client-extra
|
||||
|
||||
[16-sni-session-ticket-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[16-sni-session-ticket-client-extra]
|
||||
ServerName = server2
|
||||
|
||||
|
||||
101
test/ssl-tests/06-sni-ticket.conf.in
Normal file
101
test/ssl-tests/06-sni-ticket.conf.in
Normal file
@@ -0,0 +1,101 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test SNI/Session tickets
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
|
||||
|
||||
our @tests = ();
|
||||
|
||||
#Note: MaxProtocol is set to TLSv1.2 as session tickets work differently in
|
||||
#TLSv1.3.
|
||||
sub generate_tests() {
|
||||
foreach my $c ("SessionTicket", "-SessionTicket") {
|
||||
foreach my $s1 ("SessionTicket", "-SessionTicket") {
|
||||
foreach my $s2 ("SessionTicket", "-SessionTicket") {
|
||||
foreach my $n ("server1", "server2") {
|
||||
my $ticket_result = expected_result($c, $s1, $s2, $n);
|
||||
my $session_id_result = "Yes"; # always, even with a ticket
|
||||
push @tests, {
|
||||
"name" => "sni-session-ticket",
|
||||
"client" => {
|
||||
"Options" => $c,
|
||||
"extra" => {
|
||||
"ServerName" => $n,
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
"server" => {
|
||||
"Options" => $s1,
|
||||
"extra" => {
|
||||
# We don't test mismatch here.
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
"server2" => {
|
||||
"Options" => $s2,
|
||||
},
|
||||
"test" => {
|
||||
"ExpectedServerName" => $n,
|
||||
"ExpectedResult" => "Success",
|
||||
"SessionIdExpected" => $session_id_result,
|
||||
"SessionTicketExpected" => $ticket_result,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# If the client has session tickets disabled, then No support
|
||||
# If the server initial_ctx has session tickets disabled, then No support
|
||||
# If SNI is in use, then if the "switched-to" context has session tickets disabled,
|
||||
# then No support
|
||||
sub expected_result {
|
||||
my ($c, $s1, $s2, $n) = @_;
|
||||
|
||||
return "No" if $c eq "-SessionTicket";
|
||||
return "No" if $s1 eq "-SessionTicket";
|
||||
return "No" if ($s2 eq "-SessionTicket" && $n eq "server2");
|
||||
|
||||
return "Yes";
|
||||
|
||||
}
|
||||
|
||||
# Add a "Broken" case.
|
||||
push @tests, {
|
||||
"name" => "sni-session-ticket",
|
||||
"client" => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"Options" => "SessionTicket",
|
||||
"extra" => {
|
||||
"ServerName" => "server1",
|
||||
}
|
||||
},
|
||||
"server" => {
|
||||
"Options" => "SessionTicket",
|
||||
"extra" => {
|
||||
"BrokenSessionTicket" => "Yes",
|
||||
},
|
||||
},
|
||||
"server2" => {
|
||||
"Options" => "SessionTicket",
|
||||
},
|
||||
"test" => {
|
||||
"ExpectedResult" => "Success",
|
||||
"SessionTicketExpected" => "No",
|
||||
}
|
||||
};
|
||||
|
||||
generate_tests();
|
||||
1820
test/ssl-tests/07-dtls-protocol-version.conf
Normal file
1820
test/ssl-tests/07-dtls-protocol-version.conf
Normal file
File diff suppressed because it is too large
Load Diff
19
test/ssl-tests/07-dtls-protocol-version.conf.in
Normal file
19
test/ssl-tests/07-dtls-protocol-version.conf.in
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test DTLS version negotiation
|
||||
|
||||
package ssltests;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use protocol_version;
|
||||
|
||||
our @tests = generate_version_tests("DTLS");
|
||||
816
test/ssl-tests/08-npn.conf
Normal file
816
test/ssl-tests/08-npn.conf
Normal file
@@ -0,0 +1,816 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 20
|
||||
|
||||
test-0 = 0-npn-simple
|
||||
test-1 = 1-npn-client-finds-match
|
||||
test-2 = 2-npn-client-honours-server-pref
|
||||
test-3 = 3-npn-client-first-pref-on-mismatch
|
||||
test-4 = 4-npn-no-server-support
|
||||
test-5 = 5-npn-no-client-support
|
||||
test-6 = 6-npn-with-sni-no-context-switch
|
||||
test-7 = 7-npn-with-sni-context-switch
|
||||
test-8 = 8-npn-selected-sni-server-supports-npn
|
||||
test-9 = 9-npn-selected-sni-server-does-not-support-npn
|
||||
test-10 = 10-alpn-preferred-over-npn
|
||||
test-11 = 11-sni-npn-preferred-over-alpn
|
||||
test-12 = 12-npn-simple-resumption
|
||||
test-13 = 13-npn-server-switch-resumption
|
||||
test-14 = 14-npn-client-switch-resumption
|
||||
test-15 = 15-npn-client-first-pref-on-mismatch-resumption
|
||||
test-16 = 16-npn-no-server-support-resumption
|
||||
test-17 = 17-npn-no-client-support-resumption
|
||||
test-18 = 18-alpn-preferred-over-npn-resumption
|
||||
test-19 = 19-npn-used-if-alpn-not-supported-resumption
|
||||
# ===========================================================
|
||||
|
||||
[0-npn-simple]
|
||||
ssl_conf = 0-npn-simple-ssl
|
||||
|
||||
[0-npn-simple-ssl]
|
||||
server = 0-npn-simple-server
|
||||
client = 0-npn-simple-client
|
||||
|
||||
[0-npn-simple-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-npn-simple-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedNPNProtocol = foo
|
||||
server = 0-npn-simple-server-extra
|
||||
client = 0-npn-simple-client-extra
|
||||
|
||||
[0-npn-simple-server-extra]
|
||||
NPNProtocols = foo
|
||||
|
||||
[0-npn-simple-client-extra]
|
||||
NPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-npn-client-finds-match]
|
||||
ssl_conf = 1-npn-client-finds-match-ssl
|
||||
|
||||
[1-npn-client-finds-match-ssl]
|
||||
server = 1-npn-client-finds-match-server
|
||||
client = 1-npn-client-finds-match-client
|
||||
|
||||
[1-npn-client-finds-match-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-npn-client-finds-match-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedNPNProtocol = bar
|
||||
server = 1-npn-client-finds-match-server-extra
|
||||
client = 1-npn-client-finds-match-client-extra
|
||||
|
||||
[1-npn-client-finds-match-server-extra]
|
||||
NPNProtocols = baz,bar
|
||||
|
||||
[1-npn-client-finds-match-client-extra]
|
||||
NPNProtocols = foo,bar
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-npn-client-honours-server-pref]
|
||||
ssl_conf = 2-npn-client-honours-server-pref-ssl
|
||||
|
||||
[2-npn-client-honours-server-pref-ssl]
|
||||
server = 2-npn-client-honours-server-pref-server
|
||||
client = 2-npn-client-honours-server-pref-client
|
||||
|
||||
[2-npn-client-honours-server-pref-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-npn-client-honours-server-pref-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedNPNProtocol = bar
|
||||
server = 2-npn-client-honours-server-pref-server-extra
|
||||
client = 2-npn-client-honours-server-pref-client-extra
|
||||
|
||||
[2-npn-client-honours-server-pref-server-extra]
|
||||
NPNProtocols = bar,foo
|
||||
|
||||
[2-npn-client-honours-server-pref-client-extra]
|
||||
NPNProtocols = foo,bar
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-npn-client-first-pref-on-mismatch]
|
||||
ssl_conf = 3-npn-client-first-pref-on-mismatch-ssl
|
||||
|
||||
[3-npn-client-first-pref-on-mismatch-ssl]
|
||||
server = 3-npn-client-first-pref-on-mismatch-server
|
||||
client = 3-npn-client-first-pref-on-mismatch-client
|
||||
|
||||
[3-npn-client-first-pref-on-mismatch-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-npn-client-first-pref-on-mismatch-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedNPNProtocol = foo
|
||||
server = 3-npn-client-first-pref-on-mismatch-server-extra
|
||||
client = 3-npn-client-first-pref-on-mismatch-client-extra
|
||||
|
||||
[3-npn-client-first-pref-on-mismatch-server-extra]
|
||||
NPNProtocols = baz
|
||||
|
||||
[3-npn-client-first-pref-on-mismatch-client-extra]
|
||||
NPNProtocols = foo,bar
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-npn-no-server-support]
|
||||
ssl_conf = 4-npn-no-server-support-ssl
|
||||
|
||||
[4-npn-no-server-support-ssl]
|
||||
server = 4-npn-no-server-support-server
|
||||
client = 4-npn-no-server-support-client
|
||||
|
||||
[4-npn-no-server-support-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-npn-no-server-support-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
client = 4-npn-no-server-support-client-extra
|
||||
|
||||
[4-npn-no-server-support-client-extra]
|
||||
NPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-npn-no-client-support]
|
||||
ssl_conf = 5-npn-no-client-support-ssl
|
||||
|
||||
[5-npn-no-client-support-ssl]
|
||||
server = 5-npn-no-client-support-server
|
||||
client = 5-npn-no-client-support-client
|
||||
|
||||
[5-npn-no-client-support-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-npn-no-client-support-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
server = 5-npn-no-client-support-server-extra
|
||||
|
||||
[5-npn-no-client-support-server-extra]
|
||||
NPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-npn-with-sni-no-context-switch]
|
||||
ssl_conf = 6-npn-with-sni-no-context-switch-ssl
|
||||
|
||||
[6-npn-with-sni-no-context-switch-ssl]
|
||||
server = 6-npn-with-sni-no-context-switch-server
|
||||
client = 6-npn-with-sni-no-context-switch-client
|
||||
server2 = 6-npn-with-sni-no-context-switch-server2
|
||||
|
||||
[6-npn-with-sni-no-context-switch-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-npn-with-sni-no-context-switch-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-npn-with-sni-no-context-switch-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedNPNProtocol = foo
|
||||
ExpectedServerName = server1
|
||||
server = 6-npn-with-sni-no-context-switch-server-extra
|
||||
server2 = 6-npn-with-sni-no-context-switch-server2-extra
|
||||
client = 6-npn-with-sni-no-context-switch-client-extra
|
||||
|
||||
[6-npn-with-sni-no-context-switch-server-extra]
|
||||
NPNProtocols = foo
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[6-npn-with-sni-no-context-switch-server2-extra]
|
||||
NPNProtocols = bar
|
||||
|
||||
[6-npn-with-sni-no-context-switch-client-extra]
|
||||
NPNProtocols = foo,bar
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-npn-with-sni-context-switch]
|
||||
ssl_conf = 7-npn-with-sni-context-switch-ssl
|
||||
|
||||
[7-npn-with-sni-context-switch-ssl]
|
||||
server = 7-npn-with-sni-context-switch-server
|
||||
client = 7-npn-with-sni-context-switch-client
|
||||
server2 = 7-npn-with-sni-context-switch-server2
|
||||
|
||||
[7-npn-with-sni-context-switch-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-npn-with-sni-context-switch-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-npn-with-sni-context-switch-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedNPNProtocol = bar
|
||||
ExpectedServerName = server2
|
||||
server = 7-npn-with-sni-context-switch-server-extra
|
||||
server2 = 7-npn-with-sni-context-switch-server2-extra
|
||||
client = 7-npn-with-sni-context-switch-client-extra
|
||||
|
||||
[7-npn-with-sni-context-switch-server-extra]
|
||||
NPNProtocols = foo
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[7-npn-with-sni-context-switch-server2-extra]
|
||||
NPNProtocols = bar
|
||||
|
||||
[7-npn-with-sni-context-switch-client-extra]
|
||||
NPNProtocols = foo,bar
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-npn-selected-sni-server-supports-npn]
|
||||
ssl_conf = 8-npn-selected-sni-server-supports-npn-ssl
|
||||
|
||||
[8-npn-selected-sni-server-supports-npn-ssl]
|
||||
server = 8-npn-selected-sni-server-supports-npn-server
|
||||
client = 8-npn-selected-sni-server-supports-npn-client
|
||||
server2 = 8-npn-selected-sni-server-supports-npn-server2
|
||||
|
||||
[8-npn-selected-sni-server-supports-npn-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-npn-selected-sni-server-supports-npn-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-npn-selected-sni-server-supports-npn-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedNPNProtocol = bar
|
||||
ExpectedServerName = server2
|
||||
server = 8-npn-selected-sni-server-supports-npn-server-extra
|
||||
server2 = 8-npn-selected-sni-server-supports-npn-server2-extra
|
||||
client = 8-npn-selected-sni-server-supports-npn-client-extra
|
||||
|
||||
[8-npn-selected-sni-server-supports-npn-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[8-npn-selected-sni-server-supports-npn-server2-extra]
|
||||
NPNProtocols = bar
|
||||
|
||||
[8-npn-selected-sni-server-supports-npn-client-extra]
|
||||
NPNProtocols = foo,bar
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[9-npn-selected-sni-server-does-not-support-npn]
|
||||
ssl_conf = 9-npn-selected-sni-server-does-not-support-npn-ssl
|
||||
|
||||
[9-npn-selected-sni-server-does-not-support-npn-ssl]
|
||||
server = 9-npn-selected-sni-server-does-not-support-npn-server
|
||||
client = 9-npn-selected-sni-server-does-not-support-npn-client
|
||||
server2 = 9-npn-selected-sni-server-does-not-support-npn-server2
|
||||
|
||||
[9-npn-selected-sni-server-does-not-support-npn-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-npn-selected-sni-server-does-not-support-npn-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-npn-selected-sni-server-does-not-support-npn-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-9]
|
||||
ExpectedServerName = server2
|
||||
server = 9-npn-selected-sni-server-does-not-support-npn-server-extra
|
||||
client = 9-npn-selected-sni-server-does-not-support-npn-client-extra
|
||||
|
||||
[9-npn-selected-sni-server-does-not-support-npn-server-extra]
|
||||
NPNProtocols = bar
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[9-npn-selected-sni-server-does-not-support-npn-client-extra]
|
||||
NPNProtocols = foo,bar
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[10-alpn-preferred-over-npn]
|
||||
ssl_conf = 10-alpn-preferred-over-npn-ssl
|
||||
|
||||
[10-alpn-preferred-over-npn-ssl]
|
||||
server = 10-alpn-preferred-over-npn-server
|
||||
client = 10-alpn-preferred-over-npn-client
|
||||
|
||||
[10-alpn-preferred-over-npn-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[10-alpn-preferred-over-npn-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-10]
|
||||
ExpectedALPNProtocol = foo
|
||||
server = 10-alpn-preferred-over-npn-server-extra
|
||||
client = 10-alpn-preferred-over-npn-client-extra
|
||||
|
||||
[10-alpn-preferred-over-npn-server-extra]
|
||||
ALPNProtocols = foo
|
||||
NPNProtocols = bar
|
||||
|
||||
[10-alpn-preferred-over-npn-client-extra]
|
||||
ALPNProtocols = foo
|
||||
NPNProtocols = bar
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[11-sni-npn-preferred-over-alpn]
|
||||
ssl_conf = 11-sni-npn-preferred-over-alpn-ssl
|
||||
|
||||
[11-sni-npn-preferred-over-alpn-ssl]
|
||||
server = 11-sni-npn-preferred-over-alpn-server
|
||||
client = 11-sni-npn-preferred-over-alpn-client
|
||||
server2 = 11-sni-npn-preferred-over-alpn-server2
|
||||
|
||||
[11-sni-npn-preferred-over-alpn-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-sni-npn-preferred-over-alpn-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-sni-npn-preferred-over-alpn-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-11]
|
||||
ExpectedNPNProtocol = bar
|
||||
ExpectedServerName = server2
|
||||
server = 11-sni-npn-preferred-over-alpn-server-extra
|
||||
server2 = 11-sni-npn-preferred-over-alpn-server2-extra
|
||||
client = 11-sni-npn-preferred-over-alpn-client-extra
|
||||
|
||||
[11-sni-npn-preferred-over-alpn-server-extra]
|
||||
ALPNProtocols = foo
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[11-sni-npn-preferred-over-alpn-server2-extra]
|
||||
NPNProtocols = bar
|
||||
|
||||
[11-sni-npn-preferred-over-alpn-client-extra]
|
||||
ALPNProtocols = foo
|
||||
NPNProtocols = bar
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[12-npn-simple-resumption]
|
||||
ssl_conf = 12-npn-simple-resumption-ssl
|
||||
|
||||
[12-npn-simple-resumption-ssl]
|
||||
server = 12-npn-simple-resumption-server
|
||||
client = 12-npn-simple-resumption-client
|
||||
resume-server = 12-npn-simple-resumption-server
|
||||
resume-client = 12-npn-simple-resumption-client
|
||||
|
||||
[12-npn-simple-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[12-npn-simple-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-12]
|
||||
ExpectedNPNProtocol = foo
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 12-npn-simple-resumption-server-extra
|
||||
resume-server = 12-npn-simple-resumption-server-extra
|
||||
client = 12-npn-simple-resumption-client-extra
|
||||
resume-client = 12-npn-simple-resumption-client-extra
|
||||
|
||||
[12-npn-simple-resumption-server-extra]
|
||||
NPNProtocols = foo
|
||||
|
||||
[12-npn-simple-resumption-client-extra]
|
||||
NPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[13-npn-server-switch-resumption]
|
||||
ssl_conf = 13-npn-server-switch-resumption-ssl
|
||||
|
||||
[13-npn-server-switch-resumption-ssl]
|
||||
server = 13-npn-server-switch-resumption-server
|
||||
client = 13-npn-server-switch-resumption-client
|
||||
resume-server = 13-npn-server-switch-resumption-resume-server
|
||||
resume-client = 13-npn-server-switch-resumption-client
|
||||
|
||||
[13-npn-server-switch-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-npn-server-switch-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-npn-server-switch-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-13]
|
||||
ExpectedNPNProtocol = baz
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 13-npn-server-switch-resumption-server-extra
|
||||
resume-server = 13-npn-server-switch-resumption-resume-server-extra
|
||||
client = 13-npn-server-switch-resumption-client-extra
|
||||
resume-client = 13-npn-server-switch-resumption-client-extra
|
||||
|
||||
[13-npn-server-switch-resumption-server-extra]
|
||||
NPNProtocols = bar,foo
|
||||
|
||||
[13-npn-server-switch-resumption-resume-server-extra]
|
||||
NPNProtocols = baz,foo
|
||||
|
||||
[13-npn-server-switch-resumption-client-extra]
|
||||
NPNProtocols = foo,bar,baz
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[14-npn-client-switch-resumption]
|
||||
ssl_conf = 14-npn-client-switch-resumption-ssl
|
||||
|
||||
[14-npn-client-switch-resumption-ssl]
|
||||
server = 14-npn-client-switch-resumption-server
|
||||
client = 14-npn-client-switch-resumption-client
|
||||
resume-server = 14-npn-client-switch-resumption-server
|
||||
resume-client = 14-npn-client-switch-resumption-resume-client
|
||||
|
||||
[14-npn-client-switch-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[14-npn-client-switch-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[14-npn-client-switch-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-14]
|
||||
ExpectedNPNProtocol = bar
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 14-npn-client-switch-resumption-server-extra
|
||||
resume-server = 14-npn-client-switch-resumption-server-extra
|
||||
client = 14-npn-client-switch-resumption-client-extra
|
||||
resume-client = 14-npn-client-switch-resumption-resume-client-extra
|
||||
|
||||
[14-npn-client-switch-resumption-server-extra]
|
||||
NPNProtocols = foo,bar,baz
|
||||
|
||||
[14-npn-client-switch-resumption-client-extra]
|
||||
NPNProtocols = foo,baz
|
||||
|
||||
[14-npn-client-switch-resumption-resume-client-extra]
|
||||
NPNProtocols = bar,baz
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[15-npn-client-first-pref-on-mismatch-resumption]
|
||||
ssl_conf = 15-npn-client-first-pref-on-mismatch-resumption-ssl
|
||||
|
||||
[15-npn-client-first-pref-on-mismatch-resumption-ssl]
|
||||
server = 15-npn-client-first-pref-on-mismatch-resumption-server
|
||||
client = 15-npn-client-first-pref-on-mismatch-resumption-client
|
||||
resume-server = 15-npn-client-first-pref-on-mismatch-resumption-resume-server
|
||||
resume-client = 15-npn-client-first-pref-on-mismatch-resumption-client
|
||||
|
||||
[15-npn-client-first-pref-on-mismatch-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[15-npn-client-first-pref-on-mismatch-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[15-npn-client-first-pref-on-mismatch-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-15]
|
||||
ExpectedNPNProtocol = foo
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 15-npn-client-first-pref-on-mismatch-resumption-server-extra
|
||||
resume-server = 15-npn-client-first-pref-on-mismatch-resumption-resume-server-extra
|
||||
client = 15-npn-client-first-pref-on-mismatch-resumption-client-extra
|
||||
resume-client = 15-npn-client-first-pref-on-mismatch-resumption-client-extra
|
||||
|
||||
[15-npn-client-first-pref-on-mismatch-resumption-server-extra]
|
||||
NPNProtocols = bar
|
||||
|
||||
[15-npn-client-first-pref-on-mismatch-resumption-resume-server-extra]
|
||||
NPNProtocols = baz
|
||||
|
||||
[15-npn-client-first-pref-on-mismatch-resumption-client-extra]
|
||||
NPNProtocols = foo,bar
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[16-npn-no-server-support-resumption]
|
||||
ssl_conf = 16-npn-no-server-support-resumption-ssl
|
||||
|
||||
[16-npn-no-server-support-resumption-ssl]
|
||||
server = 16-npn-no-server-support-resumption-server
|
||||
client = 16-npn-no-server-support-resumption-client
|
||||
resume-server = 16-npn-no-server-support-resumption-resume-server
|
||||
resume-client = 16-npn-no-server-support-resumption-client
|
||||
|
||||
[16-npn-no-server-support-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[16-npn-no-server-support-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[16-npn-no-server-support-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-16]
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 16-npn-no-server-support-resumption-server-extra
|
||||
client = 16-npn-no-server-support-resumption-client-extra
|
||||
resume-client = 16-npn-no-server-support-resumption-client-extra
|
||||
|
||||
[16-npn-no-server-support-resumption-server-extra]
|
||||
NPNProtocols = foo
|
||||
|
||||
[16-npn-no-server-support-resumption-client-extra]
|
||||
NPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[17-npn-no-client-support-resumption]
|
||||
ssl_conf = 17-npn-no-client-support-resumption-ssl
|
||||
|
||||
[17-npn-no-client-support-resumption-ssl]
|
||||
server = 17-npn-no-client-support-resumption-server
|
||||
client = 17-npn-no-client-support-resumption-client
|
||||
resume-server = 17-npn-no-client-support-resumption-server
|
||||
resume-client = 17-npn-no-client-support-resumption-resume-client
|
||||
|
||||
[17-npn-no-client-support-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[17-npn-no-client-support-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[17-npn-no-client-support-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-17]
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 17-npn-no-client-support-resumption-server-extra
|
||||
resume-server = 17-npn-no-client-support-resumption-server-extra
|
||||
client = 17-npn-no-client-support-resumption-client-extra
|
||||
|
||||
[17-npn-no-client-support-resumption-server-extra]
|
||||
NPNProtocols = foo
|
||||
|
||||
[17-npn-no-client-support-resumption-client-extra]
|
||||
NPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[18-alpn-preferred-over-npn-resumption]
|
||||
ssl_conf = 18-alpn-preferred-over-npn-resumption-ssl
|
||||
|
||||
[18-alpn-preferred-over-npn-resumption-ssl]
|
||||
server = 18-alpn-preferred-over-npn-resumption-server
|
||||
client = 18-alpn-preferred-over-npn-resumption-client
|
||||
resume-server = 18-alpn-preferred-over-npn-resumption-resume-server
|
||||
resume-client = 18-alpn-preferred-over-npn-resumption-client
|
||||
|
||||
[18-alpn-preferred-over-npn-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[18-alpn-preferred-over-npn-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[18-alpn-preferred-over-npn-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-18]
|
||||
ExpectedALPNProtocol = foo
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 18-alpn-preferred-over-npn-resumption-server-extra
|
||||
resume-server = 18-alpn-preferred-over-npn-resumption-resume-server-extra
|
||||
client = 18-alpn-preferred-over-npn-resumption-client-extra
|
||||
resume-client = 18-alpn-preferred-over-npn-resumption-client-extra
|
||||
|
||||
[18-alpn-preferred-over-npn-resumption-server-extra]
|
||||
NPNProtocols = bar
|
||||
|
||||
[18-alpn-preferred-over-npn-resumption-resume-server-extra]
|
||||
ALPNProtocols = foo
|
||||
NPNProtocols = baz
|
||||
|
||||
[18-alpn-preferred-over-npn-resumption-client-extra]
|
||||
ALPNProtocols = foo
|
||||
NPNProtocols = bar,baz
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[19-npn-used-if-alpn-not-supported-resumption]
|
||||
ssl_conf = 19-npn-used-if-alpn-not-supported-resumption-ssl
|
||||
|
||||
[19-npn-used-if-alpn-not-supported-resumption-ssl]
|
||||
server = 19-npn-used-if-alpn-not-supported-resumption-server
|
||||
client = 19-npn-used-if-alpn-not-supported-resumption-client
|
||||
resume-server = 19-npn-used-if-alpn-not-supported-resumption-resume-server
|
||||
resume-client = 19-npn-used-if-alpn-not-supported-resumption-client
|
||||
|
||||
[19-npn-used-if-alpn-not-supported-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[19-npn-used-if-alpn-not-supported-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[19-npn-used-if-alpn-not-supported-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-19]
|
||||
ExpectedNPNProtocol = baz
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 19-npn-used-if-alpn-not-supported-resumption-server-extra
|
||||
resume-server = 19-npn-used-if-alpn-not-supported-resumption-resume-server-extra
|
||||
client = 19-npn-used-if-alpn-not-supported-resumption-client-extra
|
||||
resume-client = 19-npn-used-if-alpn-not-supported-resumption-client-extra
|
||||
|
||||
[19-npn-used-if-alpn-not-supported-resumption-server-extra]
|
||||
ALPNProtocols = foo
|
||||
NPNProtocols = bar
|
||||
|
||||
[19-npn-used-if-alpn-not-supported-resumption-resume-server-extra]
|
||||
NPNProtocols = baz
|
||||
|
||||
[19-npn-used-if-alpn-not-supported-resumption-client-extra]
|
||||
ALPNProtocols = foo
|
||||
NPNProtocols = bar,baz
|
||||
|
||||
|
||||
443
test/ssl-tests/08-npn.conf.in
Normal file
443
test/ssl-tests/08-npn.conf.in
Normal file
@@ -0,0 +1,443 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test NPN. Note that NPN is only supported up to TLSv1.2
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "npn-simple",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-client-finds-match",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "baz,bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-client-honours-server-pref",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar,foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-client-first-pref-on-mismatch",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "baz",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-no-server-support",
|
||||
server => {},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-no-client-support",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-with-sni-no-context-switch",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
server2 => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
"ServerName" => "server1",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server1",
|
||||
"ExpectedNPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-with-sni-context-switch",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
server2 => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
"ServerName" => "server2",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server2",
|
||||
"ExpectedNPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-selected-sni-server-supports-npn",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
server2 => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
"ServerName" => "server2",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server2",
|
||||
"ExpectedNPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-selected-sni-server-does-not-support-npn",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar",
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
server2 => { },
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
"ServerName" => "server2",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server2",
|
||||
"ExpectedNPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-preferred-over-npn",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedALPNProtocol" => "foo",
|
||||
"ExpectedNPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "sni-npn-preferred-over-alpn",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
server2 => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ServerName" => "server2",
|
||||
"ALPNProtocols" => "foo",
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedALPNProtocol" => undef,
|
||||
"ExpectedNPNProtocol" => "bar",
|
||||
"ExpectedServerName" => "server2",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-simple-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedNPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-server-switch-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar,foo",
|
||||
},
|
||||
},
|
||||
resume_server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "baz,foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar,baz",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedNPNProtocol" => "baz",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-client-switch-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar,baz",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,baz",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
resume_client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar,baz",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedNPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-client-first-pref-on-mismatch-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
resume_server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "baz",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedNPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-no-server-support-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
resume_server => { },
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedNPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-no-client-support-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
resume_client => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedNPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-preferred-over-npn-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
resume_server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
"NPNProtocols" => "baz",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
"NPNProtocols" => "bar,baz",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedALPNProtocol" => "foo",
|
||||
"ExpectedNPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-used-if-alpn-not-supported-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
resume_server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "baz",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
"NPNProtocols" => "bar,baz",
|
||||
},
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedALPNProtocol" => undef,
|
||||
"ExpectedNPNProtocol" => "baz",
|
||||
},
|
||||
},
|
||||
);
|
||||
619
test/ssl-tests/09-alpn.conf
Normal file
619
test/ssl-tests/09-alpn.conf
Normal file
@@ -0,0 +1,619 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 16
|
||||
|
||||
test-0 = 0-alpn-simple
|
||||
test-1 = 1-alpn-server-finds-match
|
||||
test-2 = 2-alpn-server-honours-server-pref
|
||||
test-3 = 3-alpn-alert-on-mismatch
|
||||
test-4 = 4-alpn-no-server-support
|
||||
test-5 = 5-alpn-no-client-support
|
||||
test-6 = 6-alpn-with-sni-no-context-switch
|
||||
test-7 = 7-alpn-with-sni-context-switch
|
||||
test-8 = 8-alpn-selected-sni-server-supports-alpn
|
||||
test-9 = 9-alpn-selected-sni-server-does-not-support-alpn
|
||||
test-10 = 10-alpn-simple-resumption
|
||||
test-11 = 11-alpn-server-switch-resumption
|
||||
test-12 = 12-alpn-client-switch-resumption
|
||||
test-13 = 13-alpn-alert-on-mismatch-resumption
|
||||
test-14 = 14-alpn-no-server-support-resumption
|
||||
test-15 = 15-alpn-no-client-support-resumption
|
||||
# ===========================================================
|
||||
|
||||
[0-alpn-simple]
|
||||
ssl_conf = 0-alpn-simple-ssl
|
||||
|
||||
[0-alpn-simple-ssl]
|
||||
server = 0-alpn-simple-server
|
||||
client = 0-alpn-simple-client
|
||||
|
||||
[0-alpn-simple-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-alpn-simple-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedALPNProtocol = foo
|
||||
server = 0-alpn-simple-server-extra
|
||||
client = 0-alpn-simple-client-extra
|
||||
|
||||
[0-alpn-simple-server-extra]
|
||||
ALPNProtocols = foo
|
||||
|
||||
[0-alpn-simple-client-extra]
|
||||
ALPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-alpn-server-finds-match]
|
||||
ssl_conf = 1-alpn-server-finds-match-ssl
|
||||
|
||||
[1-alpn-server-finds-match-ssl]
|
||||
server = 1-alpn-server-finds-match-server
|
||||
client = 1-alpn-server-finds-match-client
|
||||
|
||||
[1-alpn-server-finds-match-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-alpn-server-finds-match-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedALPNProtocol = bar
|
||||
server = 1-alpn-server-finds-match-server-extra
|
||||
client = 1-alpn-server-finds-match-client-extra
|
||||
|
||||
[1-alpn-server-finds-match-server-extra]
|
||||
ALPNProtocols = baz,bar
|
||||
|
||||
[1-alpn-server-finds-match-client-extra]
|
||||
ALPNProtocols = foo,bar
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-alpn-server-honours-server-pref]
|
||||
ssl_conf = 2-alpn-server-honours-server-pref-ssl
|
||||
|
||||
[2-alpn-server-honours-server-pref-ssl]
|
||||
server = 2-alpn-server-honours-server-pref-server
|
||||
client = 2-alpn-server-honours-server-pref-client
|
||||
|
||||
[2-alpn-server-honours-server-pref-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-alpn-server-honours-server-pref-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedALPNProtocol = bar
|
||||
server = 2-alpn-server-honours-server-pref-server-extra
|
||||
client = 2-alpn-server-honours-server-pref-client-extra
|
||||
|
||||
[2-alpn-server-honours-server-pref-server-extra]
|
||||
ALPNProtocols = bar,foo
|
||||
|
||||
[2-alpn-server-honours-server-pref-client-extra]
|
||||
ALPNProtocols = foo,bar
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-alpn-alert-on-mismatch]
|
||||
ssl_conf = 3-alpn-alert-on-mismatch-ssl
|
||||
|
||||
[3-alpn-alert-on-mismatch-ssl]
|
||||
server = 3-alpn-alert-on-mismatch-server
|
||||
client = 3-alpn-alert-on-mismatch-client
|
||||
|
||||
[3-alpn-alert-on-mismatch-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-alpn-alert-on-mismatch-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = NoApplicationProtocol
|
||||
server = 3-alpn-alert-on-mismatch-server-extra
|
||||
client = 3-alpn-alert-on-mismatch-client-extra
|
||||
|
||||
[3-alpn-alert-on-mismatch-server-extra]
|
||||
ALPNProtocols = baz
|
||||
|
||||
[3-alpn-alert-on-mismatch-client-extra]
|
||||
ALPNProtocols = foo,bar
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-alpn-no-server-support]
|
||||
ssl_conf = 4-alpn-no-server-support-ssl
|
||||
|
||||
[4-alpn-no-server-support-ssl]
|
||||
server = 4-alpn-no-server-support-server
|
||||
client = 4-alpn-no-server-support-client
|
||||
|
||||
[4-alpn-no-server-support-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-alpn-no-server-support-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
client = 4-alpn-no-server-support-client-extra
|
||||
|
||||
[4-alpn-no-server-support-client-extra]
|
||||
ALPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-alpn-no-client-support]
|
||||
ssl_conf = 5-alpn-no-client-support-ssl
|
||||
|
||||
[5-alpn-no-client-support-ssl]
|
||||
server = 5-alpn-no-client-support-server
|
||||
client = 5-alpn-no-client-support-client
|
||||
|
||||
[5-alpn-no-client-support-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-alpn-no-client-support-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
server = 5-alpn-no-client-support-server-extra
|
||||
|
||||
[5-alpn-no-client-support-server-extra]
|
||||
ALPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-alpn-with-sni-no-context-switch]
|
||||
ssl_conf = 6-alpn-with-sni-no-context-switch-ssl
|
||||
|
||||
[6-alpn-with-sni-no-context-switch-ssl]
|
||||
server = 6-alpn-with-sni-no-context-switch-server
|
||||
client = 6-alpn-with-sni-no-context-switch-client
|
||||
server2 = 6-alpn-with-sni-no-context-switch-server2
|
||||
|
||||
[6-alpn-with-sni-no-context-switch-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-alpn-with-sni-no-context-switch-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-alpn-with-sni-no-context-switch-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedALPNProtocol = foo
|
||||
ExpectedServerName = server1
|
||||
server = 6-alpn-with-sni-no-context-switch-server-extra
|
||||
server2 = 6-alpn-with-sni-no-context-switch-server2-extra
|
||||
client = 6-alpn-with-sni-no-context-switch-client-extra
|
||||
|
||||
[6-alpn-with-sni-no-context-switch-server-extra]
|
||||
ALPNProtocols = foo
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[6-alpn-with-sni-no-context-switch-server2-extra]
|
||||
ALPNProtocols = bar
|
||||
|
||||
[6-alpn-with-sni-no-context-switch-client-extra]
|
||||
ALPNProtocols = foo,bar
|
||||
ServerName = server1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-alpn-with-sni-context-switch]
|
||||
ssl_conf = 7-alpn-with-sni-context-switch-ssl
|
||||
|
||||
[7-alpn-with-sni-context-switch-ssl]
|
||||
server = 7-alpn-with-sni-context-switch-server
|
||||
client = 7-alpn-with-sni-context-switch-client
|
||||
server2 = 7-alpn-with-sni-context-switch-server2
|
||||
|
||||
[7-alpn-with-sni-context-switch-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-alpn-with-sni-context-switch-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-alpn-with-sni-context-switch-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedALPNProtocol = bar
|
||||
ExpectedServerName = server2
|
||||
server = 7-alpn-with-sni-context-switch-server-extra
|
||||
server2 = 7-alpn-with-sni-context-switch-server2-extra
|
||||
client = 7-alpn-with-sni-context-switch-client-extra
|
||||
|
||||
[7-alpn-with-sni-context-switch-server-extra]
|
||||
ALPNProtocols = foo
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[7-alpn-with-sni-context-switch-server2-extra]
|
||||
ALPNProtocols = bar
|
||||
|
||||
[7-alpn-with-sni-context-switch-client-extra]
|
||||
ALPNProtocols = foo,bar
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-alpn-selected-sni-server-supports-alpn]
|
||||
ssl_conf = 8-alpn-selected-sni-server-supports-alpn-ssl
|
||||
|
||||
[8-alpn-selected-sni-server-supports-alpn-ssl]
|
||||
server = 8-alpn-selected-sni-server-supports-alpn-server
|
||||
client = 8-alpn-selected-sni-server-supports-alpn-client
|
||||
server2 = 8-alpn-selected-sni-server-supports-alpn-server2
|
||||
|
||||
[8-alpn-selected-sni-server-supports-alpn-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-alpn-selected-sni-server-supports-alpn-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-alpn-selected-sni-server-supports-alpn-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedALPNProtocol = bar
|
||||
ExpectedServerName = server2
|
||||
server = 8-alpn-selected-sni-server-supports-alpn-server-extra
|
||||
server2 = 8-alpn-selected-sni-server-supports-alpn-server2-extra
|
||||
client = 8-alpn-selected-sni-server-supports-alpn-client-extra
|
||||
|
||||
[8-alpn-selected-sni-server-supports-alpn-server-extra]
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[8-alpn-selected-sni-server-supports-alpn-server2-extra]
|
||||
ALPNProtocols = bar
|
||||
|
||||
[8-alpn-selected-sni-server-supports-alpn-client-extra]
|
||||
ALPNProtocols = foo,bar
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[9-alpn-selected-sni-server-does-not-support-alpn]
|
||||
ssl_conf = 9-alpn-selected-sni-server-does-not-support-alpn-ssl
|
||||
|
||||
[9-alpn-selected-sni-server-does-not-support-alpn-ssl]
|
||||
server = 9-alpn-selected-sni-server-does-not-support-alpn-server
|
||||
client = 9-alpn-selected-sni-server-does-not-support-alpn-client
|
||||
server2 = 9-alpn-selected-sni-server-does-not-support-alpn-server2
|
||||
|
||||
[9-alpn-selected-sni-server-does-not-support-alpn-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-alpn-selected-sni-server-does-not-support-alpn-server2]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-alpn-selected-sni-server-does-not-support-alpn-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-9]
|
||||
ExpectedServerName = server2
|
||||
server = 9-alpn-selected-sni-server-does-not-support-alpn-server-extra
|
||||
client = 9-alpn-selected-sni-server-does-not-support-alpn-client-extra
|
||||
|
||||
[9-alpn-selected-sni-server-does-not-support-alpn-server-extra]
|
||||
ALPNProtocols = bar
|
||||
ServerNameCallback = IgnoreMismatch
|
||||
|
||||
[9-alpn-selected-sni-server-does-not-support-alpn-client-extra]
|
||||
ALPNProtocols = foo,bar
|
||||
ServerName = server2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[10-alpn-simple-resumption]
|
||||
ssl_conf = 10-alpn-simple-resumption-ssl
|
||||
|
||||
[10-alpn-simple-resumption-ssl]
|
||||
server = 10-alpn-simple-resumption-server
|
||||
client = 10-alpn-simple-resumption-client
|
||||
resume-server = 10-alpn-simple-resumption-server
|
||||
resume-client = 10-alpn-simple-resumption-client
|
||||
|
||||
[10-alpn-simple-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[10-alpn-simple-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-10]
|
||||
ExpectedALPNProtocol = foo
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 10-alpn-simple-resumption-server-extra
|
||||
resume-server = 10-alpn-simple-resumption-server-extra
|
||||
client = 10-alpn-simple-resumption-client-extra
|
||||
resume-client = 10-alpn-simple-resumption-client-extra
|
||||
|
||||
[10-alpn-simple-resumption-server-extra]
|
||||
ALPNProtocols = foo
|
||||
|
||||
[10-alpn-simple-resumption-client-extra]
|
||||
ALPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[11-alpn-server-switch-resumption]
|
||||
ssl_conf = 11-alpn-server-switch-resumption-ssl
|
||||
|
||||
[11-alpn-server-switch-resumption-ssl]
|
||||
server = 11-alpn-server-switch-resumption-server
|
||||
client = 11-alpn-server-switch-resumption-client
|
||||
resume-server = 11-alpn-server-switch-resumption-resume-server
|
||||
resume-client = 11-alpn-server-switch-resumption-client
|
||||
|
||||
[11-alpn-server-switch-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-alpn-server-switch-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-alpn-server-switch-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-11]
|
||||
ExpectedALPNProtocol = baz
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 11-alpn-server-switch-resumption-server-extra
|
||||
resume-server = 11-alpn-server-switch-resumption-resume-server-extra
|
||||
client = 11-alpn-server-switch-resumption-client-extra
|
||||
resume-client = 11-alpn-server-switch-resumption-client-extra
|
||||
|
||||
[11-alpn-server-switch-resumption-server-extra]
|
||||
ALPNProtocols = bar,foo
|
||||
|
||||
[11-alpn-server-switch-resumption-resume-server-extra]
|
||||
ALPNProtocols = baz,foo
|
||||
|
||||
[11-alpn-server-switch-resumption-client-extra]
|
||||
ALPNProtocols = foo,bar,baz
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[12-alpn-client-switch-resumption]
|
||||
ssl_conf = 12-alpn-client-switch-resumption-ssl
|
||||
|
||||
[12-alpn-client-switch-resumption-ssl]
|
||||
server = 12-alpn-client-switch-resumption-server
|
||||
client = 12-alpn-client-switch-resumption-client
|
||||
resume-server = 12-alpn-client-switch-resumption-server
|
||||
resume-client = 12-alpn-client-switch-resumption-resume-client
|
||||
|
||||
[12-alpn-client-switch-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[12-alpn-client-switch-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[12-alpn-client-switch-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-12]
|
||||
ExpectedALPNProtocol = bar
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 12-alpn-client-switch-resumption-server-extra
|
||||
resume-server = 12-alpn-client-switch-resumption-server-extra
|
||||
client = 12-alpn-client-switch-resumption-client-extra
|
||||
resume-client = 12-alpn-client-switch-resumption-resume-client-extra
|
||||
|
||||
[12-alpn-client-switch-resumption-server-extra]
|
||||
ALPNProtocols = foo,bar,baz
|
||||
|
||||
[12-alpn-client-switch-resumption-client-extra]
|
||||
ALPNProtocols = foo,baz
|
||||
|
||||
[12-alpn-client-switch-resumption-resume-client-extra]
|
||||
ALPNProtocols = bar,baz
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[13-alpn-alert-on-mismatch-resumption]
|
||||
ssl_conf = 13-alpn-alert-on-mismatch-resumption-ssl
|
||||
|
||||
[13-alpn-alert-on-mismatch-resumption-ssl]
|
||||
server = 13-alpn-alert-on-mismatch-resumption-server
|
||||
client = 13-alpn-alert-on-mismatch-resumption-client
|
||||
resume-server = 13-alpn-alert-on-mismatch-resumption-resume-server
|
||||
resume-client = 13-alpn-alert-on-mismatch-resumption-client
|
||||
|
||||
[13-alpn-alert-on-mismatch-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-alpn-alert-on-mismatch-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-alpn-alert-on-mismatch-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-13]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = NoApplicationProtocol
|
||||
HandshakeMode = Resume
|
||||
server = 13-alpn-alert-on-mismatch-resumption-server-extra
|
||||
resume-server = 13-alpn-alert-on-mismatch-resumption-resume-server-extra
|
||||
client = 13-alpn-alert-on-mismatch-resumption-client-extra
|
||||
resume-client = 13-alpn-alert-on-mismatch-resumption-client-extra
|
||||
|
||||
[13-alpn-alert-on-mismatch-resumption-server-extra]
|
||||
ALPNProtocols = bar
|
||||
|
||||
[13-alpn-alert-on-mismatch-resumption-resume-server-extra]
|
||||
ALPNProtocols = baz
|
||||
|
||||
[13-alpn-alert-on-mismatch-resumption-client-extra]
|
||||
ALPNProtocols = foo,bar
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[14-alpn-no-server-support-resumption]
|
||||
ssl_conf = 14-alpn-no-server-support-resumption-ssl
|
||||
|
||||
[14-alpn-no-server-support-resumption-ssl]
|
||||
server = 14-alpn-no-server-support-resumption-server
|
||||
client = 14-alpn-no-server-support-resumption-client
|
||||
resume-server = 14-alpn-no-server-support-resumption-resume-server
|
||||
resume-client = 14-alpn-no-server-support-resumption-client
|
||||
|
||||
[14-alpn-no-server-support-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[14-alpn-no-server-support-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[14-alpn-no-server-support-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-14]
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 14-alpn-no-server-support-resumption-server-extra
|
||||
client = 14-alpn-no-server-support-resumption-client-extra
|
||||
resume-client = 14-alpn-no-server-support-resumption-client-extra
|
||||
|
||||
[14-alpn-no-server-support-resumption-server-extra]
|
||||
ALPNProtocols = foo
|
||||
|
||||
[14-alpn-no-server-support-resumption-client-extra]
|
||||
ALPNProtocols = foo
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[15-alpn-no-client-support-resumption]
|
||||
ssl_conf = 15-alpn-no-client-support-resumption-ssl
|
||||
|
||||
[15-alpn-no-client-support-resumption-ssl]
|
||||
server = 15-alpn-no-client-support-resumption-server
|
||||
client = 15-alpn-no-client-support-resumption-client
|
||||
resume-server = 15-alpn-no-client-support-resumption-server
|
||||
resume-client = 15-alpn-no-client-support-resumption-resume-client
|
||||
|
||||
[15-alpn-no-client-support-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[15-alpn-no-client-support-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[15-alpn-no-client-support-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-15]
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
server = 15-alpn-no-client-support-resumption-server-extra
|
||||
resume-server = 15-alpn-no-client-support-resumption-server-extra
|
||||
client = 15-alpn-no-client-support-resumption-client-extra
|
||||
|
||||
[15-alpn-no-client-support-resumption-server-extra]
|
||||
ALPNProtocols = foo
|
||||
|
||||
[15-alpn-no-client-support-resumption-client-extra]
|
||||
ALPNProtocols = foo
|
||||
|
||||
|
||||
325
test/ssl-tests/09-alpn.conf.in
Normal file
325
test/ssl-tests/09-alpn.conf.in
Normal file
@@ -0,0 +1,325 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test version negotiation
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "alpn-simple",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedALPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-server-finds-match",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "baz,bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,bar",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedALPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-server-honours-server-pref",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "bar,foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,bar",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedALPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-alert-on-mismatch",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "baz",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,bar",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"ExpectedServerAlert" => "NoApplicationProtocol",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-no-server-support",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedALPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-no-client-support",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => { },
|
||||
test => {
|
||||
"ExpectedALPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-with-sni-no-context-switch",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
server2 => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,bar",
|
||||
"ServerName" => "server1",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server1",
|
||||
"ExpectedALPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-with-sni-context-switch",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
server2 => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,bar",
|
||||
"ServerName" => "server2",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server2",
|
||||
"ExpectedALPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-selected-sni-server-supports-alpn",
|
||||
server => {
|
||||
extra => {
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
server2 => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,bar",
|
||||
"ServerName" => "server2",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server2",
|
||||
"ExpectedALPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-selected-sni-server-does-not-support-alpn",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "bar",
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
server2 => { },
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,bar",
|
||||
"ServerName" => "server2",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server2",
|
||||
"ExpectedALPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-simple-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedALPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-server-switch-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "bar,foo",
|
||||
},
|
||||
},
|
||||
resume_server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "baz,foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,bar,baz",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedALPNProtocol" => "baz",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-client-switch-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,bar,baz",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,baz",
|
||||
},
|
||||
},
|
||||
resume_client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "bar,baz",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedALPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-alert-on-mismatch-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
resume_server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "baz",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo,bar",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"ExpectedServerAlert" => "NoApplicationProtocol",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-no-server-support-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
resume_server => { },
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedALPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-no-client-support-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
resume_client => {
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedALPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
);
|
||||
2439
test/ssl-tests/10-resumption.conf
Normal file
2439
test/ssl-tests/10-resumption.conf
Normal file
File diff suppressed because it is too large
Load Diff
19
test/ssl-tests/10-resumption.conf.in
Normal file
19
test/ssl-tests/10-resumption.conf.in
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test version negotiation upon resumption.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
|
||||
use protocol_version;
|
||||
|
||||
our @tests = generate_resumption_tests("TLS");
|
||||
620
test/ssl-tests/11-dtls_resumption.conf
Normal file
620
test/ssl-tests/11-dtls_resumption.conf
Normal file
@@ -0,0 +1,620 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 16
|
||||
|
||||
test-0 = 0-resumption
|
||||
test-1 = 1-resumption
|
||||
test-2 = 2-resumption
|
||||
test-3 = 3-resumption
|
||||
test-4 = 4-resumption
|
||||
test-5 = 5-resumption
|
||||
test-6 = 6-resumption
|
||||
test-7 = 7-resumption
|
||||
test-8 = 8-resumption
|
||||
test-9 = 9-resumption
|
||||
test-10 = 10-resumption
|
||||
test-11 = 11-resumption
|
||||
test-12 = 12-resumption
|
||||
test-13 = 13-resumption
|
||||
test-14 = 14-resumption
|
||||
test-15 = 15-resumption
|
||||
# ===========================================================
|
||||
|
||||
[0-resumption]
|
||||
ssl_conf = 0-resumption-ssl
|
||||
|
||||
[0-resumption-ssl]
|
||||
server = 0-resumption-server
|
||||
client = 0-resumption-client
|
||||
resume-server = 0-resumption-resume-server
|
||||
resume-client = 0-resumption-client
|
||||
|
||||
[0-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
MinProtocol = DTLSv1
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedProtocol = DTLSv1
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-resumption]
|
||||
ssl_conf = 1-resumption-ssl
|
||||
|
||||
[1-resumption-ssl]
|
||||
server = 1-resumption-server
|
||||
client = 1-resumption-client
|
||||
resume-server = 1-resumption-resume-server
|
||||
resume-client = 1-resumption-client
|
||||
|
||||
[1-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
MinProtocol = DTLSv1
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedProtocol = DTLSv1
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-resumption]
|
||||
ssl_conf = 2-resumption-ssl
|
||||
|
||||
[2-resumption-ssl]
|
||||
server = 2-resumption-server
|
||||
client = 2-resumption-client
|
||||
resume-server = 2-resumption-resume-server
|
||||
resume-client = 2-resumption-client
|
||||
|
||||
[2-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
MinProtocol = DTLSv1
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedProtocol = DTLSv1.2
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-resumption]
|
||||
ssl_conf = 3-resumption-ssl
|
||||
|
||||
[3-resumption-ssl]
|
||||
server = 3-resumption-server
|
||||
client = 3-resumption-client
|
||||
resume-server = 3-resumption-resume-server
|
||||
resume-client = 3-resumption-client
|
||||
|
||||
[3-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
MinProtocol = DTLSv1
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedProtocol = DTLSv1.2
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-resumption]
|
||||
ssl_conf = 4-resumption-ssl
|
||||
|
||||
[4-resumption-ssl]
|
||||
server = 4-resumption-server
|
||||
client = 4-resumption-client
|
||||
resume-server = 4-resumption-resume-server
|
||||
resume-client = 4-resumption-client
|
||||
|
||||
[4-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
MinProtocol = DTLSv1.2
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedProtocol = DTLSv1
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-resumption]
|
||||
ssl_conf = 5-resumption-ssl
|
||||
|
||||
[5-resumption-ssl]
|
||||
server = 5-resumption-server
|
||||
client = 5-resumption-client
|
||||
resume-server = 5-resumption-resume-server
|
||||
resume-client = 5-resumption-client
|
||||
|
||||
[5-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
MinProtocol = DTLSv1.2
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedProtocol = DTLSv1
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-resumption]
|
||||
ssl_conf = 6-resumption-ssl
|
||||
|
||||
[6-resumption-ssl]
|
||||
server = 6-resumption-server
|
||||
client = 6-resumption-client
|
||||
resume-server = 6-resumption-resume-server
|
||||
resume-client = 6-resumption-client
|
||||
|
||||
[6-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
MinProtocol = DTLSv1.2
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedProtocol = DTLSv1.2
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-resumption]
|
||||
ssl_conf = 7-resumption-ssl
|
||||
|
||||
[7-resumption-ssl]
|
||||
server = 7-resumption-server
|
||||
client = 7-resumption-client
|
||||
resume-server = 7-resumption-resume-server
|
||||
resume-client = 7-resumption-client
|
||||
|
||||
[7-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
MinProtocol = DTLSv1.2
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-resumption-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedProtocol = DTLSv1.2
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-resumption]
|
||||
ssl_conf = 8-resumption-ssl
|
||||
|
||||
[8-resumption-ssl]
|
||||
server = 8-resumption-server
|
||||
client = 8-resumption-client
|
||||
resume-server = 8-resumption-server
|
||||
resume-client = 8-resumption-resume-client
|
||||
|
||||
[8-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
MinProtocol = DTLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[8-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedProtocol = DTLSv1
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[9-resumption]
|
||||
ssl_conf = 9-resumption-ssl
|
||||
|
||||
[9-resumption-ssl]
|
||||
server = 9-resumption-server
|
||||
client = 9-resumption-client
|
||||
resume-server = 9-resumption-server
|
||||
resume-client = 9-resumption-resume-client
|
||||
|
||||
[9-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
MinProtocol = DTLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[9-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-9]
|
||||
ExpectedProtocol = DTLSv1
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[10-resumption]
|
||||
ssl_conf = 10-resumption-ssl
|
||||
|
||||
[10-resumption-ssl]
|
||||
server = 10-resumption-server
|
||||
client = 10-resumption-client
|
||||
resume-server = 10-resumption-server
|
||||
resume-client = 10-resumption-resume-client
|
||||
|
||||
[10-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[10-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
MinProtocol = DTLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[10-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-10]
|
||||
ExpectedProtocol = DTLSv1.2
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[11-resumption]
|
||||
ssl_conf = 11-resumption-ssl
|
||||
|
||||
[11-resumption-ssl]
|
||||
server = 11-resumption-server
|
||||
client = 11-resumption-client
|
||||
resume-server = 11-resumption-server
|
||||
resume-client = 11-resumption-resume-client
|
||||
|
||||
[11-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
MinProtocol = DTLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[11-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-11]
|
||||
ExpectedProtocol = DTLSv1.2
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[12-resumption]
|
||||
ssl_conf = 12-resumption-ssl
|
||||
|
||||
[12-resumption-ssl]
|
||||
server = 12-resumption-server
|
||||
client = 12-resumption-client
|
||||
resume-server = 12-resumption-server
|
||||
resume-client = 12-resumption-resume-client
|
||||
|
||||
[12-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[12-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
MinProtocol = DTLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[12-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-12]
|
||||
ExpectedProtocol = DTLSv1
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[13-resumption]
|
||||
ssl_conf = 13-resumption-ssl
|
||||
|
||||
[13-resumption-ssl]
|
||||
server = 13-resumption-server
|
||||
client = 13-resumption-client
|
||||
resume-server = 13-resumption-server
|
||||
resume-client = 13-resumption-resume-client
|
||||
|
||||
[13-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
MinProtocol = DTLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[13-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-13]
|
||||
ExpectedProtocol = DTLSv1
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[14-resumption]
|
||||
ssl_conf = 14-resumption-ssl
|
||||
|
||||
[14-resumption-ssl]
|
||||
server = 14-resumption-server
|
||||
client = 14-resumption-client
|
||||
resume-server = 14-resumption-server
|
||||
resume-client = 14-resumption-resume-client
|
||||
|
||||
[14-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[14-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
MinProtocol = DTLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[14-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-14]
|
||||
ExpectedProtocol = DTLSv1.2
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[15-resumption]
|
||||
ssl_conf = 15-resumption-ssl
|
||||
|
||||
[15-resumption-ssl]
|
||||
server = 15-resumption-server
|
||||
client = 15-resumption-client
|
||||
resume-server = 15-resumption-server
|
||||
resume-client = 15-resumption-resume-client
|
||||
|
||||
[15-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[15-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
MinProtocol = DTLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[15-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = DTLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-15]
|
||||
ExpectedProtocol = DTLSv1.2
|
||||
HandshakeMode = Resume
|
||||
Method = DTLS
|
||||
ResumptionExpected = Yes
|
||||
|
||||
|
||||
19
test/ssl-tests/11-dtls_resumption.conf.in
Normal file
19
test/ssl-tests/11-dtls_resumption.conf.in
Normal file
@@ -0,0 +1,19 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test version negotiation upon resumption.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
|
||||
use protocol_version;
|
||||
|
||||
our @tests = generate_resumption_tests("DTLS");
|
||||
191
test/ssl-tests/12-ct.conf
Normal file
191
test/ssl-tests/12-ct.conf
Normal file
@@ -0,0 +1,191 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 6
|
||||
|
||||
test-0 = 0-ct-permissive-without-scts
|
||||
test-1 = 1-ct-permissive-with-scts
|
||||
test-2 = 2-ct-strict-without-scts
|
||||
test-3 = 3-ct-strict-with-scts
|
||||
test-4 = 4-ct-permissive-resumption
|
||||
test-5 = 5-ct-strict-resumption
|
||||
# ===========================================================
|
||||
|
||||
[0-ct-permissive-without-scts]
|
||||
ssl_conf = 0-ct-permissive-without-scts-ssl
|
||||
|
||||
[0-ct-permissive-without-scts-ssl]
|
||||
server = 0-ct-permissive-without-scts-server
|
||||
client = 0-ct-permissive-without-scts-client
|
||||
|
||||
[0-ct-permissive-without-scts-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-ct-permissive-without-scts-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
client = 0-ct-permissive-without-scts-client-extra
|
||||
|
||||
[0-ct-permissive-without-scts-client-extra]
|
||||
CTValidation = Permissive
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-ct-permissive-with-scts]
|
||||
ssl_conf = 1-ct-permissive-with-scts-ssl
|
||||
|
||||
[1-ct-permissive-with-scts-ssl]
|
||||
server = 1-ct-permissive-with-scts-server
|
||||
client = 1-ct-permissive-with-scts-client
|
||||
|
||||
[1-ct-permissive-with-scts-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1-key.pem
|
||||
|
||||
[1-ct-permissive-with-scts-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1_issuer.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
client = 1-ct-permissive-with-scts-client-extra
|
||||
|
||||
[1-ct-permissive-with-scts-client-extra]
|
||||
CTValidation = Permissive
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-ct-strict-without-scts]
|
||||
ssl_conf = 2-ct-strict-without-scts-ssl
|
||||
|
||||
[2-ct-strict-without-scts-ssl]
|
||||
server = 2-ct-strict-without-scts-server
|
||||
client = 2-ct-strict-without-scts-client
|
||||
|
||||
[2-ct-strict-without-scts-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-ct-strict-without-scts-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedClientAlert = HandshakeFailure
|
||||
ExpectedResult = ClientFail
|
||||
client = 2-ct-strict-without-scts-client-extra
|
||||
|
||||
[2-ct-strict-without-scts-client-extra]
|
||||
CTValidation = Strict
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-ct-strict-with-scts]
|
||||
ssl_conf = 3-ct-strict-with-scts-ssl
|
||||
|
||||
[3-ct-strict-with-scts-ssl]
|
||||
server = 3-ct-strict-with-scts-server
|
||||
client = 3-ct-strict-with-scts-client
|
||||
|
||||
[3-ct-strict-with-scts-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1-key.pem
|
||||
|
||||
[3-ct-strict-with-scts-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1_issuer.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
client = 3-ct-strict-with-scts-client-extra
|
||||
|
||||
[3-ct-strict-with-scts-client-extra]
|
||||
CTValidation = Strict
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-ct-permissive-resumption]
|
||||
ssl_conf = 4-ct-permissive-resumption-ssl
|
||||
|
||||
[4-ct-permissive-resumption-ssl]
|
||||
server = 4-ct-permissive-resumption-server
|
||||
client = 4-ct-permissive-resumption-client
|
||||
resume-server = 4-ct-permissive-resumption-server
|
||||
resume-client = 4-ct-permissive-resumption-client
|
||||
|
||||
[4-ct-permissive-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1-key.pem
|
||||
|
||||
[4-ct-permissive-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1_issuer.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
client = 4-ct-permissive-resumption-client-extra
|
||||
resume-client = 4-ct-permissive-resumption-client-extra
|
||||
|
||||
[4-ct-permissive-resumption-client-extra]
|
||||
CTValidation = Permissive
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-ct-strict-resumption]
|
||||
ssl_conf = 5-ct-strict-resumption-ssl
|
||||
|
||||
[5-ct-strict-resumption-ssl]
|
||||
server = 5-ct-strict-resumption-server
|
||||
client = 5-ct-strict-resumption-client
|
||||
resume-server = 5-ct-strict-resumption-server
|
||||
resume-client = 5-ct-strict-resumption-resume-client
|
||||
|
||||
[5-ct-strict-resumption-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1-key.pem
|
||||
|
||||
[5-ct-strict-resumption-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/embeddedSCTs1_issuer.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[5-ct-strict-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
client = 5-ct-strict-resumption-client-extra
|
||||
resume-client = 5-ct-strict-resumption-resume-client-extra
|
||||
|
||||
[5-ct-strict-resumption-client-extra]
|
||||
CTValidation = Strict
|
||||
|
||||
[5-ct-strict-resumption-resume-client-extra]
|
||||
CTValidation = Strict
|
||||
|
||||
|
||||
119
test/ssl-tests/12-ct.conf.in
Normal file
119
test/ssl-tests/12-ct.conf.in
Normal file
@@ -0,0 +1,119 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test version negotiation
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "ct-permissive-without-scts",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
"CTValidation" => "Permissive",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ct-permissive-with-scts",
|
||||
server => {
|
||||
"Certificate" => test_pem("embeddedSCTs1.pem"),
|
||||
"PrivateKey" => test_pem("embeddedSCTs1-key.pem"),
|
||||
},
|
||||
client => {
|
||||
"VerifyCAFile" => test_pem("embeddedSCTs1_issuer.pem"),
|
||||
extra => {
|
||||
"CTValidation" => "Permissive",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ct-strict-without-scts",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
"CTValidation" => "Strict",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ClientFail",
|
||||
"ExpectedClientAlert" => "HandshakeFailure",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ct-strict-with-scts",
|
||||
server => {
|
||||
"Certificate" => test_pem("embeddedSCTs1.pem"),
|
||||
"PrivateKey" => test_pem("embeddedSCTs1-key.pem"),
|
||||
},
|
||||
client => {
|
||||
"VerifyCAFile" => test_pem("embeddedSCTs1_issuer.pem"),
|
||||
extra => {
|
||||
"CTValidation" => "Strict",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ct-permissive-resumption",
|
||||
server => {
|
||||
"Certificate" => test_pem("embeddedSCTs1.pem"),
|
||||
"PrivateKey" => test_pem("embeddedSCTs1-key.pem"),
|
||||
},
|
||||
client => {
|
||||
"VerifyCAFile" => test_pem("embeddedSCTs1_issuer.pem"),
|
||||
extra => {
|
||||
"CTValidation" => "Permissive",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ct-strict-resumption",
|
||||
server => {
|
||||
"Certificate" => test_pem("embeddedSCTs1.pem"),
|
||||
"PrivateKey" => test_pem("embeddedSCTs1-key.pem"),
|
||||
},
|
||||
client => {
|
||||
"VerifyCAFile" => test_pem("embeddedSCTs1_issuer.pem"),
|
||||
extra => {
|
||||
"CTValidation" => "Strict",
|
||||
},
|
||||
},
|
||||
# SCTs are not present during resumption, so the resumption
|
||||
# should succeed.
|
||||
resume_client => {
|
||||
extra => {
|
||||
"CTValidation" => "Strict",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
);
|
||||
577
test/ssl-tests/13-fragmentation.conf
Normal file
577
test/ssl-tests/13-fragmentation.conf
Normal file
@@ -0,0 +1,577 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 22
|
||||
|
||||
test-0 = 0-one-fragment-minus-app-data
|
||||
test-1 = 1-one-fragment-app-data
|
||||
test-2 = 2-one-fragment-plus-app-data
|
||||
test-3 = 3-small-app-data
|
||||
test-4 = 4-small-app-data-large-fragment-size
|
||||
test-5 = 5-medium-app-data
|
||||
test-6 = 6-medium-plus-app-data
|
||||
test-7 = 7-large-app-data
|
||||
test-8 = 8-large-app-data-large-fragment-size
|
||||
test-9 = 9-large-app-data-odd-fragment-size
|
||||
test-10 = 10-large-app-data-aes-sha1-multibuffer
|
||||
test-11 = 11-large-app-data-aes-sha2-multibuffer
|
||||
test-12 = 12-large-app-data-aes-sha1-multibuffer-odd-fragment
|
||||
test-13 = 13-large-app-data-aes-sha2-multibuffer-odd-fragment
|
||||
test-14 = 14-small-app-data-aes-sha1-multibuffer
|
||||
test-15 = 15-small-app-data-aes-sha2-multibuffer
|
||||
test-16 = 16-Maximum Fragment Len extension set to 1024 w. FragmentSize disabled
|
||||
test-17 = 17-Maximum Fragment Len extension equal FragmentSize to 2048
|
||||
test-18 = 18-Maximum Fragment Len extension 512 lower than FragmentSize 1024
|
||||
test-19 = 19-Maximum Fragment Len extension 1024 lower than FragmentSize 1024
|
||||
test-20 = 20-Maximum Fragment Len extension 4096 greater than FragmentSize 2048
|
||||
test-21 = 21-Maximum Fragment Len extension 2048 greater than FragmentSize 1024
|
||||
# ===========================================================
|
||||
|
||||
[0-one-fragment-minus-app-data]
|
||||
ssl_conf = 0-one-fragment-minus-app-data-ssl
|
||||
|
||||
[0-one-fragment-minus-app-data-ssl]
|
||||
server = 0-one-fragment-minus-app-data-server
|
||||
client = 0-one-fragment-minus-app-data-client
|
||||
|
||||
[0-one-fragment-minus-app-data-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-one-fragment-minus-app-data-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ApplicationData = 511
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-one-fragment-app-data]
|
||||
ssl_conf = 1-one-fragment-app-data-ssl
|
||||
|
||||
[1-one-fragment-app-data-ssl]
|
||||
server = 1-one-fragment-app-data-server
|
||||
client = 1-one-fragment-app-data-client
|
||||
|
||||
[1-one-fragment-app-data-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-one-fragment-app-data-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ApplicationData = 512
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-one-fragment-plus-app-data]
|
||||
ssl_conf = 2-one-fragment-plus-app-data-ssl
|
||||
|
||||
[2-one-fragment-plus-app-data-ssl]
|
||||
server = 2-one-fragment-plus-app-data-server
|
||||
client = 2-one-fragment-plus-app-data-client
|
||||
|
||||
[2-one-fragment-plus-app-data-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-one-fragment-plus-app-data-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ApplicationData = 513
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-small-app-data]
|
||||
ssl_conf = 3-small-app-data-ssl
|
||||
|
||||
[3-small-app-data-ssl]
|
||||
server = 3-small-app-data-server
|
||||
client = 3-small-app-data-client
|
||||
|
||||
[3-small-app-data-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-small-app-data-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ApplicationData = 4097
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-small-app-data-large-fragment-size]
|
||||
ssl_conf = 4-small-app-data-large-fragment-size-ssl
|
||||
|
||||
[4-small-app-data-large-fragment-size-ssl]
|
||||
server = 4-small-app-data-large-fragment-size-server
|
||||
client = 4-small-app-data-large-fragment-size-client
|
||||
|
||||
[4-small-app-data-large-fragment-size-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-small-app-data-large-fragment-size-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ApplicationData = 4097
|
||||
MaxFragmentSize = 16384
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-medium-app-data]
|
||||
ssl_conf = 5-medium-app-data-ssl
|
||||
|
||||
[5-medium-app-data-ssl]
|
||||
server = 5-medium-app-data-server
|
||||
client = 5-medium-app-data-client
|
||||
|
||||
[5-medium-app-data-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-medium-app-data-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ApplicationData = 32775
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-medium-plus-app-data]
|
||||
ssl_conf = 6-medium-plus-app-data-ssl
|
||||
|
||||
[6-medium-plus-app-data-ssl]
|
||||
server = 6-medium-plus-app-data-server
|
||||
client = 6-medium-plus-app-data-client
|
||||
|
||||
[6-medium-plus-app-data-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-medium-plus-app-data-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ApplicationData = 131069
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-large-app-data]
|
||||
ssl_conf = 7-large-app-data-ssl
|
||||
|
||||
[7-large-app-data-ssl]
|
||||
server = 7-large-app-data-server
|
||||
client = 7-large-app-data-client
|
||||
|
||||
[7-large-app-data-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-large-app-data-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ApplicationData = 1048576
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-large-app-data-large-fragment-size]
|
||||
ssl_conf = 8-large-app-data-large-fragment-size-ssl
|
||||
|
||||
[8-large-app-data-large-fragment-size-ssl]
|
||||
server = 8-large-app-data-large-fragment-size-server
|
||||
client = 8-large-app-data-large-fragment-size-client
|
||||
|
||||
[8-large-app-data-large-fragment-size-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-large-app-data-large-fragment-size-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ApplicationData = 1048576
|
||||
MaxFragmentSize = 16384
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[9-large-app-data-odd-fragment-size]
|
||||
ssl_conf = 9-large-app-data-odd-fragment-size-ssl
|
||||
|
||||
[9-large-app-data-odd-fragment-size-ssl]
|
||||
server = 9-large-app-data-odd-fragment-size-server
|
||||
client = 9-large-app-data-odd-fragment-size-client
|
||||
|
||||
[9-large-app-data-odd-fragment-size-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-large-app-data-odd-fragment-size-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-9]
|
||||
ApplicationData = 1048576
|
||||
MaxFragmentSize = 5115
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[10-large-app-data-aes-sha1-multibuffer]
|
||||
ssl_conf = 10-large-app-data-aes-sha1-multibuffer-ssl
|
||||
|
||||
[10-large-app-data-aes-sha1-multibuffer-ssl]
|
||||
server = 10-large-app-data-aes-sha1-multibuffer-server
|
||||
client = 10-large-app-data-aes-sha1-multibuffer-client
|
||||
|
||||
[10-large-app-data-aes-sha1-multibuffer-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[10-large-app-data-aes-sha1-multibuffer-client]
|
||||
CipherString = AES128-SHA
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-10]
|
||||
ApplicationData = 1048576
|
||||
MaxFragmentSize = 4096
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[11-large-app-data-aes-sha2-multibuffer]
|
||||
ssl_conf = 11-large-app-data-aes-sha2-multibuffer-ssl
|
||||
|
||||
[11-large-app-data-aes-sha2-multibuffer-ssl]
|
||||
server = 11-large-app-data-aes-sha2-multibuffer-server
|
||||
client = 11-large-app-data-aes-sha2-multibuffer-client
|
||||
|
||||
[11-large-app-data-aes-sha2-multibuffer-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-large-app-data-aes-sha2-multibuffer-client]
|
||||
CipherString = AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-11]
|
||||
ApplicationData = 1048576
|
||||
MaxFragmentSize = 4096
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[12-large-app-data-aes-sha1-multibuffer-odd-fragment]
|
||||
ssl_conf = 12-large-app-data-aes-sha1-multibuffer-odd-fragment-ssl
|
||||
|
||||
[12-large-app-data-aes-sha1-multibuffer-odd-fragment-ssl]
|
||||
server = 12-large-app-data-aes-sha1-multibuffer-odd-fragment-server
|
||||
client = 12-large-app-data-aes-sha1-multibuffer-odd-fragment-client
|
||||
|
||||
[12-large-app-data-aes-sha1-multibuffer-odd-fragment-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[12-large-app-data-aes-sha1-multibuffer-odd-fragment-client]
|
||||
CipherString = AES128-SHA
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-12]
|
||||
ApplicationData = 1048579
|
||||
MaxFragmentSize = 5115
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[13-large-app-data-aes-sha2-multibuffer-odd-fragment]
|
||||
ssl_conf = 13-large-app-data-aes-sha2-multibuffer-odd-fragment-ssl
|
||||
|
||||
[13-large-app-data-aes-sha2-multibuffer-odd-fragment-ssl]
|
||||
server = 13-large-app-data-aes-sha2-multibuffer-odd-fragment-server
|
||||
client = 13-large-app-data-aes-sha2-multibuffer-odd-fragment-client
|
||||
|
||||
[13-large-app-data-aes-sha2-multibuffer-odd-fragment-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-large-app-data-aes-sha2-multibuffer-odd-fragment-client]
|
||||
CipherString = AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-13]
|
||||
ApplicationData = 1048573
|
||||
MaxFragmentSize = 5125
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[14-small-app-data-aes-sha1-multibuffer]
|
||||
ssl_conf = 14-small-app-data-aes-sha1-multibuffer-ssl
|
||||
|
||||
[14-small-app-data-aes-sha1-multibuffer-ssl]
|
||||
server = 14-small-app-data-aes-sha1-multibuffer-server
|
||||
client = 14-small-app-data-aes-sha1-multibuffer-client
|
||||
|
||||
[14-small-app-data-aes-sha1-multibuffer-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[14-small-app-data-aes-sha1-multibuffer-client]
|
||||
CipherString = AES128-SHA
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-14]
|
||||
ApplicationData = 4096
|
||||
MaxFragmentSize = 4096
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[15-small-app-data-aes-sha2-multibuffer]
|
||||
ssl_conf = 15-small-app-data-aes-sha2-multibuffer-ssl
|
||||
|
||||
[15-small-app-data-aes-sha2-multibuffer-ssl]
|
||||
server = 15-small-app-data-aes-sha2-multibuffer-server
|
||||
client = 15-small-app-data-aes-sha2-multibuffer-client
|
||||
|
||||
[15-small-app-data-aes-sha2-multibuffer-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[15-small-app-data-aes-sha2-multibuffer-client]
|
||||
CipherString = AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-15]
|
||||
ApplicationData = 4096
|
||||
MaxFragmentSize = 4096
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[16-Maximum Fragment Len extension set to 1024 w. FragmentSize disabled]
|
||||
ssl_conf = 16-Maximum Fragment Len extension set to 1024 w. FragmentSize disabled-ssl
|
||||
|
||||
[16-Maximum Fragment Len extension set to 1024 w. FragmentSize disabled-ssl]
|
||||
server = 16-Maximum Fragment Len extension set to 1024 w. FragmentSize disabled-server
|
||||
client = 16-Maximum Fragment Len extension set to 1024 w. FragmentSize disabled-client
|
||||
|
||||
[16-Maximum Fragment Len extension set to 1024 w. FragmentSize disabled-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[16-Maximum Fragment Len extension set to 1024 w. FragmentSize disabled-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-16]
|
||||
ApplicationData = 3072
|
||||
MaxFragmentSize = 16384
|
||||
client = 16-Maximum Fragment Len extension set to 1024 w. FragmentSize disabled-client-extra
|
||||
|
||||
[16-Maximum Fragment Len extension set to 1024 w. FragmentSize disabled-client-extra]
|
||||
MaxFragmentLenExt = 1024
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[17-Maximum Fragment Len extension equal FragmentSize to 2048]
|
||||
ssl_conf = 17-Maximum Fragment Len extension equal FragmentSize to 2048-ssl
|
||||
|
||||
[17-Maximum Fragment Len extension equal FragmentSize to 2048-ssl]
|
||||
server = 17-Maximum Fragment Len extension equal FragmentSize to 2048-server
|
||||
client = 17-Maximum Fragment Len extension equal FragmentSize to 2048-client
|
||||
|
||||
[17-Maximum Fragment Len extension equal FragmentSize to 2048-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[17-Maximum Fragment Len extension equal FragmentSize to 2048-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-17]
|
||||
ApplicationData = 3072
|
||||
MaxFragmentSize = 2048
|
||||
client = 17-Maximum Fragment Len extension equal FragmentSize to 2048-client-extra
|
||||
|
||||
[17-Maximum Fragment Len extension equal FragmentSize to 2048-client-extra]
|
||||
MaxFragmentLenExt = 2048
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[18-Maximum Fragment Len extension 512 lower than FragmentSize 1024]
|
||||
ssl_conf = 18-Maximum Fragment Len extension 512 lower than FragmentSize 1024-ssl
|
||||
|
||||
[18-Maximum Fragment Len extension 512 lower than FragmentSize 1024-ssl]
|
||||
server = 18-Maximum Fragment Len extension 512 lower than FragmentSize 1024-server
|
||||
client = 18-Maximum Fragment Len extension 512 lower than FragmentSize 1024-client
|
||||
|
||||
[18-Maximum Fragment Len extension 512 lower than FragmentSize 1024-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[18-Maximum Fragment Len extension 512 lower than FragmentSize 1024-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-18]
|
||||
ApplicationData = 3072
|
||||
MaxFragmentSize = 1024
|
||||
client = 18-Maximum Fragment Len extension 512 lower than FragmentSize 1024-client-extra
|
||||
|
||||
[18-Maximum Fragment Len extension 512 lower than FragmentSize 1024-client-extra]
|
||||
MaxFragmentLenExt = 512
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[19-Maximum Fragment Len extension 1024 lower than FragmentSize 1024]
|
||||
ssl_conf = 19-Maximum Fragment Len extension 1024 lower than FragmentSize 1024-ssl
|
||||
|
||||
[19-Maximum Fragment Len extension 1024 lower than FragmentSize 1024-ssl]
|
||||
server = 19-Maximum Fragment Len extension 1024 lower than FragmentSize 1024-server
|
||||
client = 19-Maximum Fragment Len extension 1024 lower than FragmentSize 1024-client
|
||||
|
||||
[19-Maximum Fragment Len extension 1024 lower than FragmentSize 1024-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[19-Maximum Fragment Len extension 1024 lower than FragmentSize 1024-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-19]
|
||||
ApplicationData = 3072
|
||||
MaxFragmentSize = 1024
|
||||
client = 19-Maximum Fragment Len extension 1024 lower than FragmentSize 1024-client-extra
|
||||
|
||||
[19-Maximum Fragment Len extension 1024 lower than FragmentSize 1024-client-extra]
|
||||
MaxFragmentLenExt = 2048
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[20-Maximum Fragment Len extension 4096 greater than FragmentSize 2048]
|
||||
ssl_conf = 20-Maximum Fragment Len extension 4096 greater than FragmentSize 2048-ssl
|
||||
|
||||
[20-Maximum Fragment Len extension 4096 greater than FragmentSize 2048-ssl]
|
||||
server = 20-Maximum Fragment Len extension 4096 greater than FragmentSize 2048-server
|
||||
client = 20-Maximum Fragment Len extension 4096 greater than FragmentSize 2048-client
|
||||
|
||||
[20-Maximum Fragment Len extension 4096 greater than FragmentSize 2048-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[20-Maximum Fragment Len extension 4096 greater than FragmentSize 2048-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-20]
|
||||
ApplicationData = 8196
|
||||
MaxFragmentSize = 2048
|
||||
client = 20-Maximum Fragment Len extension 4096 greater than FragmentSize 2048-client-extra
|
||||
|
||||
[20-Maximum Fragment Len extension 4096 greater than FragmentSize 2048-client-extra]
|
||||
MaxFragmentLenExt = 4096
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[21-Maximum Fragment Len extension 2048 greater than FragmentSize 1024]
|
||||
ssl_conf = 21-Maximum Fragment Len extension 2048 greater than FragmentSize 1024-ssl
|
||||
|
||||
[21-Maximum Fragment Len extension 2048 greater than FragmentSize 1024-ssl]
|
||||
server = 21-Maximum Fragment Len extension 2048 greater than FragmentSize 1024-server
|
||||
client = 21-Maximum Fragment Len extension 2048 greater than FragmentSize 1024-client
|
||||
|
||||
[21-Maximum Fragment Len extension 2048 greater than FragmentSize 1024-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[21-Maximum Fragment Len extension 2048 greater than FragmentSize 1024-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-21]
|
||||
ApplicationData = 3072
|
||||
MaxFragmentSize = 1024
|
||||
client = 21-Maximum Fragment Len extension 2048 greater than FragmentSize 1024-client-extra
|
||||
|
||||
[21-Maximum Fragment Len extension 2048 greater than FragmentSize 1024-client-extra]
|
||||
MaxFragmentLenExt = 2048
|
||||
|
||||
|
||||
268
test/ssl-tests/13-fragmentation.conf.in
Normal file
268
test/ssl-tests/13-fragmentation.conf.in
Normal file
@@ -0,0 +1,268 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test packet fragmentation
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
|
||||
|
||||
our @tests = (
|
||||
# Default fragment size is 512.
|
||||
{
|
||||
name => "one-fragment-minus-app-data",
|
||||
server => { },
|
||||
client => { },
|
||||
test => {
|
||||
ApplicationData => 511,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "one-fragment-app-data",
|
||||
server => { },
|
||||
client => { },
|
||||
test => {
|
||||
ApplicationData => 512,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "one-fragment-plus-app-data",
|
||||
server => { },
|
||||
client => { },
|
||||
test => {
|
||||
ApplicationData => 513,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "small-app-data",
|
||||
server => { },
|
||||
client => { },
|
||||
test => {
|
||||
ApplicationData => 4 * 1024 + 1,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "small-app-data-large-fragment-size",
|
||||
server => { },
|
||||
client => { },
|
||||
test => {
|
||||
ApplicationData => 4 * 1024 + 1,
|
||||
MaxFragmentSize => 16384,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "medium-app-data",
|
||||
server => { },
|
||||
client => { },
|
||||
test => {
|
||||
ApplicationData => 32 * 1024 + 7,
|
||||
}
|
||||
},
|
||||
# Exceeds the 64kB write buffer size.
|
||||
{
|
||||
name => "medium-plus-app-data",
|
||||
server => { },
|
||||
client => { },
|
||||
test => {
|
||||
ApplicationData => 128 * 1024 - 3,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "large-app-data",
|
||||
server => { },
|
||||
client => { },
|
||||
test => {
|
||||
ApplicationData => 1024 * 1024,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "large-app-data-large-fragment-size",
|
||||
server => { },
|
||||
client => { },
|
||||
test => {
|
||||
ApplicationData => 1024 * 1024,
|
||||
MaxFragmentSize => 16384,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "large-app-data-odd-fragment-size",
|
||||
server => { },
|
||||
client => { },
|
||||
test => {
|
||||
ApplicationData => 1024 * 1024,
|
||||
MaxFragmentSize => 5 * 1024 - 5,
|
||||
}
|
||||
},
|
||||
# When the buffer / fragment size ratio is sufficiently large,
|
||||
# multi-buffer code kicks in on some platforms for AES-SHA. The
|
||||
# exact minimum ratio depends on the platform, and is usually
|
||||
# around 4. Since the test buffer is 64kB, a 4kB fragment is
|
||||
# easily sufficient.
|
||||
#
|
||||
# (We run this test on all platforms though it's only true multibuffer
|
||||
# on some of them.)
|
||||
{
|
||||
name => "large-app-data-aes-sha1-multibuffer",
|
||||
server => { },
|
||||
client => {
|
||||
CipherString => "AES128-SHA",
|
||||
MaxProtocol => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 1024 * 1024,
|
||||
MaxFragmentSize => 4 * 1024,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "large-app-data-aes-sha2-multibuffer",
|
||||
server => { },
|
||||
client => {
|
||||
CipherString => "AES128-SHA256",
|
||||
MaxProtocol => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 1024 * 1024,
|
||||
MaxFragmentSize => 4 * 1024,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "large-app-data-aes-sha1-multibuffer-odd-fragment",
|
||||
server => { },
|
||||
client => {
|
||||
CipherString => "AES128-SHA",
|
||||
MaxProtocol => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 1024 * 1024 + 3,
|
||||
MaxFragmentSize => 5 * 1024 - 5,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "large-app-data-aes-sha2-multibuffer-odd-fragment",
|
||||
server => { },
|
||||
client => {
|
||||
CipherString => "AES128-SHA256",
|
||||
MaxProtocol => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 1024 * 1024 - 3,
|
||||
MaxFragmentSize => 5 * 1024 + 5,
|
||||
}
|
||||
},
|
||||
# Test that multibuffer-capable code also handles small data correctly.
|
||||
# Here fragment size == app data size < buffer size,
|
||||
# so no multibuffering should happen.
|
||||
{
|
||||
name => "small-app-data-aes-sha1-multibuffer",
|
||||
server => { },
|
||||
client => {
|
||||
CipherString => "AES128-SHA",
|
||||
MaxProtocol => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 4 * 1024,
|
||||
MaxFragmentSize => 4 * 1024,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "small-app-data-aes-sha2-multibuffer",
|
||||
server => { },
|
||||
client => {
|
||||
CipherString => "AES128-SHA256",
|
||||
MaxProtocol => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 4 * 1024,
|
||||
MaxFragmentSize => 4 * 1024,
|
||||
}
|
||||
},
|
||||
############################################
|
||||
# Default (Max) Fragment Size is 512.
|
||||
# Default Application data size is 256.
|
||||
{
|
||||
name => "Maximum Fragment Len extension set to 1024 w. FragmentSize disabled",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
MaxFragmentLenExt => 1024,
|
||||
},
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 3072,
|
||||
MaxFragmentSize => 16384,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "Maximum Fragment Len extension equal FragmentSize to 2048",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
MaxFragmentLenExt => 2048,
|
||||
},
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 3072,
|
||||
MaxFragmentSize => 2048,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "Maximum Fragment Len extension 512 lower than FragmentSize 1024",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
MaxFragmentLenExt => 512,
|
||||
},
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 3072,
|
||||
MaxFragmentSize => 1024,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "Maximum Fragment Len extension 1024 lower than FragmentSize 1024",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
MaxFragmentLenExt => 2048,
|
||||
},
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 3072,
|
||||
MaxFragmentSize => 1024,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "Maximum Fragment Len extension 4096 greater than FragmentSize 2048",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
MaxFragmentLenExt => 4096,
|
||||
},
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 8196,
|
||||
MaxFragmentSize => 2048,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "Maximum Fragment Len extension 2048 greater than FragmentSize 1024",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
MaxFragmentLenExt => 2048,
|
||||
},
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 3072,
|
||||
MaxFragmentSize => 1024,
|
||||
}
|
||||
},
|
||||
);
|
||||
874
test/ssl-tests/14-curves.conf
Normal file
874
test/ssl-tests/14-curves.conf
Normal file
@@ -0,0 +1,874 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 30
|
||||
|
||||
test-0 = 0-curve-sect163k1
|
||||
test-1 = 1-curve-sect163r1
|
||||
test-2 = 2-curve-sect163r2
|
||||
test-3 = 3-curve-sect193r1
|
||||
test-4 = 4-curve-sect193r2
|
||||
test-5 = 5-curve-sect233k1
|
||||
test-6 = 6-curve-sect233r1
|
||||
test-7 = 7-curve-sect239k1
|
||||
test-8 = 8-curve-sect283k1
|
||||
test-9 = 9-curve-sect283r1
|
||||
test-10 = 10-curve-sect409k1
|
||||
test-11 = 11-curve-sect409r1
|
||||
test-12 = 12-curve-sect571k1
|
||||
test-13 = 13-curve-sect571r1
|
||||
test-14 = 14-curve-secp160k1
|
||||
test-15 = 15-curve-secp160r1
|
||||
test-16 = 16-curve-secp160r2
|
||||
test-17 = 17-curve-secp192k1
|
||||
test-18 = 18-curve-prime192v1
|
||||
test-19 = 19-curve-secp224k1
|
||||
test-20 = 20-curve-secp224r1
|
||||
test-21 = 21-curve-secp256k1
|
||||
test-22 = 22-curve-prime256v1
|
||||
test-23 = 23-curve-secp384r1
|
||||
test-24 = 24-curve-secp521r1
|
||||
test-25 = 25-curve-brainpoolP256r1
|
||||
test-26 = 26-curve-brainpoolP384r1
|
||||
test-27 = 27-curve-brainpoolP512r1
|
||||
test-28 = 28-curve-X25519
|
||||
test-29 = 29-curve-X448
|
||||
# ===========================================================
|
||||
|
||||
[0-curve-sect163k1]
|
||||
ssl_conf = 0-curve-sect163k1-ssl
|
||||
|
||||
[0-curve-sect163k1-ssl]
|
||||
server = 0-curve-sect163k1-server
|
||||
client = 0-curve-sect163k1-client
|
||||
|
||||
[0-curve-sect163k1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect163k1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-curve-sect163k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect163k1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect163k1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-curve-sect163r1]
|
||||
ssl_conf = 1-curve-sect163r1-ssl
|
||||
|
||||
[1-curve-sect163r1-ssl]
|
||||
server = 1-curve-sect163r1-server
|
||||
client = 1-curve-sect163r1-client
|
||||
|
||||
[1-curve-sect163r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect163r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-curve-sect163r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect163r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect163r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-curve-sect163r2]
|
||||
ssl_conf = 2-curve-sect163r2-ssl
|
||||
|
||||
[2-curve-sect163r2-ssl]
|
||||
server = 2-curve-sect163r2-server
|
||||
client = 2-curve-sect163r2-client
|
||||
|
||||
[2-curve-sect163r2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect163r2
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-curve-sect163r2-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect163r2
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect163r2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-curve-sect193r1]
|
||||
ssl_conf = 3-curve-sect193r1-ssl
|
||||
|
||||
[3-curve-sect193r1-ssl]
|
||||
server = 3-curve-sect193r1-server
|
||||
client = 3-curve-sect193r1-client
|
||||
|
||||
[3-curve-sect193r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect193r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-curve-sect193r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect193r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect193r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-curve-sect193r2]
|
||||
ssl_conf = 4-curve-sect193r2-ssl
|
||||
|
||||
[4-curve-sect193r2-ssl]
|
||||
server = 4-curve-sect193r2-server
|
||||
client = 4-curve-sect193r2-client
|
||||
|
||||
[4-curve-sect193r2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect193r2
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-curve-sect193r2-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect193r2
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect193r2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-curve-sect233k1]
|
||||
ssl_conf = 5-curve-sect233k1-ssl
|
||||
|
||||
[5-curve-sect233k1-ssl]
|
||||
server = 5-curve-sect233k1-server
|
||||
client = 5-curve-sect233k1-client
|
||||
|
||||
[5-curve-sect233k1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect233k1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-curve-sect233k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect233k1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect233k1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-curve-sect233r1]
|
||||
ssl_conf = 6-curve-sect233r1-ssl
|
||||
|
||||
[6-curve-sect233r1-ssl]
|
||||
server = 6-curve-sect233r1-server
|
||||
client = 6-curve-sect233r1-client
|
||||
|
||||
[6-curve-sect233r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect233r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-curve-sect233r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect233r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect233r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-curve-sect239k1]
|
||||
ssl_conf = 7-curve-sect239k1-ssl
|
||||
|
||||
[7-curve-sect239k1-ssl]
|
||||
server = 7-curve-sect239k1-server
|
||||
client = 7-curve-sect239k1-client
|
||||
|
||||
[7-curve-sect239k1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect239k1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-curve-sect239k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect239k1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect239k1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-curve-sect283k1]
|
||||
ssl_conf = 8-curve-sect283k1-ssl
|
||||
|
||||
[8-curve-sect283k1-ssl]
|
||||
server = 8-curve-sect283k1-server
|
||||
client = 8-curve-sect283k1-client
|
||||
|
||||
[8-curve-sect283k1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect283k1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-curve-sect283k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect283k1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect283k1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[9-curve-sect283r1]
|
||||
ssl_conf = 9-curve-sect283r1-ssl
|
||||
|
||||
[9-curve-sect283r1-ssl]
|
||||
server = 9-curve-sect283r1-server
|
||||
client = 9-curve-sect283r1-client
|
||||
|
||||
[9-curve-sect283r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect283r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-curve-sect283r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect283r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-9]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect283r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[10-curve-sect409k1]
|
||||
ssl_conf = 10-curve-sect409k1-ssl
|
||||
|
||||
[10-curve-sect409k1-ssl]
|
||||
server = 10-curve-sect409k1-server
|
||||
client = 10-curve-sect409k1-client
|
||||
|
||||
[10-curve-sect409k1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect409k1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[10-curve-sect409k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect409k1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-10]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect409k1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[11-curve-sect409r1]
|
||||
ssl_conf = 11-curve-sect409r1-ssl
|
||||
|
||||
[11-curve-sect409r1-ssl]
|
||||
server = 11-curve-sect409r1-server
|
||||
client = 11-curve-sect409r1-client
|
||||
|
||||
[11-curve-sect409r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect409r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-curve-sect409r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect409r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-11]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect409r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[12-curve-sect571k1]
|
||||
ssl_conf = 12-curve-sect571k1-ssl
|
||||
|
||||
[12-curve-sect571k1-ssl]
|
||||
server = 12-curve-sect571k1-server
|
||||
client = 12-curve-sect571k1-client
|
||||
|
||||
[12-curve-sect571k1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect571k1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[12-curve-sect571k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect571k1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-12]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect571k1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[13-curve-sect571r1]
|
||||
ssl_conf = 13-curve-sect571r1-ssl
|
||||
|
||||
[13-curve-sect571r1-ssl]
|
||||
server = 13-curve-sect571r1-server
|
||||
client = 13-curve-sect571r1-client
|
||||
|
||||
[13-curve-sect571r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = sect571r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-curve-sect571r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect571r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-13]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = sect571r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[14-curve-secp160k1]
|
||||
ssl_conf = 14-curve-secp160k1-ssl
|
||||
|
||||
[14-curve-secp160k1-ssl]
|
||||
server = 14-curve-secp160k1-server
|
||||
client = 14-curve-secp160k1-client
|
||||
|
||||
[14-curve-secp160k1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = secp160k1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[14-curve-secp160k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp160k1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-14]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = secp160k1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[15-curve-secp160r1]
|
||||
ssl_conf = 15-curve-secp160r1-ssl
|
||||
|
||||
[15-curve-secp160r1-ssl]
|
||||
server = 15-curve-secp160r1-server
|
||||
client = 15-curve-secp160r1-client
|
||||
|
||||
[15-curve-secp160r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = secp160r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[15-curve-secp160r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp160r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-15]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = secp160r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[16-curve-secp160r2]
|
||||
ssl_conf = 16-curve-secp160r2-ssl
|
||||
|
||||
[16-curve-secp160r2-ssl]
|
||||
server = 16-curve-secp160r2-server
|
||||
client = 16-curve-secp160r2-client
|
||||
|
||||
[16-curve-secp160r2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = secp160r2
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[16-curve-secp160r2-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp160r2
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-16]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = secp160r2
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[17-curve-secp192k1]
|
||||
ssl_conf = 17-curve-secp192k1-ssl
|
||||
|
||||
[17-curve-secp192k1-ssl]
|
||||
server = 17-curve-secp192k1-server
|
||||
client = 17-curve-secp192k1-client
|
||||
|
||||
[17-curve-secp192k1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = secp192k1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[17-curve-secp192k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp192k1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-17]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = secp192k1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[18-curve-prime192v1]
|
||||
ssl_conf = 18-curve-prime192v1-ssl
|
||||
|
||||
[18-curve-prime192v1-ssl]
|
||||
server = 18-curve-prime192v1-server
|
||||
client = 18-curve-prime192v1-client
|
||||
|
||||
[18-curve-prime192v1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = prime192v1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[18-curve-prime192v1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = prime192v1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-18]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = prime192v1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[19-curve-secp224k1]
|
||||
ssl_conf = 19-curve-secp224k1-ssl
|
||||
|
||||
[19-curve-secp224k1-ssl]
|
||||
server = 19-curve-secp224k1-server
|
||||
client = 19-curve-secp224k1-client
|
||||
|
||||
[19-curve-secp224k1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = secp224k1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[19-curve-secp224k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp224k1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-19]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = secp224k1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[20-curve-secp224r1]
|
||||
ssl_conf = 20-curve-secp224r1-ssl
|
||||
|
||||
[20-curve-secp224r1-ssl]
|
||||
server = 20-curve-secp224r1-server
|
||||
client = 20-curve-secp224r1-client
|
||||
|
||||
[20-curve-secp224r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = secp224r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[20-curve-secp224r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp224r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-20]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = secp224r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[21-curve-secp256k1]
|
||||
ssl_conf = 21-curve-secp256k1-ssl
|
||||
|
||||
[21-curve-secp256k1-ssl]
|
||||
server = 21-curve-secp256k1-server
|
||||
client = 21-curve-secp256k1-client
|
||||
|
||||
[21-curve-secp256k1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = secp256k1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[21-curve-secp256k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp256k1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-21]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = secp256k1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[22-curve-prime256v1]
|
||||
ssl_conf = 22-curve-prime256v1-ssl
|
||||
|
||||
[22-curve-prime256v1-ssl]
|
||||
server = 22-curve-prime256v1-server
|
||||
client = 22-curve-prime256v1-client
|
||||
|
||||
[22-curve-prime256v1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = prime256v1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[22-curve-prime256v1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = prime256v1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-22]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = prime256v1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[23-curve-secp384r1]
|
||||
ssl_conf = 23-curve-secp384r1-ssl
|
||||
|
||||
[23-curve-secp384r1-ssl]
|
||||
server = 23-curve-secp384r1-server
|
||||
client = 23-curve-secp384r1-client
|
||||
|
||||
[23-curve-secp384r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = secp384r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[23-curve-secp384r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp384r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-23]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = secp384r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[24-curve-secp521r1]
|
||||
ssl_conf = 24-curve-secp521r1-ssl
|
||||
|
||||
[24-curve-secp521r1-ssl]
|
||||
server = 24-curve-secp521r1-server
|
||||
client = 24-curve-secp521r1-client
|
||||
|
||||
[24-curve-secp521r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = secp521r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[24-curve-secp521r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp521r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-24]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = secp521r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[25-curve-brainpoolP256r1]
|
||||
ssl_conf = 25-curve-brainpoolP256r1-ssl
|
||||
|
||||
[25-curve-brainpoolP256r1-ssl]
|
||||
server = 25-curve-brainpoolP256r1-server
|
||||
client = 25-curve-brainpoolP256r1-client
|
||||
|
||||
[25-curve-brainpoolP256r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = brainpoolP256r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[25-curve-brainpoolP256r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = brainpoolP256r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-25]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = brainpoolP256r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[26-curve-brainpoolP384r1]
|
||||
ssl_conf = 26-curve-brainpoolP384r1-ssl
|
||||
|
||||
[26-curve-brainpoolP384r1-ssl]
|
||||
server = 26-curve-brainpoolP384r1-server
|
||||
client = 26-curve-brainpoolP384r1-client
|
||||
|
||||
[26-curve-brainpoolP384r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = brainpoolP384r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[26-curve-brainpoolP384r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = brainpoolP384r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-26]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = brainpoolP384r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[27-curve-brainpoolP512r1]
|
||||
ssl_conf = 27-curve-brainpoolP512r1-ssl
|
||||
|
||||
[27-curve-brainpoolP512r1-ssl]
|
||||
server = 27-curve-brainpoolP512r1-server
|
||||
client = 27-curve-brainpoolP512r1-client
|
||||
|
||||
[27-curve-brainpoolP512r1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = brainpoolP512r1
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[27-curve-brainpoolP512r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = brainpoolP512r1
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-27]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = brainpoolP512r1
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[28-curve-X25519]
|
||||
ssl_conf = 28-curve-X25519-ssl
|
||||
|
||||
[28-curve-X25519-ssl]
|
||||
server = 28-curve-X25519-server
|
||||
client = 28-curve-X25519-client
|
||||
|
||||
[28-curve-X25519-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = X25519
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[28-curve-X25519-client]
|
||||
CipherString = ECDHE
|
||||
Curves = X25519
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-28]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = X25519
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[29-curve-X448]
|
||||
ssl_conf = 29-curve-X448-ssl
|
||||
|
||||
[29-curve-X448-ssl]
|
||||
server = 29-curve-X448-server
|
||||
client = 29-curve-X448-client
|
||||
|
||||
[29-curve-X448-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Curves = X448
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[29-curve-X448-client]
|
||||
CipherString = ECDHE
|
||||
Curves = X448
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-29]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = X448
|
||||
|
||||
|
||||
47
test/ssl-tests/14-curves.conf.in
Normal file
47
test/ssl-tests/14-curves.conf.in
Normal file
@@ -0,0 +1,47 @@
|
||||
# -*- mode: perl; -*-
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
package ssltests;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use OpenSSL::Test;
|
||||
use OpenSSL::Test::Utils qw(anydisabled);
|
||||
|
||||
my @curves = ("sect163k1", "sect163r1", "sect163r2", "sect193r1",
|
||||
"sect193r2", "sect233k1", "sect233r1", "sect239k1",
|
||||
"sect283k1", "sect283r1", "sect409k1", "sect409r1",
|
||||
"sect571k1", "sect571r1", "secp160k1", "secp160r1",
|
||||
"secp160r2", "secp192k1", "prime192v1", "secp224k1",
|
||||
"secp224r1", "secp256k1", "prime256v1", "secp384r1",
|
||||
"secp521r1", "brainpoolP256r1", "brainpoolP384r1",
|
||||
"brainpoolP512r1", "X25519", "X448");
|
||||
|
||||
our @tests = ();
|
||||
|
||||
sub generate_tests() {
|
||||
foreach (0..$#curves) {
|
||||
my $curve = $curves[$_];
|
||||
push @tests, {
|
||||
name => "curve-${curve}",
|
||||
server => {
|
||||
"Curves" => $curve,
|
||||
# TODO(TLS1.3): Can we get this to work for TLSv1.3?
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "ECDHE",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"Curves" => $curve
|
||||
},
|
||||
test => {
|
||||
"ExpectedTmpKeyType" => $curve,
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
generate_tests();
|
||||
62
test/ssl-tests/15-certstatus.conf
Normal file
62
test/ssl-tests/15-certstatus.conf
Normal file
@@ -0,0 +1,62 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 2
|
||||
|
||||
test-0 = 0-certstatus-good
|
||||
test-1 = 1-certstatus-bad
|
||||
# ===========================================================
|
||||
|
||||
[0-certstatus-good]
|
||||
ssl_conf = 0-certstatus-good-ssl
|
||||
|
||||
[0-certstatus-good-ssl]
|
||||
server = 0-certstatus-good-server
|
||||
client = 0-certstatus-good-client
|
||||
|
||||
[0-certstatus-good-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-certstatus-good-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
Method = TLS
|
||||
server = 0-certstatus-good-server-extra
|
||||
|
||||
[0-certstatus-good-server-extra]
|
||||
CertStatus = GoodResponse
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-certstatus-bad]
|
||||
ssl_conf = 1-certstatus-bad-ssl
|
||||
|
||||
[1-certstatus-bad-ssl]
|
||||
server = 1-certstatus-bad-server
|
||||
client = 1-certstatus-bad-client
|
||||
|
||||
[1-certstatus-bad-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-certstatus-bad-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = ClientFail
|
||||
Method = TLS
|
||||
server = 1-certstatus-bad-server-extra
|
||||
|
||||
[1-certstatus-bad-server-extra]
|
||||
CertStatus = BadResponse
|
||||
|
||||
|
||||
45
test/ssl-tests/15-certstatus.conf.in
Normal file
45
test/ssl-tests/15-certstatus.conf.in
Normal file
@@ -0,0 +1,45 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test CertStatus messages
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "certstatus-good",
|
||||
server => {
|
||||
extra => {
|
||||
"CertStatus" => "GoodResponse",
|
||||
},
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "certstatus-bad",
|
||||
server => {
|
||||
extra => {
|
||||
"CertStatus" => "BadResponse",
|
||||
},
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"ExpectedResult" => "ClientFail"
|
||||
}
|
||||
},
|
||||
);
|
||||
0
test/ssl-tests/16-certstatus.conf
Normal file
0
test/ssl-tests/16-certstatus.conf
Normal file
62
test/ssl-tests/16-dtls-certstatus.conf
Normal file
62
test/ssl-tests/16-dtls-certstatus.conf
Normal file
@@ -0,0 +1,62 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 2
|
||||
|
||||
test-0 = 0-certstatus-good
|
||||
test-1 = 1-certstatus-bad
|
||||
# ===========================================================
|
||||
|
||||
[0-certstatus-good]
|
||||
ssl_conf = 0-certstatus-good-ssl
|
||||
|
||||
[0-certstatus-good-ssl]
|
||||
server = 0-certstatus-good-server
|
||||
client = 0-certstatus-good-client
|
||||
|
||||
[0-certstatus-good-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-certstatus-good-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
Method = DTLS
|
||||
server = 0-certstatus-good-server-extra
|
||||
|
||||
[0-certstatus-good-server-extra]
|
||||
CertStatus = GoodResponse
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-certstatus-bad]
|
||||
ssl_conf = 1-certstatus-bad-ssl
|
||||
|
||||
[1-certstatus-bad-ssl]
|
||||
server = 1-certstatus-bad-server
|
||||
client = 1-certstatus-bad-client
|
||||
|
||||
[1-certstatus-bad-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-certstatus-bad-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = ClientFail
|
||||
Method = DTLS
|
||||
server = 1-certstatus-bad-server-extra
|
||||
|
||||
[1-certstatus-bad-server-extra]
|
||||
CertStatus = BadResponse
|
||||
|
||||
|
||||
78
test/ssl-tests/16-dtls-certstatus.conf.in
Normal file
78
test/ssl-tests/16-dtls-certstatus.conf.in
Normal file
@@ -0,0 +1,78 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test DTLS CertStatus messages
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "certstatus-good",
|
||||
server => {
|
||||
extra => {
|
||||
"CertStatus" => "GoodResponse",
|
||||
},
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "certstatus-bad",
|
||||
server => {
|
||||
extra => {
|
||||
"CertStatus" => "BadResponse",
|
||||
},
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"ExpectedResult" => "ClientFail"
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
our @tests_sctp = (
|
||||
{
|
||||
name => "certstatus-good",
|
||||
server => {
|
||||
extra => {
|
||||
"CertStatus" => "GoodResponse",
|
||||
},
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => "Yes",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "certstatus-bad",
|
||||
server => {
|
||||
extra => {
|
||||
"CertStatus" => "BadResponse",
|
||||
},
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => "Yes",
|
||||
"ExpectedResult" => "ClientFail"
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
push @tests, @tests_sctp unless disabled("sctp") || disabled("sock");
|
||||
432
test/ssl-tests/17-renegotiate.conf
Normal file
432
test/ssl-tests/17-renegotiate.conf
Normal file
@@ -0,0 +1,432 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 14
|
||||
|
||||
test-0 = 0-renegotiate-client-no-resume
|
||||
test-1 = 1-renegotiate-client-resume
|
||||
test-2 = 2-renegotiate-server-no-resume
|
||||
test-3 = 3-renegotiate-server-resume
|
||||
test-4 = 4-renegotiate-client-auth-require
|
||||
test-5 = 5-renegotiate-client-auth-once
|
||||
test-6 = 6-renegotiate-aead-to-non-aead
|
||||
test-7 = 7-renegotiate-non-aead-to-aead
|
||||
test-8 = 8-renegotiate-non-aead-to-non-aead
|
||||
test-9 = 9-renegotiate-aead-to-aead
|
||||
test-10 = 10-no-renegotiation-server-by-client
|
||||
test-11 = 11-no-renegotiation-server-by-server
|
||||
test-12 = 12-no-renegotiation-client-by-server
|
||||
test-13 = 13-no-renegotiation-client-by-client
|
||||
# ===========================================================
|
||||
|
||||
[0-renegotiate-client-no-resume]
|
||||
ssl_conf = 0-renegotiate-client-no-resume-ssl
|
||||
|
||||
[0-renegotiate-client-no-resume-ssl]
|
||||
server = 0-renegotiate-client-no-resume-server
|
||||
client = 0-renegotiate-client-no-resume-client
|
||||
|
||||
[0-renegotiate-client-no-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-renegotiate-client-no-resume-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-renegotiate-client-resume]
|
||||
ssl_conf = 1-renegotiate-client-resume-ssl
|
||||
|
||||
[1-renegotiate-client-resume-ssl]
|
||||
server = 1-renegotiate-client-resume-server
|
||||
client = 1-renegotiate-client-resume-client
|
||||
|
||||
[1-renegotiate-client-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-renegotiate-client-resume-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = TLS
|
||||
ResumptionExpected = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-renegotiate-server-no-resume]
|
||||
ssl_conf = 2-renegotiate-server-no-resume-ssl
|
||||
|
||||
[2-renegotiate-server-no-resume-ssl]
|
||||
server = 2-renegotiate-server-no-resume-server
|
||||
client = 2-renegotiate-server-no-resume-client
|
||||
|
||||
[2-renegotiate-server-no-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-renegotiate-server-no-resume-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateServer
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-renegotiate-server-resume]
|
||||
ssl_conf = 3-renegotiate-server-resume-ssl
|
||||
|
||||
[3-renegotiate-server-resume-ssl]
|
||||
server = 3-renegotiate-server-resume-server
|
||||
client = 3-renegotiate-server-resume-client
|
||||
|
||||
[3-renegotiate-server-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-renegotiate-server-resume-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateServer
|
||||
Method = TLS
|
||||
ResumptionExpected = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-renegotiate-client-auth-require]
|
||||
ssl_conf = 4-renegotiate-client-auth-require-ssl
|
||||
|
||||
[4-renegotiate-client-auth-require-ssl]
|
||||
server = 4-renegotiate-client-auth-require-server
|
||||
client = 4-renegotiate-client-auth-require-client
|
||||
|
||||
[4-renegotiate-client-auth-require-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[4-renegotiate-client-auth-require-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateServer
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-renegotiate-client-auth-once]
|
||||
ssl_conf = 5-renegotiate-client-auth-once-ssl
|
||||
|
||||
[5-renegotiate-client-auth-once-ssl]
|
||||
server = 5-renegotiate-client-auth-once-server
|
||||
client = 5-renegotiate-client-auth-once-client
|
||||
|
||||
[5-renegotiate-client-auth-once-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Once
|
||||
|
||||
[5-renegotiate-client-auth-once-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateServer
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-renegotiate-aead-to-non-aead]
|
||||
ssl_conf = 6-renegotiate-aead-to-non-aead-ssl
|
||||
|
||||
[6-renegotiate-aead-to-non-aead-ssl]
|
||||
server = 6-renegotiate-aead-to-non-aead-server
|
||||
client = 6-renegotiate-aead-to-non-aead-client
|
||||
|
||||
[6-renegotiate-aead-to-non-aead-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-renegotiate-aead-to-non-aead-client]
|
||||
CipherString = AES128-GCM-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
client = 6-renegotiate-aead-to-non-aead-client-extra
|
||||
|
||||
[6-renegotiate-aead-to-non-aead-client-extra]
|
||||
RenegotiateCiphers = AES128-SHA
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-renegotiate-non-aead-to-aead]
|
||||
ssl_conf = 7-renegotiate-non-aead-to-aead-ssl
|
||||
|
||||
[7-renegotiate-non-aead-to-aead-ssl]
|
||||
server = 7-renegotiate-non-aead-to-aead-server
|
||||
client = 7-renegotiate-non-aead-to-aead-client
|
||||
|
||||
[7-renegotiate-non-aead-to-aead-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-renegotiate-non-aead-to-aead-client]
|
||||
CipherString = AES128-SHA
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
client = 7-renegotiate-non-aead-to-aead-client-extra
|
||||
|
||||
[7-renegotiate-non-aead-to-aead-client-extra]
|
||||
RenegotiateCiphers = AES128-GCM-SHA256
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-renegotiate-non-aead-to-non-aead]
|
||||
ssl_conf = 8-renegotiate-non-aead-to-non-aead-ssl
|
||||
|
||||
[8-renegotiate-non-aead-to-non-aead-ssl]
|
||||
server = 8-renegotiate-non-aead-to-non-aead-server
|
||||
client = 8-renegotiate-non-aead-to-non-aead-client
|
||||
|
||||
[8-renegotiate-non-aead-to-non-aead-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-renegotiate-non-aead-to-non-aead-client]
|
||||
CipherString = AES128-SHA
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
client = 8-renegotiate-non-aead-to-non-aead-client-extra
|
||||
|
||||
[8-renegotiate-non-aead-to-non-aead-client-extra]
|
||||
RenegotiateCiphers = AES256-SHA
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[9-renegotiate-aead-to-aead]
|
||||
ssl_conf = 9-renegotiate-aead-to-aead-ssl
|
||||
|
||||
[9-renegotiate-aead-to-aead-ssl]
|
||||
server = 9-renegotiate-aead-to-aead-server
|
||||
client = 9-renegotiate-aead-to-aead-client
|
||||
|
||||
[9-renegotiate-aead-to-aead-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-renegotiate-aead-to-aead-client]
|
||||
CipherString = AES128-GCM-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-9]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
client = 9-renegotiate-aead-to-aead-client-extra
|
||||
|
||||
[9-renegotiate-aead-to-aead-client-extra]
|
||||
RenegotiateCiphers = AES256-GCM-SHA384
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[10-no-renegotiation-server-by-client]
|
||||
ssl_conf = 10-no-renegotiation-server-by-client-ssl
|
||||
|
||||
[10-no-renegotiation-server-by-client-ssl]
|
||||
server = 10-no-renegotiation-server-by-client-server
|
||||
client = 10-no-renegotiation-server-by-client-client
|
||||
|
||||
[10-no-renegotiation-server-by-client-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = NoRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[10-no-renegotiation-server-by-client-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-10]
|
||||
ExpectedResult = ClientFail
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[11-no-renegotiation-server-by-server]
|
||||
ssl_conf = 11-no-renegotiation-server-by-server-ssl
|
||||
|
||||
[11-no-renegotiation-server-by-server-ssl]
|
||||
server = 11-no-renegotiation-server-by-server-server
|
||||
client = 11-no-renegotiation-server-by-server-client
|
||||
|
||||
[11-no-renegotiation-server-by-server-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = NoRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-no-renegotiation-server-by-server-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-11]
|
||||
ExpectedResult = ServerFail
|
||||
HandshakeMode = RenegotiateServer
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[12-no-renegotiation-client-by-server]
|
||||
ssl_conf = 12-no-renegotiation-client-by-server-ssl
|
||||
|
||||
[12-no-renegotiation-client-by-server-ssl]
|
||||
server = 12-no-renegotiation-client-by-server-server
|
||||
client = 12-no-renegotiation-client-by-server-client
|
||||
|
||||
[12-no-renegotiation-client-by-server-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[12-no-renegotiation-client-by-server-client]
|
||||
CipherString = DEFAULT
|
||||
Options = NoRenegotiation
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-12]
|
||||
ExpectedResult = ServerFail
|
||||
HandshakeMode = RenegotiateServer
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[13-no-renegotiation-client-by-client]
|
||||
ssl_conf = 13-no-renegotiation-client-by-client-ssl
|
||||
|
||||
[13-no-renegotiation-client-by-client-ssl]
|
||||
server = 13-no-renegotiation-client-by-client-server
|
||||
client = 13-no-renegotiation-client-by-client-client
|
||||
|
||||
[13-no-renegotiation-client-by-client-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-no-renegotiation-client-by-client-client]
|
||||
CipherString = DEFAULT
|
||||
Options = NoRenegotiation
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-13]
|
||||
ExpectedResult = ClientFail
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = TLS
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
249
test/ssl-tests/17-renegotiate.conf.in
Normal file
249
test/ssl-tests/17-renegotiate.conf.in
Normal file
@@ -0,0 +1,249 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test Renegotiation
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "renegotiate-client-no-resume",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-client-resume",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-server-no-resume",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-server-resume",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-client-auth-require",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require",
|
||||
},
|
||||
client => {
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-client-auth-once",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Once",
|
||||
},
|
||||
client => {
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
}
|
||||
);
|
||||
our @tests_tls1_2 = (
|
||||
{
|
||||
name => "renegotiate-aead-to-non-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-GCM-SHA256",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES128-SHA"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-non-aead-to-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES128-GCM-SHA256"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-non-aead-to-non-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES256-SHA"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-aead-to-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-GCM-SHA256",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES256-GCM-SHA384"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "no-renegotiation-server-by-client",
|
||||
server => {
|
||||
"Options" => "NoRenegotiation",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => { },
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "ClientFail"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "no-renegotiation-server-by-server",
|
||||
server => {
|
||||
"Options" => "NoRenegotiation",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => { },
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "ServerFail"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "no-renegotiation-client-by-server",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {
|
||||
"Options" => "NoRenegotiation",
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "ServerFail"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "no-renegotiation-client-by-client",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {
|
||||
"Options" => "NoRenegotiation",
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "ClientFail"
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
push @tests, @tests_tls1_2 unless disabled("tls1_2");
|
||||
285
test/ssl-tests/18-dtls-renegotiate.conf
Normal file
285
test/ssl-tests/18-dtls-renegotiate.conf
Normal file
@@ -0,0 +1,285 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 9
|
||||
|
||||
test-0 = 0-renegotiate-client-no-resume
|
||||
test-1 = 1-renegotiate-client-resume
|
||||
test-2 = 2-renegotiate-server-resume
|
||||
test-3 = 3-renegotiate-client-auth-require
|
||||
test-4 = 4-renegotiate-client-auth-once
|
||||
test-5 = 5-renegotiate-aead-to-non-aead
|
||||
test-6 = 6-renegotiate-non-aead-to-aead
|
||||
test-7 = 7-renegotiate-non-aead-to-non-aead
|
||||
test-8 = 8-renegotiate-aead-to-aead
|
||||
# ===========================================================
|
||||
|
||||
[0-renegotiate-client-no-resume]
|
||||
ssl_conf = 0-renegotiate-client-no-resume-ssl
|
||||
|
||||
[0-renegotiate-client-no-resume-ssl]
|
||||
server = 0-renegotiate-client-no-resume-server
|
||||
client = 0-renegotiate-client-no-resume-client
|
||||
|
||||
[0-renegotiate-client-no-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-renegotiate-client-no-resume-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
UseSCTP = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-renegotiate-client-resume]
|
||||
ssl_conf = 1-renegotiate-client-resume-ssl
|
||||
|
||||
[1-renegotiate-client-resume-ssl]
|
||||
server = 1-renegotiate-client-resume-server
|
||||
client = 1-renegotiate-client-resume-client
|
||||
|
||||
[1-renegotiate-client-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-renegotiate-client-resume-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = DTLS
|
||||
ResumptionExpected = Yes
|
||||
UseSCTP = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-renegotiate-server-resume]
|
||||
ssl_conf = 2-renegotiate-server-resume-ssl
|
||||
|
||||
[2-renegotiate-server-resume-ssl]
|
||||
server = 2-renegotiate-server-resume-server
|
||||
client = 2-renegotiate-server-resume-client
|
||||
|
||||
[2-renegotiate-server-resume-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-renegotiate-server-resume-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateServer
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
UseSCTP = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-renegotiate-client-auth-require]
|
||||
ssl_conf = 3-renegotiate-client-auth-require-ssl
|
||||
|
||||
[3-renegotiate-client-auth-require-ssl]
|
||||
server = 3-renegotiate-client-auth-require-server
|
||||
client = 3-renegotiate-client-auth-require-client
|
||||
|
||||
[3-renegotiate-client-auth-require-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[3-renegotiate-client-auth-require-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateServer
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
UseSCTP = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-renegotiate-client-auth-once]
|
||||
ssl_conf = 4-renegotiate-client-auth-once-ssl
|
||||
|
||||
[4-renegotiate-client-auth-once-ssl]
|
||||
server = 4-renegotiate-client-auth-once-server
|
||||
client = 4-renegotiate-client-auth-once-client
|
||||
|
||||
[4-renegotiate-client-auth-once-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Once
|
||||
|
||||
[4-renegotiate-client-auth-once-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateServer
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
UseSCTP = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-renegotiate-aead-to-non-aead]
|
||||
ssl_conf = 5-renegotiate-aead-to-non-aead-ssl
|
||||
|
||||
[5-renegotiate-aead-to-non-aead-ssl]
|
||||
server = 5-renegotiate-aead-to-non-aead-server
|
||||
client = 5-renegotiate-aead-to-non-aead-client
|
||||
|
||||
[5-renegotiate-aead-to-non-aead-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-renegotiate-aead-to-non-aead-client]
|
||||
CipherString = AES128-GCM-SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
UseSCTP = No
|
||||
client = 5-renegotiate-aead-to-non-aead-client-extra
|
||||
|
||||
[5-renegotiate-aead-to-non-aead-client-extra]
|
||||
RenegotiateCiphers = AES128-SHA
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-renegotiate-non-aead-to-aead]
|
||||
ssl_conf = 6-renegotiate-non-aead-to-aead-ssl
|
||||
|
||||
[6-renegotiate-non-aead-to-aead-ssl]
|
||||
server = 6-renegotiate-non-aead-to-aead-server
|
||||
client = 6-renegotiate-non-aead-to-aead-client
|
||||
|
||||
[6-renegotiate-non-aead-to-aead-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-renegotiate-non-aead-to-aead-client]
|
||||
CipherString = AES128-SHA
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
UseSCTP = No
|
||||
client = 6-renegotiate-non-aead-to-aead-client-extra
|
||||
|
||||
[6-renegotiate-non-aead-to-aead-client-extra]
|
||||
RenegotiateCiphers = AES128-GCM-SHA256
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-renegotiate-non-aead-to-non-aead]
|
||||
ssl_conf = 7-renegotiate-non-aead-to-non-aead-ssl
|
||||
|
||||
[7-renegotiate-non-aead-to-non-aead-ssl]
|
||||
server = 7-renegotiate-non-aead-to-non-aead-server
|
||||
client = 7-renegotiate-non-aead-to-non-aead-client
|
||||
|
||||
[7-renegotiate-non-aead-to-non-aead-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-renegotiate-non-aead-to-non-aead-client]
|
||||
CipherString = AES128-SHA
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
UseSCTP = No
|
||||
client = 7-renegotiate-non-aead-to-non-aead-client-extra
|
||||
|
||||
[7-renegotiate-non-aead-to-non-aead-client-extra]
|
||||
RenegotiateCiphers = AES256-SHA
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-renegotiate-aead-to-aead]
|
||||
ssl_conf = 8-renegotiate-aead-to-aead-ssl
|
||||
|
||||
[8-renegotiate-aead-to-aead-ssl]
|
||||
server = 8-renegotiate-aead-to-aead-server
|
||||
client = 8-renegotiate-aead-to-aead-client
|
||||
|
||||
[8-renegotiate-aead-to-aead-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-renegotiate-aead-to-aead-client]
|
||||
CipherString = AES128-GCM-SHA256
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = RenegotiateClient
|
||||
Method = DTLS
|
||||
ResumptionExpected = No
|
||||
UseSCTP = No
|
||||
client = 8-renegotiate-aead-to-aead-client-extra
|
||||
|
||||
[8-renegotiate-aead-to-aead-client-extra]
|
||||
RenegotiateCiphers = AES256-GCM-SHA384
|
||||
|
||||
|
||||
192
test/ssl-tests/18-dtls-renegotiate.conf.in
Normal file
192
test/ssl-tests/18-dtls-renegotiate.conf.in
Normal file
@@ -0,0 +1,192 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test Renegotiation
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
our @tests = ();
|
||||
|
||||
foreach my $sctp ("No", "Yes")
|
||||
{
|
||||
next if disabled("sctp") && $sctp eq "Yes";
|
||||
|
||||
my $suffix = ($sctp eq "No") ? "" : "-sctp";
|
||||
our @tests_basic = (
|
||||
{
|
||||
name => "renegotiate-client-no-resume".$suffix,
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation"
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => $sctp,
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-client-resume".$suffix,
|
||||
server => {},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => $sctp,
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
# Note: Unlike the TLS tests, we will never do resumption with server
|
||||
# initiated reneg. This is because an OpenSSL DTLS client will always do a full
|
||||
# handshake (i.e. it doesn't supply a session id) when it receives a
|
||||
# HelloRequest. This is different to the OpenSSL TLS implementation where an
|
||||
# OpenSSL client will always try an abbreviated handshake (i.e. it will supply
|
||||
# the session id). This goes all the way to commit 48ae85b6f when abbreviated
|
||||
# handshake support was first added. Neither behaviour is wrong, but the
|
||||
# discrepancy is strange. TODO: Should we harmonise the TLS and DTLS behaviour,
|
||||
# and if so, what to?
|
||||
{
|
||||
name => "renegotiate-server-resume".$suffix,
|
||||
server => {},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => $sctp,
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-client-auth-require".$suffix,
|
||||
server => {
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require",
|
||||
},
|
||||
client => {
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => $sctp,
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-client-auth-once".$suffix,
|
||||
server => {
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Once",
|
||||
},
|
||||
client => {
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => $sctp,
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
}
|
||||
);
|
||||
push @tests, @tests_basic;
|
||||
|
||||
next if disabled("dtls1_2");
|
||||
our @tests_dtls1_2 = (
|
||||
{
|
||||
name => "renegotiate-aead-to-non-aead".$suffix,
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-GCM-SHA256",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES128-SHA"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => $sctp,
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-non-aead-to-aead".$suffix,
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES128-GCM-SHA256"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => $sctp,
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-non-aead-to-non-aead".$suffix,
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES256-SHA"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => $sctp,
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-aead-to-aead".$suffix,
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-GCM-SHA256",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES256-GCM-SHA384"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"UseSCTP" => $sctp,
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
);
|
||||
push @tests, @tests_dtls1_2;
|
||||
}
|
||||
162
test/ssl-tests/19-mac-then-encrypt.conf
Normal file
162
test/ssl-tests/19-mac-then-encrypt.conf
Normal file
@@ -0,0 +1,162 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 6
|
||||
|
||||
test-0 = 0-disable-encrypt-then-mac-server-sha
|
||||
test-1 = 1-disable-encrypt-then-mac-client-sha
|
||||
test-2 = 2-disable-encrypt-then-mac-both-sha
|
||||
test-3 = 3-disable-encrypt-then-mac-server-sha2
|
||||
test-4 = 4-disable-encrypt-then-mac-client-sha2
|
||||
test-5 = 5-disable-encrypt-then-mac-both-sha2
|
||||
# ===========================================================
|
||||
|
||||
[0-disable-encrypt-then-mac-server-sha]
|
||||
ssl_conf = 0-disable-encrypt-then-mac-server-sha-ssl
|
||||
|
||||
[0-disable-encrypt-then-mac-server-sha-ssl]
|
||||
server = 0-disable-encrypt-then-mac-server-sha-server
|
||||
client = 0-disable-encrypt-then-mac-server-sha-client
|
||||
|
||||
[0-disable-encrypt-then-mac-server-sha-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -EncryptThenMac
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-disable-encrypt-then-mac-server-sha-client]
|
||||
CipherString = AES128-SHA
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-disable-encrypt-then-mac-client-sha]
|
||||
ssl_conf = 1-disable-encrypt-then-mac-client-sha-ssl
|
||||
|
||||
[1-disable-encrypt-then-mac-client-sha-ssl]
|
||||
server = 1-disable-encrypt-then-mac-client-sha-server
|
||||
client = 1-disable-encrypt-then-mac-client-sha-client
|
||||
|
||||
[1-disable-encrypt-then-mac-client-sha-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-disable-encrypt-then-mac-client-sha-client]
|
||||
CipherString = AES128-SHA
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -EncryptThenMac
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-disable-encrypt-then-mac-both-sha]
|
||||
ssl_conf = 2-disable-encrypt-then-mac-both-sha-ssl
|
||||
|
||||
[2-disable-encrypt-then-mac-both-sha-ssl]
|
||||
server = 2-disable-encrypt-then-mac-both-sha-server
|
||||
client = 2-disable-encrypt-then-mac-both-sha-client
|
||||
|
||||
[2-disable-encrypt-then-mac-both-sha-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -EncryptThenMac
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-disable-encrypt-then-mac-both-sha-client]
|
||||
CipherString = AES128-SHA
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -EncryptThenMac
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-disable-encrypt-then-mac-server-sha2]
|
||||
ssl_conf = 3-disable-encrypt-then-mac-server-sha2-ssl
|
||||
|
||||
[3-disable-encrypt-then-mac-server-sha2-ssl]
|
||||
server = 3-disable-encrypt-then-mac-server-sha2-server
|
||||
client = 3-disable-encrypt-then-mac-server-sha2-client
|
||||
|
||||
[3-disable-encrypt-then-mac-server-sha2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -EncryptThenMac
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-disable-encrypt-then-mac-server-sha2-client]
|
||||
CipherString = AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-disable-encrypt-then-mac-client-sha2]
|
||||
ssl_conf = 4-disable-encrypt-then-mac-client-sha2-ssl
|
||||
|
||||
[4-disable-encrypt-then-mac-client-sha2-ssl]
|
||||
server = 4-disable-encrypt-then-mac-client-sha2-server
|
||||
client = 4-disable-encrypt-then-mac-client-sha2-client
|
||||
|
||||
[4-disable-encrypt-then-mac-client-sha2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-disable-encrypt-then-mac-client-sha2-client]
|
||||
CipherString = AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -EncryptThenMac
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-disable-encrypt-then-mac-both-sha2]
|
||||
ssl_conf = 5-disable-encrypt-then-mac-both-sha2-ssl
|
||||
|
||||
[5-disable-encrypt-then-mac-both-sha2-ssl]
|
||||
server = 5-disable-encrypt-then-mac-both-sha2-server
|
||||
client = 5-disable-encrypt-then-mac-both-sha2-client
|
||||
|
||||
[5-disable-encrypt-then-mac-both-sha2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = -EncryptThenMac
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-disable-encrypt-then-mac-both-sha2-client]
|
||||
CipherString = AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = -EncryptThenMac
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
102
test/ssl-tests/19-mac-then-encrypt.conf.in
Normal file
102
test/ssl-tests/19-mac-then-encrypt.conf.in
Normal file
@@ -0,0 +1,102 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
package ssltests;
|
||||
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "disable-encrypt-then-mac-server-sha",
|
||||
server => {
|
||||
"Options" => "-EncryptThenMac",
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "disable-encrypt-then-mac-client-sha",
|
||||
server => {
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
"Options" => "-EncryptThenMac",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "disable-encrypt-then-mac-both-sha",
|
||||
server => {
|
||||
"Options" => "-EncryptThenMac",
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
"Options" => "-EncryptThenMac",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
my @tests_tls1_2 = (
|
||||
{
|
||||
name => "disable-encrypt-then-mac-server-sha2",
|
||||
server => {
|
||||
"Options" => "-EncryptThenMac",
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA256",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "disable-encrypt-then-mac-client-sha2",
|
||||
server => {
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA256",
|
||||
"Options" => "-EncryptThenMac",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "disable-encrypt-then-mac-both-sha2",
|
||||
server => {
|
||||
"Options" => "-EncryptThenMac",
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA256",
|
||||
"Options" => "-EncryptThenMac",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
push @tests, @tests_tls1_2 unless disabled("tls1_2");
|
||||
1680
test/ssl-tests/20-cert-select.conf
Normal file
1680
test/ssl-tests/20-cert-select.conf
Normal file
File diff suppressed because it is too large
Load Diff
864
test/ssl-tests/20-cert-select.conf.in
Normal file
864
test/ssl-tests/20-cert-select.conf.in
Normal file
@@ -0,0 +1,864 @@
|
||||
# -*- mode: perl; -*-
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
my $server = {
|
||||
"ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
|
||||
"Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"),
|
||||
"Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"),
|
||||
"Ed448.Certificate" => test_pem("server-ed448-cert.pem"),
|
||||
"Ed448.PrivateKey" => test_pem("server-ed448-key.pem"),
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
};
|
||||
|
||||
my $server_pss = {
|
||||
"PSS.Certificate" => test_pem("server-pss-cert.pem"),
|
||||
"PSS.PrivateKey" => test_pem("server-pss-key.pem"),
|
||||
"ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
|
||||
"Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"),
|
||||
"Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"),
|
||||
"Ed448.Certificate" => test_pem("server-ed448-cert.pem"),
|
||||
"Ed448.PrivateKey" => test_pem("server-ed448-key.pem"),
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
};
|
||||
|
||||
my $server_pss_only = {
|
||||
"Certificate" => test_pem("server-pss-cert.pem"),
|
||||
"PrivateKey" => test_pem("server-pss-key.pem"),
|
||||
};
|
||||
|
||||
my $server_rsa_all = {
|
||||
"PSS.Certificate" => test_pem("server-pss-cert.pem"),
|
||||
"PSS.PrivateKey" => test_pem("server-pss-key.pem"),
|
||||
"Certificate" => test_pem("servercert.pem"),
|
||||
"PrivateKey" => test_pem("serverkey.pem"),
|
||||
};
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "ECDSA CipherString Selection",
|
||||
server => $server,
|
||||
client => {
|
||||
"CipherString" => "aECDSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"RequestCAFile" => test_pem("root-cert.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "P-256",
|
||||
"ExpectedServerSignType" =>, "EC",
|
||||
# Note: certificate_authorities not sent for TLS < 1.3
|
||||
"ExpectedServerCANames" =>, "empty",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ECDSA CipherString Selection",
|
||||
server => {
|
||||
"ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
#Deliberately set supported_groups to one not in the cert. This
|
||||
#should be tolerated
|
||||
"Groups" => "P-384"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "aECDSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"Groups" => "P-256:P-384",
|
||||
"RequestCAFile" => test_pem("root-cert.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "P-256",
|
||||
"ExpectedServerSignType" =>, "EC",
|
||||
# Note: certificate_authorities not sent for TLS < 1.3
|
||||
"ExpectedServerCANames" =>, "empty",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ECDSA CipherString Selection",
|
||||
server => {
|
||||
"ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"Groups" => "P-256:P-384"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "aECDSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
#Deliberately set groups to not include the certificate group. This
|
||||
#should fail
|
||||
"Groups" => "P-384",
|
||||
"RequestCAFile" => test_pem("root-cert.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "Ed25519 CipherString and Signature Algorithm Selection",
|
||||
server => $server,
|
||||
client => {
|
||||
"CipherString" => "aECDSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"SignatureAlgorithms" => "ed25519:ECDSA+SHA256",
|
||||
"RequestCAFile" => test_pem("root-cert.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "Ed25519",
|
||||
"ExpectedServerSignType" =>, "Ed25519",
|
||||
# Note: certificate_authorities not sent for TLS < 1.3
|
||||
"ExpectedServerCANames" =>, "empty",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "Ed448 CipherString and Signature Algorithm Selection",
|
||||
server => $server,
|
||||
client => {
|
||||
"CipherString" => "aECDSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"SignatureAlgorithms" => "ed448:ECDSA+SHA256",
|
||||
"RequestCAFile" => test_pem("root-cert.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "Ed448",
|
||||
"ExpectedServerSignType" =>, "Ed448",
|
||||
# Note: certificate_authorities not sent for TLS < 1.3
|
||||
"ExpectedServerCANames" =>, "empty",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ECDSA with brainpool",
|
||||
server => {
|
||||
"Certificate" => test_pem("server-ecdsa-brainpoolP256r1-cert.pem"),
|
||||
"PrivateKey" => test_pem("server-ecdsa-brainpoolP256r1-key.pem"),
|
||||
"Groups" => "brainpoolP256r1",
|
||||
},
|
||||
client => {
|
||||
#We don't restrict this to TLSv1.2, although use of brainpool
|
||||
#should force this anyway so that this should succeed
|
||||
"CipherString" => "aECDSA",
|
||||
"RequestCAFile" => test_pem("root-cert.pem"),
|
||||
"Groups" => "brainpoolP256r1",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "brainpoolP256r1",
|
||||
"ExpectedServerSignType" =>, "EC",
|
||||
# Note: certificate_authorities not sent for TLS < 1.3
|
||||
"ExpectedServerCANames" =>, "empty",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA CipherString Selection",
|
||||
server => $server,
|
||||
client => {
|
||||
"CipherString" => "aRSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "RSA",
|
||||
"ExpectedServerSignType" =>, "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA-PSS Certificate CipherString Selection",
|
||||
server => $server_pss,
|
||||
client => {
|
||||
"CipherString" => "aRSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "RSA-PSS",
|
||||
"ExpectedServerSignType" =>, "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "P-256 CipherString and Signature Algorithm Selection",
|
||||
server => $server,
|
||||
client => {
|
||||
"CipherString" => "aECDSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256:ed25519",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "P-256",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "EC",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "Ed25519 CipherString and Curves Selection",
|
||||
server => $server,
|
||||
client => {
|
||||
"CipherString" => "aECDSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256:ed25519",
|
||||
# Excluding P-256 from the supported curves list means server
|
||||
# certificate should be Ed25519 and not P-256
|
||||
"Curves" => "X25519"
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "Ed25519",
|
||||
"ExpectedServerSignType" =>, "Ed25519",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "Ed448 CipherString and Curves Selection",
|
||||
server => $server,
|
||||
client => {
|
||||
"CipherString" => "aECDSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256:ed448",
|
||||
# Excluding P-256 from the supported curves list means server
|
||||
# certificate should be Ed25519 and not P-256
|
||||
"Curves" => "X448"
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "Ed448",
|
||||
"ExpectedServerSignType" =>, "Ed448",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ECDSA CipherString Selection, no ECDSA certificate",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "aECDSA",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ECDSA Signature Algorithm Selection",
|
||||
server => $server,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "P-256",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "EC",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ECDSA Signature Algorithm Selection SHA384",
|
||||
server => $server,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA384",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "P-256",
|
||||
"ExpectedServerSignHash" => "SHA384",
|
||||
"ExpectedServerSignType" => "EC",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ECDSA Signature Algorithm Selection SHA1",
|
||||
server => $server,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA1",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "P-256",
|
||||
"ExpectedServerSignHash" => "SHA1",
|
||||
"ExpectedServerSignType" => "EC",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ECDSA Signature Algorithm Selection compressed point",
|
||||
server => {
|
||||
"ECDSA.Certificate" => test_pem("server-cecdsa-cert.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("server-cecdsa-key.pem"),
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "P-256",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "EC",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "ECDSA Signature Algorithm Selection, no ECDSA certificate",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA Signature Algorithm Selection",
|
||||
server => $server,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "RSA+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "RSA",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA-PSS Signature Algorithm Selection",
|
||||
server => $server,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "RSA-PSS+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA-PSS Certificate Legacy Signature Algorithm Selection",
|
||||
server => $server_pss,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "RSA-PSS+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA-PSS Certificate Unified Signature Algorithm Selection",
|
||||
server => $server_pss,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "rsa_pss_pss_sha256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA-PSS",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "Only RSA-PSS Certificate",
|
||||
server => $server_pss_only,
|
||||
client => {},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA-PSS",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA-PSS Certificate, no PSS signature algorithms",
|
||||
server => $server_pss_only,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "RSA+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA key exchange with all RSA certificate types",
|
||||
server => $server_rsa_all,
|
||||
client => {
|
||||
"CipherString" => "kRSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "RSA",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "RSA key exchange with only RSA-PSS certificate",
|
||||
server => $server_pss_only,
|
||||
client => {
|
||||
"CipherString" => "kRSA",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "Suite B P-256 Hash Algorithm Selection",
|
||||
server => {
|
||||
"ECDSA.Certificate" => test_pem("p256-server-cert.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("p256-server-key.pem"),
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "SUITEB128"
|
||||
},
|
||||
client => {
|
||||
"VerifyCAFile" => test_pem("p384-root.pem"),
|
||||
"SignatureAlgorithms" => "ECDSA+SHA384:ECDSA+SHA256"
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "P-256",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "EC",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "Suite B P-384 Hash Algorithm Selection",
|
||||
server => {
|
||||
"ECDSA.Certificate" => test_pem("p384-server-cert.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("p384-server-key.pem"),
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "SUITEB128"
|
||||
},
|
||||
client => {
|
||||
"VerifyCAFile" => test_pem("p384-root.pem"),
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256:ECDSA+SHA384"
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "P-384",
|
||||
"ExpectedServerSignHash" => "SHA384",
|
||||
"ExpectedServerSignType" => "EC",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.2 Ed25519 Client Auth",
|
||||
server => {
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require"
|
||||
},
|
||||
client => {
|
||||
"Ed25519.Certificate" => test_pem("client-ed25519-cert.pem"),
|
||||
"Ed25519.PrivateKey" => test_pem("client-ed25519-key.pem"),
|
||||
"MinProtocol" => "TLSv1.2",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedClientCertType" => "Ed25519",
|
||||
"ExpectedClientSignType" => "Ed25519",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.2 Ed448 Client Auth",
|
||||
server => {
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require"
|
||||
},
|
||||
client => {
|
||||
"Ed448.Certificate" => test_pem("client-ed448-cert.pem"),
|
||||
"Ed448.PrivateKey" => test_pem("client-ed448-key.pem"),
|
||||
"MinProtocol" => "TLSv1.2",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"ExpectedClientCertType" => "Ed448",
|
||||
"ExpectedClientSignType" => "Ed448",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
my @tests_tls_1_1 = (
|
||||
{
|
||||
name => "Only RSA-PSS Certificate, TLS v1.1",
|
||||
server => $server_pss_only,
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.1",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
push @tests, @tests_tls_1_1 unless disabled("tls1_1");
|
||||
|
||||
my $server_tls_1_3 = {
|
||||
"ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
|
||||
"Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"),
|
||||
"Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"),
|
||||
"Ed448.Certificate" => test_pem("server-ed448-cert.pem"),
|
||||
"Ed448.PrivateKey" => test_pem("server-ed448-key.pem"),
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3"
|
||||
};
|
||||
|
||||
my $server_tls_1_3_pss = {
|
||||
"PSS.Certificate" => test_pem("server-pss-cert.pem"),
|
||||
"PSS.PrivateKey" => test_pem("server-pss-key.pem"),
|
||||
"ECDSA.Certificate" => test_pem("server-ecdsa-cert.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("server-ecdsa-key.pem"),
|
||||
"Ed25519.Certificate" => test_pem("server-ed25519-cert.pem"),
|
||||
"Ed25519.PrivateKey" => test_pem("server-ed25519-key.pem"),
|
||||
"Ed448.Certificate" => test_pem("server-ed448-cert.pem"),
|
||||
"Ed448.PrivateKey" => test_pem("server-ed449-key.pem"),
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3"
|
||||
};
|
||||
|
||||
my $client_tls_1_3 = {
|
||||
"RSA.Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"RSA.PrivateKey" => test_pem("ee-key.pem"),
|
||||
"ECDSA.Certificate" => test_pem("ee-ecdsa-client-chain.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("ee-ecdsa-key.pem"),
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3"
|
||||
};
|
||||
|
||||
my @tests_tls_1_3 = (
|
||||
{
|
||||
name => "TLS 1.3 ECDSA Signature Algorithm Selection",
|
||||
server => $server_tls_1_3,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "P-256",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "EC",
|
||||
"ExpectedServerCANames" => "empty",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 ECDSA Signature Algorithm Selection compressed point",
|
||||
server => {
|
||||
"ECDSA.Certificate" => test_pem("server-cecdsa-cert.pem"),
|
||||
"ECDSA.PrivateKey" => test_pem("server-cecdsa-key.pem"),
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3"
|
||||
},
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "P-256",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "EC",
|
||||
"ExpectedServerCANames" => "empty",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 ECDSA Signature Algorithm Selection SHA1",
|
||||
server => $server_tls_1_3,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA1",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 ECDSA Signature Algorithm Selection with PSS",
|
||||
server => $server_tls_1_3,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256:RSA-PSS+SHA256",
|
||||
"RequestCAFile" => test_pem("root-cert.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "P-256",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "EC",
|
||||
"ExpectedServerCANames" => test_pem("root-cert.pem"),
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 RSA Signature Algorithm Selection SHA384 with PSS",
|
||||
server => $server_tls_1_3,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA384:RSA-PSS+SHA384",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA",
|
||||
"ExpectedServerSignHash" => "SHA384",
|
||||
"ExpectedServerSignType" => "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 ECDSA Signature Algorithm Selection, no ECDSA certificate",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3"
|
||||
},
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 RSA Signature Algorithm Selection, no PSS",
|
||||
server => $server_tls_1_3,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "RSA+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 RSA-PSS Signature Algorithm Selection",
|
||||
server => $server_tls_1_3,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "RSA-PSS+SHA256",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "RSA",
|
||||
"ExpectedServerSignHash" => "SHA256",
|
||||
"ExpectedServerSignType" => "RSA-PSS",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 Ed25519 Signature Algorithm Selection",
|
||||
server => $server_tls_1_3,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ed25519",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "Ed25519",
|
||||
"ExpectedServerSignType" => "Ed25519",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 Ed448 Signature Algorithm Selection",
|
||||
server => $server_tls_1_3,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ed448",
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" => "Ed448",
|
||||
"ExpectedServerSignType" => "Ed448",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 Ed25519 CipherString and Groups Selection",
|
||||
server => $server_tls_1_3,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256:ed25519",
|
||||
# Excluding P-256 from the supported groups list should
|
||||
# mean server still uses a P-256 certificate because supported
|
||||
# groups is not used in signature selection for TLS 1.3
|
||||
"Groups" => "X25519"
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "P-256",
|
||||
"ExpectedServerSignType" =>, "EC",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 Ed448 CipherString and Groups Selection",
|
||||
server => $server_tls_1_3,
|
||||
client => {
|
||||
"SignatureAlgorithms" => "ECDSA+SHA256:ed448",
|
||||
# Excluding P-256 from the supported groups list should
|
||||
# mean server still uses a P-256 certificate because supported
|
||||
# groups is not used in signature selection for TLS 1.3
|
||||
"Groups" => "X448"
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerCertType" =>, "P-256",
|
||||
"ExpectedServerSignType" =>, "EC",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 RSA Client Auth Signature Algorithm Selection",
|
||||
server => {
|
||||
"ClientSignatureAlgorithms" => "PSS+SHA256",
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require"
|
||||
},
|
||||
client => $client_tls_1_3,
|
||||
test => {
|
||||
"ExpectedClientCertType" => "RSA",
|
||||
"ExpectedClientSignHash" => "SHA256",
|
||||
"ExpectedClientSignType" => "RSA-PSS",
|
||||
"ExpectedClientCANames" => "empty",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 RSA Client Auth Signature Algorithm Selection non-empty CA Names",
|
||||
server => {
|
||||
"ClientSignatureAlgorithms" => "PSS+SHA256",
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"RequestCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require"
|
||||
},
|
||||
client => $client_tls_1_3,
|
||||
test => {
|
||||
"ExpectedClientCertType" => "RSA",
|
||||
"ExpectedClientSignHash" => "SHA256",
|
||||
"ExpectedClientSignType" => "RSA-PSS",
|
||||
"ExpectedClientCANames" => test_pem("root-cert.pem"),
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 ECDSA Client Auth Signature Algorithm Selection",
|
||||
server => {
|
||||
"ClientSignatureAlgorithms" => "ECDSA+SHA256",
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require"
|
||||
},
|
||||
client => $client_tls_1_3,
|
||||
test => {
|
||||
"ExpectedClientCertType" => "P-256",
|
||||
"ExpectedClientSignHash" => "SHA256",
|
||||
"ExpectedClientSignType" => "EC",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 Ed25519 Client Auth",
|
||||
server => {
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require"
|
||||
},
|
||||
client => {
|
||||
"EdDSA.Certificate" => test_pem("client-ed25519-cert.pem"),
|
||||
"EdDSA.PrivateKey" => test_pem("client-ed25519-key.pem"),
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3"
|
||||
},
|
||||
test => {
|
||||
"ExpectedClientCertType" => "Ed25519",
|
||||
"ExpectedClientSignType" => "Ed25519",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 Ed448 Client Auth",
|
||||
server => {
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require"
|
||||
},
|
||||
client => {
|
||||
"EdDSA.Certificate" => test_pem("client-ed448-cert.pem"),
|
||||
"EdDSA.PrivateKey" => test_pem("client-ed448-key.pem"),
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3"
|
||||
},
|
||||
test => {
|
||||
"ExpectedClientCertType" => "Ed448",
|
||||
"ExpectedClientSignType" => "Ed448",
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 ECDSA with brainpool",
|
||||
server => {
|
||||
"Certificate" => test_pem("server-ecdsa-brainpoolP256r1-cert.pem"),
|
||||
"PrivateKey" => test_pem("server-ecdsa-brainpoolP256r1-key.pem"),
|
||||
"Groups" => "brainpoolP256r1",
|
||||
},
|
||||
client => {
|
||||
"RequestCAFile" => test_pem("root-cert.pem"),
|
||||
"Groups" => "brainpoolP256r1",
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3"
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
push @tests, @tests_tls_1_3 unless disabled("tls1_3");
|
||||
|
||||
my @tests_dsa_tls_1_2 = (
|
||||
{
|
||||
name => "TLS 1.2 DSA Certificate Test",
|
||||
server => {
|
||||
"DSA.Certificate" => test_pem("server-dsa-cert.pem"),
|
||||
"DSA.PrivateKey" => test_pem("server-dsa-key.pem"),
|
||||
"DHParameters" => test_pem("dhp2048.pem"),
|
||||
"MinProtocol" => "TLSv1.2",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ALL",
|
||||
},
|
||||
client => {
|
||||
"SignatureAlgorithms" => "DSA+SHA256:DSA+SHA1",
|
||||
"CipherString" => "ALL",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
my @tests_dsa_tls_1_3 = (
|
||||
{
|
||||
name => "TLS 1.3 Client Auth No TLS 1.3 Signature Algorithms",
|
||||
server => {
|
||||
"ClientSignatureAlgorithms" => "ECDSA+SHA1:DSA+SHA256:RSA+SHA256",
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Request"
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "TLS 1.3 DSA Certificate Test",
|
||||
server => {
|
||||
"DSA.Certificate" => test_pem("server-dsa-cert.pem"),
|
||||
"DSA.PrivateKey" => test_pem("server-dsa-key.pem"),
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"CipherString" => "ALL",
|
||||
},
|
||||
client => {
|
||||
"SignatureAlgorithms" => "DSA+SHA1:DSA+SHA256:ECDSA+SHA256",
|
||||
"CipherString" => "ALL",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
if (!disabled("dsa")) {
|
||||
push @tests, @tests_dsa_tls_1_2 unless disabled("dh");
|
||||
push @tests, @tests_dsa_tls_1_3 unless disabled("tls1_3");
|
||||
}
|
||||
112
test/ssl-tests/21-key-update.conf
Normal file
112
test/ssl-tests/21-key-update.conf
Normal file
@@ -0,0 +1,112 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 4
|
||||
|
||||
test-0 = 0-update-key-client-update-not-requested
|
||||
test-1 = 1-update-key-server-update-not-requested
|
||||
test-2 = 2-update-key-client-update-requested
|
||||
test-3 = 3-update-key-server-update-requested
|
||||
# ===========================================================
|
||||
|
||||
[0-update-key-client-update-not-requested]
|
||||
ssl_conf = 0-update-key-client-update-not-requested-ssl
|
||||
|
||||
[0-update-key-client-update-not-requested-ssl]
|
||||
server = 0-update-key-client-update-not-requested-server
|
||||
client = 0-update-key-client-update-not-requested-client
|
||||
|
||||
[0-update-key-client-update-not-requested-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-update-key-client-update-not-requested-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = KeyUpdateClient
|
||||
KeyUpdateType = KeyUpdateNotRequested
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-update-key-server-update-not-requested]
|
||||
ssl_conf = 1-update-key-server-update-not-requested-ssl
|
||||
|
||||
[1-update-key-server-update-not-requested-ssl]
|
||||
server = 1-update-key-server-update-not-requested-server
|
||||
client = 1-update-key-server-update-not-requested-client
|
||||
|
||||
[1-update-key-server-update-not-requested-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-update-key-server-update-not-requested-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = KeyUpdateServer
|
||||
KeyUpdateType = KeyUpdateNotRequested
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-update-key-client-update-requested]
|
||||
ssl_conf = 2-update-key-client-update-requested-ssl
|
||||
|
||||
[2-update-key-client-update-requested-ssl]
|
||||
server = 2-update-key-client-update-requested-server
|
||||
client = 2-update-key-client-update-requested-client
|
||||
|
||||
[2-update-key-client-update-requested-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-update-key-client-update-requested-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = KeyUpdateClient
|
||||
KeyUpdateType = KeyUpdateRequested
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-update-key-server-update-requested]
|
||||
ssl_conf = 3-update-key-server-update-requested-ssl
|
||||
|
||||
[3-update-key-server-update-requested-ssl]
|
||||
server = 3-update-key-server-update-requested-server
|
||||
client = 3-update-key-server-update-requested-client
|
||||
|
||||
[3-update-key-server-update-requested-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-update-key-server-update-requested-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = KeyUpdateServer
|
||||
KeyUpdateType = KeyUpdateRequested
|
||||
ResumptionExpected = No
|
||||
|
||||
|
||||
62
test/ssl-tests/21-key-update.conf.in
Normal file
62
test/ssl-tests/21-key-update.conf.in
Normal file
@@ -0,0 +1,62 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test KeyUpdate
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "update-key-client-update-not-requested",
|
||||
server => {},
|
||||
client => {},
|
||||
test => {
|
||||
"HandshakeMode" => "KeyUpdateClient",
|
||||
"KeyUpdateType" => "KeyUpdateNotRequested",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "update-key-server-update-not-requested",
|
||||
server => {},
|
||||
client => {},
|
||||
test => {
|
||||
"HandshakeMode" => "KeyUpdateServer",
|
||||
"KeyUpdateType" => "KeyUpdateNotRequested",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "update-key-client-update-requested",
|
||||
server => {},
|
||||
client => {},
|
||||
test => {
|
||||
"HandshakeMode" => "KeyUpdateClient",
|
||||
"KeyUpdateType" => "KeyUpdateRequested",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "update-key-server-update-requested",
|
||||
server => {},
|
||||
client => {},
|
||||
test => {
|
||||
"HandshakeMode" => "KeyUpdateServer",
|
||||
"KeyUpdateType" => "KeyUpdateRequested",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
}
|
||||
);
|
||||
216
test/ssl-tests/22-compression.conf
Normal file
216
test/ssl-tests/22-compression.conf
Normal file
@@ -0,0 +1,216 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 8
|
||||
|
||||
test-0 = 0-tlsv1_3-both-compress
|
||||
test-1 = 1-tlsv1_3-client-compress
|
||||
test-2 = 2-tlsv1_3-server-compress
|
||||
test-3 = 3-tlsv1_3-neither-compress
|
||||
test-4 = 4-tlsv1_2-both-compress
|
||||
test-5 = 5-tlsv1_2-client-compress
|
||||
test-6 = 6-tlsv1_2-server-compress
|
||||
test-7 = 7-tlsv1_2-neither-compress
|
||||
# ===========================================================
|
||||
|
||||
[0-tlsv1_3-both-compress]
|
||||
ssl_conf = 0-tlsv1_3-both-compress-ssl
|
||||
|
||||
[0-tlsv1_3-both-compress-ssl]
|
||||
server = 0-tlsv1_3-both-compress-server
|
||||
client = 0-tlsv1_3-both-compress-client
|
||||
|
||||
[0-tlsv1_3-both-compress-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = Compression
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-tlsv1_3-both-compress-client]
|
||||
CipherString = DEFAULT
|
||||
Options = Compression
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
CompressionExpected = No
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-tlsv1_3-client-compress]
|
||||
ssl_conf = 1-tlsv1_3-client-compress-ssl
|
||||
|
||||
[1-tlsv1_3-client-compress-ssl]
|
||||
server = 1-tlsv1_3-client-compress-server
|
||||
client = 1-tlsv1_3-client-compress-client
|
||||
|
||||
[1-tlsv1_3-client-compress-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-tlsv1_3-client-compress-client]
|
||||
CipherString = DEFAULT
|
||||
Options = Compression
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
CompressionExpected = No
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-tlsv1_3-server-compress]
|
||||
ssl_conf = 2-tlsv1_3-server-compress-ssl
|
||||
|
||||
[2-tlsv1_3-server-compress-ssl]
|
||||
server = 2-tlsv1_3-server-compress-server
|
||||
client = 2-tlsv1_3-server-compress-client
|
||||
|
||||
[2-tlsv1_3-server-compress-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = Compression
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-tlsv1_3-server-compress-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
CompressionExpected = No
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-tlsv1_3-neither-compress]
|
||||
ssl_conf = 3-tlsv1_3-neither-compress-ssl
|
||||
|
||||
[3-tlsv1_3-neither-compress-ssl]
|
||||
server = 3-tlsv1_3-neither-compress-server
|
||||
client = 3-tlsv1_3-neither-compress-client
|
||||
|
||||
[3-tlsv1_3-neither-compress-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-tlsv1_3-neither-compress-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
CompressionExpected = No
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-tlsv1_2-both-compress]
|
||||
ssl_conf = 4-tlsv1_2-both-compress-ssl
|
||||
|
||||
[4-tlsv1_2-both-compress-ssl]
|
||||
server = 4-tlsv1_2-both-compress-server
|
||||
client = 4-tlsv1_2-both-compress-client
|
||||
|
||||
[4-tlsv1_2-both-compress-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = Compression
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-tlsv1_2-both-compress-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = Compression
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
CompressionExpected = Yes
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-tlsv1_2-client-compress]
|
||||
ssl_conf = 5-tlsv1_2-client-compress-ssl
|
||||
|
||||
[5-tlsv1_2-client-compress-ssl]
|
||||
server = 5-tlsv1_2-client-compress-server
|
||||
client = 5-tlsv1_2-client-compress-client
|
||||
|
||||
[5-tlsv1_2-client-compress-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-tlsv1_2-client-compress-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = Compression
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
CompressionExpected = No
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-tlsv1_2-server-compress]
|
||||
ssl_conf = 6-tlsv1_2-server-compress-ssl
|
||||
|
||||
[6-tlsv1_2-server-compress-ssl]
|
||||
server = 6-tlsv1_2-server-compress-server
|
||||
client = 6-tlsv1_2-server-compress-client
|
||||
|
||||
[6-tlsv1_2-server-compress-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = Compression
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-tlsv1_2-server-compress-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
CompressionExpected = No
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-tlsv1_2-neither-compress]
|
||||
ssl_conf = 7-tlsv1_2-neither-compress-ssl
|
||||
|
||||
[7-tlsv1_2-neither-compress-ssl]
|
||||
server = 7-tlsv1_2-neither-compress-server
|
||||
client = 7-tlsv1_2-neither-compress-client
|
||||
|
||||
[7-tlsv1_2-neither-compress-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-tlsv1_2-neither-compress-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
CompressionExpected = No
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
127
test/ssl-tests/22-compression.conf.in
Normal file
127
test/ssl-tests/22-compression.conf.in
Normal file
@@ -0,0 +1,127 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test Compression
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
our @tests = ();
|
||||
|
||||
our @tests_tls1_3 = (
|
||||
{
|
||||
name => "tlsv1_3-both-compress",
|
||||
server => {
|
||||
"Options" => "Compression"
|
||||
},
|
||||
client => {
|
||||
"Options" => "Compression"
|
||||
},
|
||||
test => {
|
||||
"CompressionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "tlsv1_3-client-compress",
|
||||
server => {
|
||||
},
|
||||
client => {
|
||||
"Options" => "Compression"
|
||||
},
|
||||
test => {
|
||||
"CompressionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "tlsv1_3-server-compress",
|
||||
server => {
|
||||
"Options" => "Compression"
|
||||
},
|
||||
client => {
|
||||
},
|
||||
test => {
|
||||
"CompressionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "tlsv1_3-neither-compress",
|
||||
server => {
|
||||
},
|
||||
client => {
|
||||
},
|
||||
test => {
|
||||
"CompressionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
);
|
||||
our @tests_tls1_2 = (
|
||||
{
|
||||
name => "tlsv1_2-both-compress",
|
||||
server => {
|
||||
"Options" => "Compression"
|
||||
},
|
||||
client => {
|
||||
"Options" => "Compression",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"CompressionExpected" => "Yes",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "tlsv1_2-client-compress",
|
||||
server => {
|
||||
},
|
||||
client => {
|
||||
"Options" => "Compression",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"CompressionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "tlsv1_2-server-compress",
|
||||
server => {
|
||||
"Options" => "Compression"
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"CompressionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "tlsv1_2-neither-compress",
|
||||
server => {
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
test => {
|
||||
"CompressionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
push @tests, @tests_tls1_3 unless disabled("tls1_3");
|
||||
push @tests, @tests_tls1_2 unless alldisabled(("tls1_2", "tls1_1", "tls1",
|
||||
"ssl3"));
|
||||
148
test/ssl-tests/23-srp.conf
Normal file
148
test/ssl-tests/23-srp.conf
Normal file
@@ -0,0 +1,148 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 4
|
||||
|
||||
test-0 = 0-srp
|
||||
test-1 = 1-srp-bad-password
|
||||
test-2 = 2-srp-auth
|
||||
test-3 = 3-srp-auth-bad-password
|
||||
# ===========================================================
|
||||
|
||||
[0-srp]
|
||||
ssl_conf = 0-srp-ssl
|
||||
|
||||
[0-srp-ssl]
|
||||
server = 0-srp-server
|
||||
client = 0-srp-client
|
||||
|
||||
[0-srp-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = SRP
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-srp-client]
|
||||
CipherString = SRP
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
server = 0-srp-server-extra
|
||||
client = 0-srp-client-extra
|
||||
|
||||
[0-srp-server-extra]
|
||||
SRPPassword = password
|
||||
SRPUser = user
|
||||
|
||||
[0-srp-client-extra]
|
||||
SRPPassword = password
|
||||
SRPUser = user
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-srp-bad-password]
|
||||
ssl_conf = 1-srp-bad-password-ssl
|
||||
|
||||
[1-srp-bad-password-ssl]
|
||||
server = 1-srp-bad-password-server
|
||||
client = 1-srp-bad-password-client
|
||||
|
||||
[1-srp-bad-password-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = SRP
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-srp-bad-password-client]
|
||||
CipherString = SRP
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = ServerFail
|
||||
server = 1-srp-bad-password-server-extra
|
||||
client = 1-srp-bad-password-client-extra
|
||||
|
||||
[1-srp-bad-password-server-extra]
|
||||
SRPPassword = password
|
||||
SRPUser = user
|
||||
|
||||
[1-srp-bad-password-client-extra]
|
||||
SRPPassword = passw0rd
|
||||
SRPUser = user
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-srp-auth]
|
||||
ssl_conf = 2-srp-auth-ssl
|
||||
|
||||
[2-srp-auth-ssl]
|
||||
server = 2-srp-auth-server
|
||||
client = 2-srp-auth-client
|
||||
|
||||
[2-srp-auth-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = aSRP
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-srp-auth-client]
|
||||
CipherString = aSRP
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
server = 2-srp-auth-server-extra
|
||||
client = 2-srp-auth-client-extra
|
||||
|
||||
[2-srp-auth-server-extra]
|
||||
SRPPassword = password
|
||||
SRPUser = user
|
||||
|
||||
[2-srp-auth-client-extra]
|
||||
SRPPassword = password
|
||||
SRPUser = user
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-srp-auth-bad-password]
|
||||
ssl_conf = 3-srp-auth-bad-password-ssl
|
||||
|
||||
[3-srp-auth-bad-password-ssl]
|
||||
server = 3-srp-auth-bad-password-server
|
||||
client = 3-srp-auth-bad-password-client
|
||||
|
||||
[3-srp-auth-bad-password-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = aSRP
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-srp-auth-bad-password-client]
|
||||
CipherString = aSRP
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = ServerFail
|
||||
server = 3-srp-auth-bad-password-server-extra
|
||||
client = 3-srp-auth-bad-password-client-extra
|
||||
|
||||
[3-srp-auth-bad-password-server-extra]
|
||||
SRPPassword = password
|
||||
SRPUser = user
|
||||
|
||||
[3-srp-auth-bad-password-client-extra]
|
||||
SRPPassword = passw0rd
|
||||
SRPUser = user
|
||||
|
||||
|
||||
107
test/ssl-tests/23-srp.conf.in
Normal file
107
test/ssl-tests/23-srp.conf.in
Normal file
@@ -0,0 +1,107 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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;
|
||||
|
||||
package ssltests;
|
||||
|
||||
# SRP is only supported up to TLSv1.2
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "srp",
|
||||
server => {
|
||||
"CipherString" => "SRP",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"SRPUser" => "user",
|
||||
"SRPPassword" => "password",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "SRP",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"SRPUser" => "user",
|
||||
"SRPPassword" => "password",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "srp-bad-password",
|
||||
server => {
|
||||
"CipherString" => "SRP",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"SRPUser" => "user",
|
||||
"SRPPassword" => "password",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "SRP",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"SRPUser" => "user",
|
||||
"SRPPassword" => "passw0rd",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
# Server fails first with bad client Finished.
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "srp-auth",
|
||||
server => {
|
||||
"CipherString" => "aSRP",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"SRPUser" => "user",
|
||||
"SRPPassword" => "password",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "aSRP",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"SRPUser" => "user",
|
||||
"SRPPassword" => "password",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "srp-auth-bad-password",
|
||||
server => {
|
||||
"CipherString" => "aSRP",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"SRPUser" => "user",
|
||||
"SRPPassword" => "password",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "aSRP",
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
extra => {
|
||||
"SRPUser" => "user",
|
||||
"SRPPassword" => "passw0rd",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
# Server fails first with bad client Finished.
|
||||
"ExpectedResult" => "ServerFail"
|
||||
},
|
||||
},
|
||||
);
|
||||
34
test/ssl-tests/24-padding.conf
Normal file
34
test/ssl-tests/24-padding.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 1
|
||||
|
||||
test-0 = 0-default
|
||||
# ===========================================================
|
||||
|
||||
[0-default]
|
||||
ssl_conf = 0-default-ssl
|
||||
|
||||
[0-default-ssl]
|
||||
server = 0-default-server
|
||||
client = 0-default-client
|
||||
|
||||
[0-default-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
RecordPadding = 64
|
||||
|
||||
[0-default-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
RecordPadding = 11
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
25
test/ssl-tests/24-padding.conf.in
Normal file
25
test/ssl-tests/24-padding.conf.in
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
package ssltests;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "default",
|
||||
server => { "RecordPadding" => 64,
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"MinProtocol" => "TLSv1.3" },
|
||||
client => { "RecordPadding" => 11,
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"MinProtocol" => "TLSv1.3" },
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
},
|
||||
);
|
||||
244
test/ssl-tests/25-cipher.conf
Normal file
244
test/ssl-tests/25-cipher.conf
Normal file
@@ -0,0 +1,244 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 9
|
||||
|
||||
test-0 = 0-cipher-server-1
|
||||
test-1 = 1-cipher-server-2
|
||||
test-2 = 2-cipher-server-client-list
|
||||
test-3 = 3-cipher-server-pref-1
|
||||
test-4 = 4-cipher-server-pref-2
|
||||
test-5 = 5-cipher-server-pref-client-list
|
||||
test-6 = 6-cipher-server-pref-not-mobile
|
||||
test-7 = 7-cipher-server-pref-mobile
|
||||
test-8 = 8-cipher-server-pref-mobile2
|
||||
# ===========================================================
|
||||
|
||||
[0-cipher-server-1]
|
||||
ssl_conf = 0-cipher-server-1-ssl
|
||||
|
||||
[0-cipher-server-1-ssl]
|
||||
server = 0-cipher-server-1-server
|
||||
client = 0-cipher-server-1-client
|
||||
|
||||
[0-cipher-server-1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-cipher-server-1-client]
|
||||
CipherString = ECDHE-RSA-AES256-SHA384
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedCipher = ECDHE-RSA-AES256-SHA384
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-cipher-server-2]
|
||||
ssl_conf = 1-cipher-server-2-ssl
|
||||
|
||||
[1-cipher-server-2-ssl]
|
||||
server = 1-cipher-server-2-server
|
||||
client = 1-cipher-server-2-client
|
||||
|
||||
[1-cipher-server-2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-cipher-server-2-client]
|
||||
CipherString = ECDHE-RSA-AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedCipher = ECDHE-RSA-AES128-SHA256
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-cipher-server-client-list]
|
||||
ssl_conf = 2-cipher-server-client-list-ssl
|
||||
|
||||
[2-cipher-server-client-list-ssl]
|
||||
server = 2-cipher-server-client-list-server
|
||||
client = 2-cipher-server-client-list-client
|
||||
|
||||
[2-cipher-server-client-list-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-cipher-server-client-list-client]
|
||||
CipherString = ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedCipher = ECDHE-RSA-AES128-SHA256
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-cipher-server-pref-1]
|
||||
ssl_conf = 3-cipher-server-pref-1-ssl
|
||||
|
||||
[3-cipher-server-pref-1-ssl]
|
||||
server = 3-cipher-server-pref-1-server
|
||||
client = 3-cipher-server-pref-1-client
|
||||
|
||||
[3-cipher-server-pref-1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = ServerPreference
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-cipher-server-pref-1-client]
|
||||
CipherString = ECDHE-RSA-AES256-SHA384
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedCipher = ECDHE-RSA-AES256-SHA384
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-cipher-server-pref-2]
|
||||
ssl_conf = 4-cipher-server-pref-2-ssl
|
||||
|
||||
[4-cipher-server-pref-2-ssl]
|
||||
server = 4-cipher-server-pref-2-server
|
||||
client = 4-cipher-server-pref-2-client
|
||||
|
||||
[4-cipher-server-pref-2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = ServerPreference
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-cipher-server-pref-2-client]
|
||||
CipherString = ECDHE-RSA-AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedCipher = ECDHE-RSA-AES128-SHA256
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-cipher-server-pref-client-list]
|
||||
ssl_conf = 5-cipher-server-pref-client-list-ssl
|
||||
|
||||
[5-cipher-server-pref-client-list-ssl]
|
||||
server = 5-cipher-server-pref-client-list-server
|
||||
client = 5-cipher-server-pref-client-list-client
|
||||
|
||||
[5-cipher-server-pref-client-list-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = ServerPreference
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-cipher-server-pref-client-list-client]
|
||||
CipherString = ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedCipher = ECDHE-RSA-AES256-SHA384
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-cipher-server-pref-not-mobile]
|
||||
ssl_conf = 6-cipher-server-pref-not-mobile-ssl
|
||||
|
||||
[6-cipher-server-pref-not-mobile-ssl]
|
||||
server = 6-cipher-server-pref-not-mobile-server
|
||||
client = 6-cipher-server-pref-not-mobile-client
|
||||
|
||||
[6-cipher-server-pref-not-mobile-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = ServerPreference
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-cipher-server-pref-not-mobile-client]
|
||||
CipherString = ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedCipher = ECDHE-RSA-AES256-SHA384
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-cipher-server-pref-mobile]
|
||||
ssl_conf = 7-cipher-server-pref-mobile-ssl
|
||||
|
||||
[7-cipher-server-pref-mobile-ssl]
|
||||
server = 7-cipher-server-pref-mobile-server
|
||||
client = 7-cipher-server-pref-mobile-client
|
||||
|
||||
[7-cipher-server-pref-mobile-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = ServerPreference,PrioritizeChaCha
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-cipher-server-pref-mobile-client]
|
||||
CipherString = ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-CHACHA20-POLY1305
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedCipher = ECDHE-RSA-AES256-SHA384
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-cipher-server-pref-mobile2]
|
||||
ssl_conf = 8-cipher-server-pref-mobile2-ssl
|
||||
|
||||
[8-cipher-server-pref-mobile2-ssl]
|
||||
server = 8-cipher-server-pref-mobile2-server
|
||||
client = 8-cipher-server-pref-mobile2-client
|
||||
|
||||
[8-cipher-server-pref-mobile2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = ServerPreference,PrioritizeChaCha
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-cipher-server-pref-mobile2-client]
|
||||
CipherString = ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384
|
||||
MaxProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedCipher = ECDHE-RSA-CHACHA20-POLY1305
|
||||
|
||||
|
||||
156
test/ssl-tests/25-cipher.conf.in
Normal file
156
test/ssl-tests/25-cipher.conf.in
Normal file
@@ -0,0 +1,156 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test version negotiation
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "cipher-server-1",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384"
|
||||
},
|
||||
test => {
|
||||
"ExpectedCipher" => "ECDHE-RSA-AES256-SHA384",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "cipher-server-2",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES128-SHA256"
|
||||
},
|
||||
test => {
|
||||
"ExpectedCipher" => "ECDHE-RSA-AES128-SHA256",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "cipher-server-client-list",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384",
|
||||
},
|
||||
test => {
|
||||
"ExpectedCipher" => "ECDHE-RSA-AES128-SHA256",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "cipher-server-pref-1",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
|
||||
"Options" => "ServerPreference",
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384"
|
||||
},
|
||||
test => {
|
||||
"ExpectedCipher" => "ECDHE-RSA-AES256-SHA384",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "cipher-server-pref-2",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
|
||||
"Options" => "ServerPreference",
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES128-SHA256"
|
||||
},
|
||||
test => {
|
||||
"ExpectedCipher" => "ECDHE-RSA-AES128-SHA256",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "cipher-server-pref-client-list",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256",
|
||||
"Options" => "ServerPreference",
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384",
|
||||
},
|
||||
test => {
|
||||
"ExpectedCipher" => "ECDHE-RSA-AES256-SHA384",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "cipher-server-pref-not-mobile",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305",
|
||||
"Options" => "ServerPreference",
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384",
|
||||
},
|
||||
test => {
|
||||
"ExpectedCipher" => "ECDHE-RSA-AES256-SHA384",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "cipher-server-pref-mobile",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305",
|
||||
"Options" => "ServerPreference,PrioritizeChaCha",
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-CHACHA20-POLY1305",
|
||||
},
|
||||
test => {
|
||||
"ExpectedCipher" => "ECDHE-RSA-AES256-SHA384",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
my @tests_poly1305 = (
|
||||
{
|
||||
name => "cipher-server-pref-mobile2",
|
||||
server => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305",
|
||||
"Options" => "ServerPreference,PrioritizeChaCha",
|
||||
},
|
||||
client => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"CipherString" => "ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA384",
|
||||
},
|
||||
test => {
|
||||
"ExpectedCipher" => "ECDHE-RSA-CHACHA20-POLY1305",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
push @tests, @tests_poly1305 unless disabled("poly1305") || disabled("chacha");
|
||||
488
test/ssl-tests/26-tls13_client_auth.conf
Normal file
488
test/ssl-tests/26-tls13_client_auth.conf
Normal file
@@ -0,0 +1,488 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 14
|
||||
|
||||
test-0 = 0-server-auth-TLSv1.3
|
||||
test-1 = 1-client-auth-TLSv1.3-request
|
||||
test-2 = 2-client-auth-TLSv1.3-require-fail
|
||||
test-3 = 3-client-auth-TLSv1.3-require
|
||||
test-4 = 4-client-auth-TLSv1.3-require-non-empty-names
|
||||
test-5 = 5-client-auth-TLSv1.3-noroot
|
||||
test-6 = 6-client-auth-TLSv1.3-request-post-handshake
|
||||
test-7 = 7-client-auth-TLSv1.3-require-fail-post-handshake
|
||||
test-8 = 8-client-auth-TLSv1.3-require-post-handshake
|
||||
test-9 = 9-client-auth-TLSv1.3-require-non-empty-names-post-handshake
|
||||
test-10 = 10-client-auth-TLSv1.3-noroot-post-handshake
|
||||
test-11 = 11-client-auth-TLSv1.3-request-force-client-post-handshake
|
||||
test-12 = 12-client-auth-TLSv1.3-request-force-server-post-handshake
|
||||
test-13 = 13-client-auth-TLSv1.3-request-force-both-post-handshake
|
||||
# ===========================================================
|
||||
|
||||
[0-server-auth-TLSv1.3]
|
||||
ssl_conf = 0-server-auth-TLSv1.3-ssl
|
||||
|
||||
[0-server-auth-TLSv1.3-ssl]
|
||||
server = 0-server-auth-TLSv1.3-server
|
||||
client = 0-server-auth-TLSv1.3-client
|
||||
|
||||
[0-server-auth-TLSv1.3-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-server-auth-TLSv1.3-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-client-auth-TLSv1.3-request]
|
||||
ssl_conf = 1-client-auth-TLSv1.3-request-ssl
|
||||
|
||||
[1-client-auth-TLSv1.3-request-ssl]
|
||||
server = 1-client-auth-TLSv1.3-request-server
|
||||
client = 1-client-auth-TLSv1.3-request-client
|
||||
|
||||
[1-client-auth-TLSv1.3-request-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[1-client-auth-TLSv1.3-request-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-client-auth-TLSv1.3-require-fail]
|
||||
ssl_conf = 2-client-auth-TLSv1.3-require-fail-ssl
|
||||
|
||||
[2-client-auth-TLSv1.3-require-fail-ssl]
|
||||
server = 2-client-auth-TLSv1.3-require-fail-server
|
||||
client = 2-client-auth-TLSv1.3-require-fail-client
|
||||
|
||||
[2-client-auth-TLSv1.3-require-fail-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[2-client-auth-TLSv1.3-require-fail-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = CertificateRequired
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-client-auth-TLSv1.3-require]
|
||||
ssl_conf = 3-client-auth-TLSv1.3-require-ssl
|
||||
|
||||
[3-client-auth-TLSv1.3-require-ssl]
|
||||
server = 3-client-auth-TLSv1.3-require-server
|
||||
client = 3-client-auth-TLSv1.3-require-client
|
||||
|
||||
[3-client-auth-TLSv1.3-require-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ClientSignatureAlgorithms = PSS+SHA256
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[3-client-auth-TLSv1.3-require-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedClientCANames = empty
|
||||
ExpectedClientCertType = RSA
|
||||
ExpectedClientSignHash = SHA256
|
||||
ExpectedClientSignType = RSA-PSS
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-client-auth-TLSv1.3-require-non-empty-names]
|
||||
ssl_conf = 4-client-auth-TLSv1.3-require-non-empty-names-ssl
|
||||
|
||||
[4-client-auth-TLSv1.3-require-non-empty-names-ssl]
|
||||
server = 4-client-auth-TLSv1.3-require-non-empty-names-server
|
||||
client = 4-client-auth-TLSv1.3-require-non-empty-names-client
|
||||
|
||||
[4-client-auth-TLSv1.3-require-non-empty-names-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ClientCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
ClientSignatureAlgorithms = PSS+SHA256
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[4-client-auth-TLSv1.3-require-non-empty-names-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedClientCANames = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
ExpectedClientCertType = RSA
|
||||
ExpectedClientSignHash = SHA256
|
||||
ExpectedClientSignType = RSA-PSS
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-client-auth-TLSv1.3-noroot]
|
||||
ssl_conf = 5-client-auth-TLSv1.3-noroot-ssl
|
||||
|
||||
[5-client-auth-TLSv1.3-noroot-ssl]
|
||||
server = 5-client-auth-TLSv1.3-noroot-server
|
||||
client = 5-client-auth-TLSv1.3-noroot-client
|
||||
|
||||
[5-client-auth-TLSv1.3-noroot-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[5-client-auth-TLSv1.3-noroot-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = UnknownCA
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-client-auth-TLSv1.3-request-post-handshake]
|
||||
ssl_conf = 6-client-auth-TLSv1.3-request-post-handshake-ssl
|
||||
|
||||
[6-client-auth-TLSv1.3-request-post-handshake-ssl]
|
||||
server = 6-client-auth-TLSv1.3-request-post-handshake-server
|
||||
client = 6-client-auth-TLSv1.3-request-post-handshake-client
|
||||
|
||||
[6-client-auth-TLSv1.3-request-post-handshake-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = RequestPostHandshake
|
||||
|
||||
[6-client-auth-TLSv1.3-request-post-handshake-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedResult = ServerFail
|
||||
HandshakeMode = PostHandshakeAuth
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-client-auth-TLSv1.3-require-fail-post-handshake]
|
||||
ssl_conf = 7-client-auth-TLSv1.3-require-fail-post-handshake-ssl
|
||||
|
||||
[7-client-auth-TLSv1.3-require-fail-post-handshake-ssl]
|
||||
server = 7-client-auth-TLSv1.3-require-fail-post-handshake-server
|
||||
client = 7-client-auth-TLSv1.3-require-fail-post-handshake-client
|
||||
|
||||
[7-client-auth-TLSv1.3-require-fail-post-handshake-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = RequirePostHandshake
|
||||
|
||||
[7-client-auth-TLSv1.3-require-fail-post-handshake-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedResult = ServerFail
|
||||
HandshakeMode = PostHandshakeAuth
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-client-auth-TLSv1.3-require-post-handshake]
|
||||
ssl_conf = 8-client-auth-TLSv1.3-require-post-handshake-ssl
|
||||
|
||||
[8-client-auth-TLSv1.3-require-post-handshake-ssl]
|
||||
server = 8-client-auth-TLSv1.3-require-post-handshake-server
|
||||
client = 8-client-auth-TLSv1.3-require-post-handshake-client
|
||||
|
||||
[8-client-auth-TLSv1.3-require-post-handshake-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ClientSignatureAlgorithms = PSS+SHA256
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = RequestPostHandshake
|
||||
|
||||
[8-client-auth-TLSv1.3-require-post-handshake-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedClientCANames = empty
|
||||
ExpectedClientCertType = RSA
|
||||
ExpectedClientSignHash = SHA256
|
||||
ExpectedClientSignType = RSA-PSS
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = PostHandshakeAuth
|
||||
client = 8-client-auth-TLSv1.3-require-post-handshake-client-extra
|
||||
|
||||
[8-client-auth-TLSv1.3-require-post-handshake-client-extra]
|
||||
EnablePHA = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[9-client-auth-TLSv1.3-require-non-empty-names-post-handshake]
|
||||
ssl_conf = 9-client-auth-TLSv1.3-require-non-empty-names-post-handshake-ssl
|
||||
|
||||
[9-client-auth-TLSv1.3-require-non-empty-names-post-handshake-ssl]
|
||||
server = 9-client-auth-TLSv1.3-require-non-empty-names-post-handshake-server
|
||||
client = 9-client-auth-TLSv1.3-require-non-empty-names-post-handshake-client
|
||||
|
||||
[9-client-auth-TLSv1.3-require-non-empty-names-post-handshake-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
ClientCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
ClientSignatureAlgorithms = PSS+SHA256
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = RequestPostHandshake
|
||||
|
||||
[9-client-auth-TLSv1.3-require-non-empty-names-post-handshake-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-9]
|
||||
ExpectedClientCANames = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
ExpectedClientCertType = RSA
|
||||
ExpectedClientSignHash = SHA256
|
||||
ExpectedClientSignType = RSA-PSS
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = PostHandshakeAuth
|
||||
client = 9-client-auth-TLSv1.3-require-non-empty-names-post-handshake-client-extra
|
||||
|
||||
[9-client-auth-TLSv1.3-require-non-empty-names-post-handshake-client-extra]
|
||||
EnablePHA = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[10-client-auth-TLSv1.3-noroot-post-handshake]
|
||||
ssl_conf = 10-client-auth-TLSv1.3-noroot-post-handshake-ssl
|
||||
|
||||
[10-client-auth-TLSv1.3-noroot-post-handshake-ssl]
|
||||
server = 10-client-auth-TLSv1.3-noroot-post-handshake-server
|
||||
client = 10-client-auth-TLSv1.3-noroot-post-handshake-client
|
||||
|
||||
[10-client-auth-TLSv1.3-noroot-post-handshake-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = RequirePostHandshake
|
||||
|
||||
[10-client-auth-TLSv1.3-noroot-post-handshake-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-10]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = UnknownCA
|
||||
HandshakeMode = PostHandshakeAuth
|
||||
client = 10-client-auth-TLSv1.3-noroot-post-handshake-client-extra
|
||||
|
||||
[10-client-auth-TLSv1.3-noroot-post-handshake-client-extra]
|
||||
EnablePHA = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[11-client-auth-TLSv1.3-request-force-client-post-handshake]
|
||||
ssl_conf = 11-client-auth-TLSv1.3-request-force-client-post-handshake-ssl
|
||||
|
||||
[11-client-auth-TLSv1.3-request-force-client-post-handshake-ssl]
|
||||
server = 11-client-auth-TLSv1.3-request-force-client-post-handshake-server
|
||||
client = 11-client-auth-TLSv1.3-request-force-client-post-handshake-client
|
||||
|
||||
[11-client-auth-TLSv1.3-request-force-client-post-handshake-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = RequestPostHandshake
|
||||
|
||||
[11-client-auth-TLSv1.3-request-force-client-post-handshake-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-11]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = PostHandshakeAuth
|
||||
client = 11-client-auth-TLSv1.3-request-force-client-post-handshake-client-extra
|
||||
|
||||
[11-client-auth-TLSv1.3-request-force-client-post-handshake-client-extra]
|
||||
EnablePHA = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[12-client-auth-TLSv1.3-request-force-server-post-handshake]
|
||||
ssl_conf = 12-client-auth-TLSv1.3-request-force-server-post-handshake-ssl
|
||||
|
||||
[12-client-auth-TLSv1.3-request-force-server-post-handshake-ssl]
|
||||
server = 12-client-auth-TLSv1.3-request-force-server-post-handshake-server
|
||||
client = 12-client-auth-TLSv1.3-request-force-server-post-handshake-client
|
||||
|
||||
[12-client-auth-TLSv1.3-request-force-server-post-handshake-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = RequestPostHandshake
|
||||
|
||||
[12-client-auth-TLSv1.3-request-force-server-post-handshake-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-12]
|
||||
ExpectedResult = ClientFail
|
||||
HandshakeMode = PostHandshakeAuth
|
||||
server = 12-client-auth-TLSv1.3-request-force-server-post-handshake-server-extra
|
||||
|
||||
[12-client-auth-TLSv1.3-request-force-server-post-handshake-server-extra]
|
||||
ForcePHA = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[13-client-auth-TLSv1.3-request-force-both-post-handshake]
|
||||
ssl_conf = 13-client-auth-TLSv1.3-request-force-both-post-handshake-ssl
|
||||
|
||||
[13-client-auth-TLSv1.3-request-force-both-post-handshake-ssl]
|
||||
server = 13-client-auth-TLSv1.3-request-force-both-post-handshake-server
|
||||
client = 13-client-auth-TLSv1.3-request-force-both-post-handshake-client
|
||||
|
||||
[13-client-auth-TLSv1.3-request-force-both-post-handshake-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = RequestPostHandshake
|
||||
|
||||
[13-client-auth-TLSv1.3-request-force-both-post-handshake-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
MinProtocol = TLSv1.3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-13]
|
||||
ExpectedResult = Success
|
||||
HandshakeMode = PostHandshakeAuth
|
||||
server = 13-client-auth-TLSv1.3-request-force-both-post-handshake-server-extra
|
||||
client = 13-client-auth-TLSv1.3-request-force-both-post-handshake-client-extra
|
||||
|
||||
[13-client-auth-TLSv1.3-request-force-both-post-handshake-server-extra]
|
||||
ForcePHA = Yes
|
||||
|
||||
[13-client-auth-TLSv1.3-request-force-both-post-handshake-client-extra]
|
||||
EnablePHA = Yes
|
||||
|
||||
|
||||
302
test/ssl-tests/26-tls13_client_auth.conf.in
Normal file
302
test/ssl-tests/26-tls13_client_auth.conf.in
Normal file
@@ -0,0 +1,302 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test TLSv1.3 certificate authentication
|
||||
## Similar to 04-client_auth.conf.in output, but specific for
|
||||
## TLSv1.3 and post-handshake authentication
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "server-auth-TLSv1.3",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-request",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"VerifyMode" => "Request",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-require-fail",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"ExpectedServerAlert" => "CertificateRequired",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-require",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"ClientSignatureAlgorithms" => "PSS+SHA256",
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Request",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
"ExpectedClientCertType" => "RSA",
|
||||
"ExpectedClientSignType" => "RSA-PSS",
|
||||
"ExpectedClientSignHash" => "SHA256",
|
||||
"ExpectedClientCANames" => "empty"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-require-non-empty-names",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"ClientSignatureAlgorithms" => "PSS+SHA256",
|
||||
"ClientCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Request",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
"ExpectedClientCertType" => "RSA",
|
||||
"ExpectedClientSignType" => "RSA-PSS",
|
||||
"ExpectedClientSignHash" => "SHA256",
|
||||
"ExpectedClientCANames" => test_pem("root-cert.pem"),
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-noroot",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"VerifyMode" => "Require",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"ExpectedServerAlert" => "UnknownCA",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-request-post-handshake",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"VerifyMode" => "RequestPostHandshake",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"HandshakeMode" => "PostHandshakeAuth",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-require-fail-post-handshake",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "RequirePostHandshake",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"HandshakeMode" => "PostHandshakeAuth",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-require-post-handshake",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"ClientSignatureAlgorithms" => "PSS+SHA256",
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "RequestPostHandshake",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
extra => {
|
||||
"EnablePHA" => "Yes",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
"HandshakeMode" => "PostHandshakeAuth",
|
||||
"ExpectedClientCertType" => "RSA",
|
||||
"ExpectedClientSignType" => "RSA-PSS",
|
||||
"ExpectedClientSignHash" => "SHA256",
|
||||
"ExpectedClientCANames" => "empty"
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-require-non-empty-names-post-handshake",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"ClientSignatureAlgorithms" => "PSS+SHA256",
|
||||
"ClientCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "RequestPostHandshake",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
extra => {
|
||||
"EnablePHA" => "Yes",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
"HandshakeMode" => "PostHandshakeAuth",
|
||||
"ExpectedClientCertType" => "RSA",
|
||||
"ExpectedClientSignType" => "RSA-PSS",
|
||||
"ExpectedClientSignHash" => "SHA256",
|
||||
"ExpectedClientCANames" => test_pem("root-cert.pem"),
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-noroot-post-handshake",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"VerifyMode" => "RequirePostHandshake",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"Certificate" => test_pem("ee-client-chain.pem"),
|
||||
"PrivateKey" => test_pem("ee-key.pem"),
|
||||
extra => {
|
||||
"EnablePHA" => "Yes",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"HandshakeMode" => "PostHandshakeAuth",
|
||||
"ExpectedServerAlert" => "UnknownCA",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-request-force-client-post-handshake",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"VerifyMode" => "RequestPostHandshake",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
extra => {
|
||||
"EnablePHA" => "Yes",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
"HandshakeMode" => "PostHandshakeAuth",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-request-force-server-post-handshake",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"VerifyMode" => "RequestPostHandshake",
|
||||
extra => {
|
||||
"ForcePHA" => "Yes",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ClientFail",
|
||||
"HandshakeMode" => "PostHandshakeAuth",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "client-auth-TLSv1.3-request-force-both-post-handshake",
|
||||
server => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"VerifyMode" => "RequestPostHandshake",
|
||||
extra => {
|
||||
"ForcePHA" => "Yes",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => "TLSv1.3",
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
extra => {
|
||||
"EnablePHA" => "Yes",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "Success",
|
||||
"HandshakeMode" => "PostHandshakeAuth",
|
||||
},
|
||||
},
|
||||
);
|
||||
146
test/ssl-tests/27-ticket-appdata.conf
Normal file
146
test/ssl-tests/27-ticket-appdata.conf
Normal file
@@ -0,0 +1,146 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 4
|
||||
|
||||
test-0 = 0-session-ticket-app-data12
|
||||
test-1 = 1-session-ticket-app-data12
|
||||
test-2 = 2-session-ticket-app-data13
|
||||
test-3 = 3-session-ticket-app-data13
|
||||
# ===========================================================
|
||||
|
||||
[0-session-ticket-app-data12]
|
||||
ssl_conf = 0-session-ticket-app-data12-ssl
|
||||
|
||||
[0-session-ticket-app-data12-ssl]
|
||||
server = 0-session-ticket-app-data12-server
|
||||
client = 0-session-ticket-app-data12-client
|
||||
resume-server = 0-session-ticket-app-data12-server
|
||||
resume-client = 0-session-ticket-app-data12-client
|
||||
|
||||
[0-session-ticket-app-data12-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-session-ticket-app-data12-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
ExpectedSessionTicketAppData = HelloWorld
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
SessionTicketExpected = Yes
|
||||
server = 0-session-ticket-app-data12-server-extra
|
||||
resume-server = 0-session-ticket-app-data12-server-extra
|
||||
|
||||
[0-session-ticket-app-data12-server-extra]
|
||||
SessionTicketAppData = HelloWorld
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-session-ticket-app-data12]
|
||||
ssl_conf = 1-session-ticket-app-data12-ssl
|
||||
|
||||
[1-session-ticket-app-data12-ssl]
|
||||
server = 1-session-ticket-app-data12-server
|
||||
client = 1-session-ticket-app-data12-client
|
||||
resume-server = 1-session-ticket-app-data12-server
|
||||
resume-client = 1-session-ticket-app-data12-client
|
||||
|
||||
[1-session-ticket-app-data12-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-session-ticket-app-data12-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
ExpectedSessionTicketAppData =
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
SessionTicketExpected = Yes
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-session-ticket-app-data13]
|
||||
ssl_conf = 2-session-ticket-app-data13-ssl
|
||||
|
||||
[2-session-ticket-app-data13-ssl]
|
||||
server = 2-session-ticket-app-data13-server
|
||||
client = 2-session-ticket-app-data13-client
|
||||
resume-server = 2-session-ticket-app-data13-server
|
||||
resume-client = 2-session-ticket-app-data13-client
|
||||
|
||||
[2-session-ticket-app-data13-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-session-ticket-app-data13-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
ExpectedSessionTicketAppData = HelloWorld
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
SessionTicketExpected = Yes
|
||||
server = 2-session-ticket-app-data13-server-extra
|
||||
resume-server = 2-session-ticket-app-data13-server-extra
|
||||
|
||||
[2-session-ticket-app-data13-server-extra]
|
||||
SessionTicketAppData = HelloWorld
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-session-ticket-app-data13]
|
||||
ssl_conf = 3-session-ticket-app-data13-ssl
|
||||
|
||||
[3-session-ticket-app-data13-ssl]
|
||||
server = 3-session-ticket-app-data13-server
|
||||
client = 3-session-ticket-app-data13-client
|
||||
resume-server = 3-session-ticket-app-data13-server
|
||||
resume-client = 3-session-ticket-app-data13-client
|
||||
|
||||
[3-session-ticket-app-data13-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
Options = SessionTicket
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-session-ticket-app-data13-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.3
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
ExpectedSessionTicketAppData =
|
||||
HandshakeMode = Resume
|
||||
ResumptionExpected = Yes
|
||||
SessionTicketExpected = Yes
|
||||
|
||||
|
||||
99
test/ssl-tests/27-ticket-appdata.conf.in
Normal file
99
test/ssl-tests/27-ticket-appdata.conf.in
Normal file
@@ -0,0 +1,99 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test session ticket app data
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
our @tests12 = (
|
||||
{
|
||||
"name" => "session-ticket-app-data12",
|
||||
"client" => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"Options" => "SessionTicket",
|
||||
},
|
||||
"server" => {
|
||||
"Options" => "SessionTicket",
|
||||
"extra" => {
|
||||
"SessionTicketAppData" => "HelloWorld",
|
||||
},
|
||||
},
|
||||
"test" => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ExpectedResult" => "Success",
|
||||
"SessionTicketExpected" => "Yes",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedSessionTicketAppData" => "HelloWorld",
|
||||
}
|
||||
},
|
||||
{
|
||||
"name" => "session-ticket-app-data12",
|
||||
"client" => {
|
||||
"MaxProtocol" => "TLSv1.2",
|
||||
"Options" => "SessionTicket",
|
||||
},
|
||||
"server" => {
|
||||
"Options" => "SessionTicket",
|
||||
},
|
||||
"test" => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ExpectedResult" => "Success",
|
||||
"SessionTicketExpected" => "Yes",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedSessionTicketAppData" => "",
|
||||
}
|
||||
}
|
||||
);
|
||||
our @tests13 = (
|
||||
{
|
||||
"name" => "session-ticket-app-data13",
|
||||
"client" => {
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"Options" => "SessionTicket",
|
||||
},
|
||||
"server" => {
|
||||
"Options" => "SessionTicket",
|
||||
"extra" => {
|
||||
"SessionTicketAppData" => "HelloWorld",
|
||||
},
|
||||
},
|
||||
"test" => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ExpectedResult" => "Success",
|
||||
"SessionTicketExpected" => "Yes",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedSessionTicketAppData" => "HelloWorld",
|
||||
}
|
||||
},
|
||||
{
|
||||
"name" => "session-ticket-app-data13",
|
||||
"client" => {
|
||||
"MaxProtocol" => "TLSv1.3",
|
||||
"Options" => "SessionTicket",
|
||||
},
|
||||
"server" => {
|
||||
"Options" => "SessionTicket",
|
||||
},
|
||||
"test" => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ExpectedResult" => "Success",
|
||||
"SessionTicketExpected" => "Yes",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedSessionTicketAppData" => "",
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
our @tests = ();
|
||||
push @tests, @tests12 unless disabled("tls1_2");
|
||||
push @tests, @tests13 unless disabled("tls1_3");
|
||||
102
test/ssl-tests/28-seclevel.conf
Normal file
102
test/ssl-tests/28-seclevel.conf
Normal file
@@ -0,0 +1,102 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 4
|
||||
|
||||
test-0 = 0-SECLEVEL 3 with default key
|
||||
test-1 = 1-SECLEVEL 3 with ED448 key
|
||||
test-2 = 2-SECLEVEL 3 with P-384 key, X25519 ECDHE
|
||||
test-3 = 3-SECLEVEL 3 with ED448 key, TLSv1.2
|
||||
# ===========================================================
|
||||
|
||||
[0-SECLEVEL 3 with default key]
|
||||
ssl_conf = 0-SECLEVEL 3 with default key-ssl
|
||||
|
||||
[0-SECLEVEL 3 with default key-ssl]
|
||||
server = 0-SECLEVEL 3 with default key-server
|
||||
client = 0-SECLEVEL 3 with default key-client
|
||||
|
||||
[0-SECLEVEL 3 with default key-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT:@SECLEVEL=3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-SECLEVEL 3 with default key-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = ServerFail
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-SECLEVEL 3 with ED448 key]
|
||||
ssl_conf = 1-SECLEVEL 3 with ED448 key-ssl
|
||||
|
||||
[1-SECLEVEL 3 with ED448 key-ssl]
|
||||
server = 1-SECLEVEL 3 with ED448 key-server
|
||||
client = 1-SECLEVEL 3 with ED448 key-client
|
||||
|
||||
[1-SECLEVEL 3 with ED448 key-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-ed448-cert.pem
|
||||
CipherString = DEFAULT:@SECLEVEL=3
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-ed448-key.pem
|
||||
|
||||
[1-SECLEVEL 3 with ED448 key-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-SECLEVEL 3 with P-384 key, X25519 ECDHE]
|
||||
ssl_conf = 2-SECLEVEL 3 with P-384 key, X25519 ECDHE-ssl
|
||||
|
||||
[2-SECLEVEL 3 with P-384 key, X25519 ECDHE-ssl]
|
||||
server = 2-SECLEVEL 3 with P-384 key, X25519 ECDHE-server
|
||||
client = 2-SECLEVEL 3 with P-384 key, X25519 ECDHE-client
|
||||
|
||||
[2-SECLEVEL 3 with P-384 key, X25519 ECDHE-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/p384-server-cert.pem
|
||||
CipherString = DEFAULT:@SECLEVEL=3
|
||||
Groups = X25519
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/p384-server-key.pem
|
||||
|
||||
[2-SECLEVEL 3 with P-384 key, X25519 ECDHE-client]
|
||||
CipherString = ECDHE:@SECLEVEL=3
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/p384-root.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-SECLEVEL 3 with ED448 key, TLSv1.2]
|
||||
ssl_conf = 3-SECLEVEL 3 with ED448 key, TLSv1.2-ssl
|
||||
|
||||
[3-SECLEVEL 3 with ED448 key, TLSv1.2-ssl]
|
||||
server = 3-SECLEVEL 3 with ED448 key, TLSv1.2-server
|
||||
client = 3-SECLEVEL 3 with ED448 key, TLSv1.2-client
|
||||
|
||||
[3-SECLEVEL 3 with ED448 key, TLSv1.2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/server-ed448-cert.pem
|
||||
CipherString = DEFAULT:@SECLEVEL=3
|
||||
MaxProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/server-ed448-key.pem
|
||||
|
||||
[3-SECLEVEL 3 with ED448 key, TLSv1.2-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
58
test/ssl-tests/28-seclevel.conf.in
Normal file
58
test/ssl-tests/28-seclevel.conf.in
Normal file
@@ -0,0 +1,58 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
package ssltests;
|
||||
use OpenSSL::Test::Utils;
|
||||
|
||||
our @tests = (
|
||||
{
|
||||
name => "SECLEVEL 3 with default key",
|
||||
server => { "CipherString" => "DEFAULT:\@SECLEVEL=3" },
|
||||
client => { },
|
||||
test => { "ExpectedResult" => "ServerFail" },
|
||||
},
|
||||
);
|
||||
|
||||
our @tests_ec = (
|
||||
{
|
||||
name => "SECLEVEL 3 with ED448 key",
|
||||
server => { "CipherString" => "DEFAULT:\@SECLEVEL=3",
|
||||
"Certificate" => test_pem("server-ed448-cert.pem"),
|
||||
"PrivateKey" => test_pem("server-ed448-key.pem") },
|
||||
client => { },
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
},
|
||||
{
|
||||
name => "SECLEVEL 3 with P-384 key, X25519 ECDHE",
|
||||
server => { "CipherString" => "DEFAULT:\@SECLEVEL=3",
|
||||
"Certificate" => test_pem("p384-server-cert.pem"),
|
||||
"PrivateKey" => test_pem("p384-server-key.pem"),
|
||||
"Groups" => "X25519" },
|
||||
client => { "CipherString" => "ECDHE:\@SECLEVEL=3",
|
||||
"VerifyCAFile" => test_pem("p384-root.pem") },
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
},
|
||||
);
|
||||
|
||||
our @tests_tls1_2 = (
|
||||
{
|
||||
name => "SECLEVEL 3 with ED448 key, TLSv1.2",
|
||||
server => { "CipherString" => "DEFAULT:\@SECLEVEL=3",
|
||||
"Certificate" => test_pem("server-ed448-cert.pem"),
|
||||
"PrivateKey" => test_pem("server-ed448-key.pem"),
|
||||
"MaxProtocol" => "TLSv1.2" },
|
||||
client => { },
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
},
|
||||
);
|
||||
|
||||
push @tests, @tests_ec unless disabled("ec");
|
||||
push @tests, @tests_tls1_2 unless disabled("tls1_2") || disabled("ec");
|
||||
315
test/ssl-tests/protocol_version.pm
Normal file
315
test/ssl-tests/protocol_version.pm
Normal file
@@ -0,0 +1,315 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
|
||||
## Test version negotiation
|
||||
|
||||
package ssltests;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use List::Util qw/max min/;
|
||||
|
||||
use OpenSSL::Test;
|
||||
use OpenSSL::Test::Utils qw/anydisabled alldisabled disabled/;
|
||||
setup("no_test_here");
|
||||
|
||||
my @tls_protocols = ("SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3");
|
||||
# undef stands for "no limit".
|
||||
my @min_tls_protocols = (undef, "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3");
|
||||
my @max_tls_protocols = ("SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", "TLSv1.3", undef);
|
||||
|
||||
my @is_tls_disabled = anydisabled("ssl3", "tls1", "tls1_1", "tls1_2", "tls1_3");
|
||||
|
||||
my $min_tls_enabled; my $max_tls_enabled;
|
||||
|
||||
# Protocol configuration works in cascades, i.e.,
|
||||
# $no_tls1_1 disables TLSv1.1 and below.
|
||||
#
|
||||
# $min_enabled and $max_enabled will be correct if there is at least one
|
||||
# protocol enabled.
|
||||
foreach my $i (0..$#tls_protocols) {
|
||||
if (!$is_tls_disabled[$i]) {
|
||||
$min_tls_enabled = $i;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $i (0..$#tls_protocols) {
|
||||
if (!$is_tls_disabled[$i]) {
|
||||
$max_tls_enabled = $i;
|
||||
}
|
||||
}
|
||||
|
||||
my @dtls_protocols = ("DTLSv1", "DTLSv1.2");
|
||||
# undef stands for "no limit".
|
||||
my @min_dtls_protocols = (undef, "DTLSv1", "DTLSv1.2");
|
||||
my @max_dtls_protocols = ("DTLSv1", "DTLSv1.2", undef);
|
||||
|
||||
my @is_dtls_disabled = anydisabled("dtls1", "dtls1_2");
|
||||
|
||||
my $min_dtls_enabled; my $max_dtls_enabled;
|
||||
|
||||
# $min_enabled and $max_enabled will be correct if there is at least one
|
||||
# protocol enabled.
|
||||
foreach my $i (0..$#dtls_protocols) {
|
||||
if (!$is_dtls_disabled[$i]) {
|
||||
$min_dtls_enabled = $i;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
foreach my $i (0..$#dtls_protocols) {
|
||||
if (!$is_dtls_disabled[$i]) {
|
||||
$max_dtls_enabled = $i;
|
||||
}
|
||||
}
|
||||
|
||||
sub no_tests {
|
||||
my ($dtls) = @_;
|
||||
return $dtls ? alldisabled("dtls1", "dtls1_2") :
|
||||
alldisabled("ssl3", "tls1", "tls1_1", "tls1_2", "tls1_3");
|
||||
}
|
||||
|
||||
sub generate_version_tests {
|
||||
my ($method) = @_;
|
||||
|
||||
my $dtls = $method eq "DTLS";
|
||||
# Don't write the redundant "Method = TLS" into the configuration.
|
||||
undef $method if !$dtls;
|
||||
|
||||
my @protocols = $dtls ? @dtls_protocols : @tls_protocols;
|
||||
my @min_protocols = $dtls ? @min_dtls_protocols : @min_tls_protocols;
|
||||
my @max_protocols = $dtls ? @max_dtls_protocols : @max_tls_protocols;
|
||||
my $min_enabled = $dtls ? $min_dtls_enabled : $min_tls_enabled;
|
||||
my $max_enabled = $dtls ? $max_dtls_enabled : $max_tls_enabled;
|
||||
|
||||
if (no_tests($dtls)) {
|
||||
return;
|
||||
}
|
||||
|
||||
my @tests = ();
|
||||
|
||||
for (my $sctp = 0; $sctp < ($dtls && !disabled("sctp") ? 2 : 1); $sctp++) {
|
||||
foreach my $c_min (0..$#min_protocols) {
|
||||
my $c_max_min = $c_min == 0 ? 0 : $c_min - 1;
|
||||
foreach my $c_max ($c_max_min..$#max_protocols) {
|
||||
foreach my $s_min (0..$#min_protocols) {
|
||||
my $s_max_min = $s_min == 0 ? 0 : $s_min - 1;
|
||||
foreach my $s_max ($s_max_min..$#max_protocols) {
|
||||
my ($result, $protocol) =
|
||||
expected_result($c_min, $c_max, $s_min, $s_max,
|
||||
$min_enabled, $max_enabled,
|
||||
\@protocols);
|
||||
push @tests, {
|
||||
"name" => "version-negotiation",
|
||||
"client" => {
|
||||
"MinProtocol" => $min_protocols[$c_min],
|
||||
"MaxProtocol" => $max_protocols[$c_max],
|
||||
},
|
||||
"server" => {
|
||||
"MinProtocol" => $min_protocols[$s_min],
|
||||
"MaxProtocol" => $max_protocols[$s_max],
|
||||
},
|
||||
"test" => {
|
||||
"ExpectedResult" => $result,
|
||||
"ExpectedProtocol" => $protocol,
|
||||
"Method" => $method,
|
||||
}
|
||||
};
|
||||
$tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return @tests if disabled("tls1_3") || disabled("tls1_2") || $dtls;
|
||||
|
||||
#Add some version/ciphersuite sanity check tests
|
||||
push @tests, {
|
||||
"name" => "ciphersuite-sanity-check-client",
|
||||
"client" => {
|
||||
#Offering only <=TLSv1.2 ciphersuites with TLSv1.3 should fail
|
||||
"CipherString" => "AES128-SHA",
|
||||
"Ciphersuites" => "",
|
||||
},
|
||||
"server" => {
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
"test" => {
|
||||
"ExpectedResult" => "ClientFail",
|
||||
}
|
||||
};
|
||||
push @tests, {
|
||||
"name" => "ciphersuite-sanity-check-server",
|
||||
"client" => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
"server" => {
|
||||
#Allowing only <=TLSv1.2 ciphersuites with TLSv1.3 should fail
|
||||
"CipherString" => "AES128-SHA",
|
||||
"Ciphersuites" => "",
|
||||
},
|
||||
"test" => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
}
|
||||
};
|
||||
|
||||
return @tests;
|
||||
}
|
||||
|
||||
sub generate_resumption_tests {
|
||||
my ($method) = @_;
|
||||
|
||||
my $dtls = $method eq "DTLS";
|
||||
# Don't write the redundant "Method = TLS" into the configuration.
|
||||
undef $method if !$dtls;
|
||||
|
||||
my @protocols = $dtls ? @dtls_protocols : @tls_protocols;
|
||||
my $min_enabled = $dtls ? $min_dtls_enabled : $min_tls_enabled;
|
||||
my $max_enabled = $dtls ? $max_dtls_enabled : $max_tls_enabled;
|
||||
|
||||
if (no_tests($dtls)) {
|
||||
return;
|
||||
}
|
||||
|
||||
my @server_tests = ();
|
||||
my @client_tests = ();
|
||||
|
||||
# Obtain the first session against a fixed-version server/client.
|
||||
foreach my $original_protocol($min_enabled..$max_enabled) {
|
||||
# Upgrade or downgrade the server/client max version support and test
|
||||
# that it upgrades, downgrades or resumes the session as well.
|
||||
foreach my $resume_protocol($min_enabled..$max_enabled) {
|
||||
my $resumption_expected;
|
||||
# We should only resume on exact version match.
|
||||
if ($original_protocol eq $resume_protocol) {
|
||||
$resumption_expected = "Yes";
|
||||
} else {
|
||||
$resumption_expected = "No";
|
||||
}
|
||||
|
||||
for (my $sctp = 0; $sctp < ($dtls && !disabled("sctp") ? 2 : 1);
|
||||
$sctp++) {
|
||||
foreach my $ticket ("SessionTicket", "-SessionTicket") {
|
||||
# Client is flexible, server upgrades/downgrades.
|
||||
push @server_tests, {
|
||||
"name" => "resumption",
|
||||
"client" => { },
|
||||
"server" => {
|
||||
"MinProtocol" => $protocols[$original_protocol],
|
||||
"MaxProtocol" => $protocols[$original_protocol],
|
||||
"Options" => $ticket,
|
||||
},
|
||||
"resume_server" => {
|
||||
"MaxProtocol" => $protocols[$resume_protocol],
|
||||
"Options" => $ticket,
|
||||
},
|
||||
"test" => {
|
||||
"ExpectedProtocol" => $protocols[$resume_protocol],
|
||||
"Method" => $method,
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => $resumption_expected,
|
||||
}
|
||||
};
|
||||
$server_tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp;
|
||||
# Server is flexible, client upgrades/downgrades.
|
||||
push @client_tests, {
|
||||
"name" => "resumption",
|
||||
"client" => {
|
||||
"MinProtocol" => $protocols[$original_protocol],
|
||||
"MaxProtocol" => $protocols[$original_protocol],
|
||||
},
|
||||
"server" => {
|
||||
"Options" => $ticket,
|
||||
},
|
||||
"resume_client" => {
|
||||
"MaxProtocol" => $protocols[$resume_protocol],
|
||||
},
|
||||
"test" => {
|
||||
"ExpectedProtocol" => $protocols[$resume_protocol],
|
||||
"Method" => $method,
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => $resumption_expected,
|
||||
}
|
||||
};
|
||||
$client_tests[-1]{"test"}{"UseSCTP"} = "Yes" if $sctp;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!disabled("tls1_3") && !$dtls) {
|
||||
push @client_tests, {
|
||||
"name" => "resumption-with-hrr",
|
||||
"client" => {
|
||||
},
|
||||
"server" => {
|
||||
"Curves" => "P-256"
|
||||
},
|
||||
"resume_client" => {
|
||||
},
|
||||
"test" => {
|
||||
"ExpectedProtocol" => "TLSv1.3",
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return (@server_tests, @client_tests);
|
||||
}
|
||||
|
||||
sub expected_result {
|
||||
my ($c_min, $c_max, $s_min, $s_max, $min_enabled, $max_enabled,
|
||||
$protocols) = @_;
|
||||
|
||||
# Adjust for "undef" (no limit).
|
||||
$c_min = $c_min == 0 ? 0 : $c_min - 1;
|
||||
$c_max = $c_max == scalar @$protocols ? $c_max - 1 : $c_max;
|
||||
$s_min = $s_min == 0 ? 0 : $s_min - 1;
|
||||
$s_max = $s_max == scalar @$protocols ? $s_max - 1 : $s_max;
|
||||
|
||||
# We now have at least one protocol enabled, so $min_enabled and
|
||||
# $max_enabled are well-defined.
|
||||
$c_min = max $c_min, $min_enabled;
|
||||
$s_min = max $s_min, $min_enabled;
|
||||
$c_max = min $c_max, $max_enabled;
|
||||
$s_max = min $s_max, $max_enabled;
|
||||
|
||||
if ($c_min > $c_max) {
|
||||
# Client should fail to even send a hello.
|
||||
return ("ClientFail", undef);
|
||||
} elsif ($s_min > $s_max) {
|
||||
# Server has no protocols, should always fail.
|
||||
return ("ServerFail", undef);
|
||||
} elsif ($s_min > $c_max) {
|
||||
# Server doesn't support the client range.
|
||||
return ("ServerFail", undef);
|
||||
} elsif ($c_min > $s_max) {
|
||||
my @prots = @$protocols;
|
||||
if ($prots[$c_max] eq "TLSv1.3") {
|
||||
# Client will have sent supported_versions, so server will know
|
||||
# that there are no overlapping versions.
|
||||
return ("ServerFail", undef);
|
||||
} else {
|
||||
# Server will try with a version that is lower than the lowest
|
||||
# supported client version.
|
||||
return ("ClientFail", undef);
|
||||
}
|
||||
} else {
|
||||
# Server and client ranges overlap.
|
||||
my $max_common = $s_max < $c_max ? $s_max : $c_max;
|
||||
return ("Success", $protocols->[$max_common]);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
30
test/ssl-tests/ssltests_base.pm
Normal file
30
test/ssl-tests/ssltests_base.pm
Normal file
@@ -0,0 +1,30 @@
|
||||
# -*- mode: perl; -*-
|
||||
# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the OpenSSL license (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
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
package ssltests;
|
||||
|
||||
sub test_pem
|
||||
{
|
||||
my ($file) = @_;
|
||||
my $dir_sep = $^O ne "VMS" ? "/" : "";
|
||||
return "\${ENV::TEST_CERTS_DIR}" . $dir_sep . $file,
|
||||
}
|
||||
|
||||
our %base_server = (
|
||||
"Certificate" => test_pem("servercert.pem"),
|
||||
"PrivateKey" => test_pem("serverkey.pem"),
|
||||
"CipherString" => "DEFAULT",
|
||||
);
|
||||
|
||||
our %base_client = (
|
||||
"VerifyCAFile" => test_pem("rootcert.pem"),
|
||||
"VerifyMode" => "Peer",
|
||||
"CipherString" => "DEFAULT",
|
||||
);
|
||||
Reference in New Issue
Block a user