Import OpenSSL 1.1.0f
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 = ECDSA+SHA256
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-Server signature algorithms bug-client]
|
||||
CipherString = DEFAULT
|
||||
SignatureAlgorithms = 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" => "ECDSA+SHA256" },
|
||||
client => { "SignatureAlgorithms" => "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",
|
||||
},
|
||||
},
|
||||
);
|
||||
9975
test/ssl-tests/02-protocol-version.conf
Normal file
9975
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",
|
||||
},
|
||||
},
|
||||
);
|
||||
592
test/ssl-tests/04-client_auth.conf
Normal file
592
test/ssl-tests/04-client_auth.conf
Normal file
@@ -0,0 +1,592 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 20
|
||||
|
||||
test-0 = 0-server-auth-flex
|
||||
test-1 = 1-client-auth-flex-request
|
||||
test-2 = 2-client-auth-flex-require-fail
|
||||
test-3 = 3-client-auth-flex-require
|
||||
test-4 = 4-client-auth-flex-noroot
|
||||
test-5 = 5-server-auth-TLSv1
|
||||
test-6 = 6-client-auth-TLSv1-request
|
||||
test-7 = 7-client-auth-TLSv1-require-fail
|
||||
test-8 = 8-client-auth-TLSv1-require
|
||||
test-9 = 9-client-auth-TLSv1-noroot
|
||||
test-10 = 10-server-auth-TLSv1.1
|
||||
test-11 = 11-client-auth-TLSv1.1-request
|
||||
test-12 = 12-client-auth-TLSv1.1-require-fail
|
||||
test-13 = 13-client-auth-TLSv1.1-require
|
||||
test-14 = 14-client-auth-TLSv1.1-noroot
|
||||
test-15 = 15-server-auth-TLSv1.2
|
||||
test-16 = 16-client-auth-TLSv1.2-request
|
||||
test-17 = 17-client-auth-TLSv1.2-require-fail
|
||||
test-18 = 18-client-auth-TLSv1.2-require
|
||||
test-19 = 19-client-auth-TLSv1.2-noroot
|
||||
# ===========================================================
|
||||
|
||||
[0-server-auth-flex]
|
||||
ssl_conf = 0-server-auth-flex-ssl
|
||||
|
||||
[0-server-auth-flex-ssl]
|
||||
server = 0-server-auth-flex-server
|
||||
client = 0-server-auth-flex-client
|
||||
|
||||
[0-server-auth-flex-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-server-auth-flex-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-0]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[1-client-auth-flex-request]
|
||||
ssl_conf = 1-client-auth-flex-request-ssl
|
||||
|
||||
[1-client-auth-flex-request-ssl]
|
||||
server = 1-client-auth-flex-request-server
|
||||
client = 1-client-auth-flex-request-client
|
||||
|
||||
[1-client-auth-flex-request-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[1-client-auth-flex-request-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[2-client-auth-flex-require-fail]
|
||||
ssl_conf = 2-client-auth-flex-require-fail-ssl
|
||||
|
||||
[2-client-auth-flex-require-fail-ssl]
|
||||
server = 2-client-auth-flex-require-fail-server
|
||||
client = 2-client-auth-flex-require-fail-client
|
||||
|
||||
[2-client-auth-flex-require-fail-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
|
||||
|
||||
[2-client-auth-flex-require-fail-client]
|
||||
CipherString = DEFAULT
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = HandshakeFailure
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[3-client-auth-flex-require]
|
||||
ssl_conf = 3-client-auth-flex-require-ssl
|
||||
|
||||
[3-client-auth-flex-require-ssl]
|
||||
server = 3-client-auth-flex-require-server
|
||||
client = 3-client-auth-flex-require-client
|
||||
|
||||
[3-client-auth-flex-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 = Request
|
||||
|
||||
[3-client-auth-flex-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
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[4-client-auth-flex-noroot]
|
||||
ssl_conf = 4-client-auth-flex-noroot-ssl
|
||||
|
||||
[4-client-auth-flex-noroot-ssl]
|
||||
server = 4-client-auth-flex-noroot-server
|
||||
client = 4-client-auth-flex-noroot-client
|
||||
|
||||
[4-client-auth-flex-noroot-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[4-client-auth-flex-noroot-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 = ServerFail
|
||||
ExpectedServerAlert = UnknownCA
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[5-server-auth-TLSv1]
|
||||
ssl_conf = 5-server-auth-TLSv1-ssl
|
||||
|
||||
[5-server-auth-TLSv1-ssl]
|
||||
server = 5-server-auth-TLSv1-server
|
||||
client = 5-server-auth-TLSv1-client
|
||||
|
||||
[5-server-auth-TLSv1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1
|
||||
MinProtocol = TLSv1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-server-auth-TLSv1-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1
|
||||
MinProtocol = TLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[6-client-auth-TLSv1-request]
|
||||
ssl_conf = 6-client-auth-TLSv1-request-ssl
|
||||
|
||||
[6-client-auth-TLSv1-request-ssl]
|
||||
server = 6-client-auth-TLSv1-request-server
|
||||
client = 6-client-auth-TLSv1-request-client
|
||||
|
||||
[6-client-auth-TLSv1-request-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1
|
||||
MinProtocol = TLSv1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[6-client-auth-TLSv1-request-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1
|
||||
MinProtocol = TLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[7-client-auth-TLSv1-require-fail]
|
||||
ssl_conf = 7-client-auth-TLSv1-require-fail-ssl
|
||||
|
||||
[7-client-auth-TLSv1-require-fail-ssl]
|
||||
server = 7-client-auth-TLSv1-require-fail-server
|
||||
client = 7-client-auth-TLSv1-require-fail-client
|
||||
|
||||
[7-client-auth-TLSv1-require-fail-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1
|
||||
MinProtocol = TLSv1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[7-client-auth-TLSv1-require-fail-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1
|
||||
MinProtocol = TLSv1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = HandshakeFailure
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[8-client-auth-TLSv1-require]
|
||||
ssl_conf = 8-client-auth-TLSv1-require-ssl
|
||||
|
||||
[8-client-auth-TLSv1-require-ssl]
|
||||
server = 8-client-auth-TLSv1-require-server
|
||||
client = 8-client-auth-TLSv1-require-client
|
||||
|
||||
[8-client-auth-TLSv1-require-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1
|
||||
MinProtocol = TLSv1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[8-client-auth-TLSv1-require-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1
|
||||
MinProtocol = TLSv1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[9-client-auth-TLSv1-noroot]
|
||||
ssl_conf = 9-client-auth-TLSv1-noroot-ssl
|
||||
|
||||
[9-client-auth-TLSv1-noroot-ssl]
|
||||
server = 9-client-auth-TLSv1-noroot-server
|
||||
client = 9-client-auth-TLSv1-noroot-client
|
||||
|
||||
[9-client-auth-TLSv1-noroot-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1
|
||||
MinProtocol = TLSv1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[9-client-auth-TLSv1-noroot-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1
|
||||
MinProtocol = TLSv1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-9]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = UnknownCA
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[10-server-auth-TLSv1.1]
|
||||
ssl_conf = 10-server-auth-TLSv1.1-ssl
|
||||
|
||||
[10-server-auth-TLSv1.1-ssl]
|
||||
server = 10-server-auth-TLSv1.1-server
|
||||
client = 10-server-auth-TLSv1.1-client
|
||||
|
||||
[10-server-auth-TLSv1.1-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
MinProtocol = TLSv1.1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[10-server-auth-TLSv1.1-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
MinProtocol = TLSv1.1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-10]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[11-client-auth-TLSv1.1-request]
|
||||
ssl_conf = 11-client-auth-TLSv1.1-request-ssl
|
||||
|
||||
[11-client-auth-TLSv1.1-request-ssl]
|
||||
server = 11-client-auth-TLSv1.1-request-server
|
||||
client = 11-client-auth-TLSv1.1-request-client
|
||||
|
||||
[11-client-auth-TLSv1.1-request-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
MinProtocol = TLSv1.1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[11-client-auth-TLSv1.1-request-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
MinProtocol = TLSv1.1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-11]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[12-client-auth-TLSv1.1-require-fail]
|
||||
ssl_conf = 12-client-auth-TLSv1.1-require-fail-ssl
|
||||
|
||||
[12-client-auth-TLSv1.1-require-fail-ssl]
|
||||
server = 12-client-auth-TLSv1.1-require-fail-server
|
||||
client = 12-client-auth-TLSv1.1-require-fail-client
|
||||
|
||||
[12-client-auth-TLSv1.1-require-fail-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
MinProtocol = TLSv1.1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[12-client-auth-TLSv1.1-require-fail-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
MinProtocol = TLSv1.1
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-12]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = HandshakeFailure
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[13-client-auth-TLSv1.1-require]
|
||||
ssl_conf = 13-client-auth-TLSv1.1-require-ssl
|
||||
|
||||
[13-client-auth-TLSv1.1-require-ssl]
|
||||
server = 13-client-auth-TLSv1.1-require-server
|
||||
client = 13-client-auth-TLSv1.1-require-client
|
||||
|
||||
[13-client-auth-TLSv1.1-require-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
MinProtocol = TLSv1.1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[13-client-auth-TLSv1.1-require-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
MinProtocol = TLSv1.1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-13]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[14-client-auth-TLSv1.1-noroot]
|
||||
ssl_conf = 14-client-auth-TLSv1.1-noroot-ssl
|
||||
|
||||
[14-client-auth-TLSv1.1-noroot-ssl]
|
||||
server = 14-client-auth-TLSv1.1-noroot-server
|
||||
client = 14-client-auth-TLSv1.1-noroot-client
|
||||
|
||||
[14-client-auth-TLSv1.1-noroot-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
MinProtocol = TLSv1.1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[14-client-auth-TLSv1.1-noroot-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.1
|
||||
MinProtocol = TLSv1.1
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-14]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = UnknownCA
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[15-server-auth-TLSv1.2]
|
||||
ssl_conf = 15-server-auth-TLSv1.2-ssl
|
||||
|
||||
[15-server-auth-TLSv1.2-ssl]
|
||||
server = 15-server-auth-TLSv1.2-server
|
||||
client = 15-server-auth-TLSv1.2-client
|
||||
|
||||
[15-server-auth-TLSv1.2-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[15-server-auth-TLSv1.2-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-15]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[16-client-auth-TLSv1.2-request]
|
||||
ssl_conf = 16-client-auth-TLSv1.2-request-ssl
|
||||
|
||||
[16-client-auth-TLSv1.2-request-ssl]
|
||||
server = 16-client-auth-TLSv1.2-request-server
|
||||
client = 16-client-auth-TLSv1.2-request-client
|
||||
|
||||
[16-client-auth-TLSv1.2-request-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[16-client-auth-TLSv1.2-request-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-16]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[17-client-auth-TLSv1.2-require-fail]
|
||||
ssl_conf = 17-client-auth-TLSv1.2-require-fail-ssl
|
||||
|
||||
[17-client-auth-TLSv1.2-require-fail-ssl]
|
||||
server = 17-client-auth-TLSv1.2-require-fail-server
|
||||
client = 17-client-auth-TLSv1.2-require-fail-client
|
||||
|
||||
[17-client-auth-TLSv1.2-require-fail-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[17-client-auth-TLSv1.2-require-fail-client]
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-17]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = HandshakeFailure
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[18-client-auth-TLSv1.2-require]
|
||||
ssl_conf = 18-client-auth-TLSv1.2-require-ssl
|
||||
|
||||
[18-client-auth-TLSv1.2-require-ssl]
|
||||
server = 18-client-auth-TLSv1.2-require-server
|
||||
client = 18-client-auth-TLSv1.2-require-client
|
||||
|
||||
[18-client-auth-TLSv1.2-require-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/root-cert.pem
|
||||
VerifyMode = Request
|
||||
|
||||
[18-client-auth-TLSv1.2-require-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-18]
|
||||
ExpectedResult = Success
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[19-client-auth-TLSv1.2-noroot]
|
||||
ssl_conf = 19-client-auth-TLSv1.2-noroot-ssl
|
||||
|
||||
[19-client-auth-TLSv1.2-noroot-ssl]
|
||||
server = 19-client-auth-TLSv1.2-noroot-server
|
||||
client = 19-client-auth-TLSv1.2-noroot-client
|
||||
|
||||
[19-client-auth-TLSv1.2-noroot-server]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/servercert.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
VerifyMode = Require
|
||||
|
||||
[19-client-auth-TLSv1.2-noroot-client]
|
||||
Certificate = ${ENV::TEST_CERTS_DIR}/ee-client-chain.pem
|
||||
CipherString = DEFAULT
|
||||
MaxProtocol = TLSv1.2
|
||||
MinProtocol = TLSv1.2
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/ee-key.pem
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-19]
|
||||
ExpectedResult = ServerFail
|
||||
ExpectedServerAlert = UnknownCA
|
||||
|
||||
|
||||
123
test/ssl-tests/04-client_auth.conf.in
Normal file
123
test/ssl-tests/04-client_auth.conf.in
Normal file
@@ -0,0 +1,123 @@
|
||||
# -*- mode: perl; -*-
|
||||
|
||||
## SSL test configurations
|
||||
|
||||
package ssltests;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use OpenSSL::Test;
|
||||
use OpenSSL::Test::Utils qw(anydisabled);
|
||||
setup("no_test_here");
|
||||
|
||||
# We test version-flexible negotiation (undef) and each protocol version.
|
||||
my @protocols = (undef, "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2");
|
||||
|
||||
my @is_disabled = (0);
|
||||
push @is_disabled, anydisabled("ssl3", "tls1", "tls1_1", "tls1_2");
|
||||
|
||||
our @tests = ();
|
||||
|
||||
sub generate_tests() {
|
||||
|
||||
foreach (0..$#protocols) {
|
||||
my $protocol = $protocols[$_];
|
||||
my $protocol_name = $protocol || "flex";
|
||||
my $caalert;
|
||||
if (!$is_disabled[$_]) {
|
||||
if ($protocol_name eq "SSLv3") {
|
||||
$caalert = "BadCertificate";
|
||||
} else {
|
||||
$caalert = "UnknownCA";
|
||||
}
|
||||
# Sanity-check simple handshake.
|
||||
push @tests, {
|
||||
name => "server-auth-${protocol_name}",
|
||||
server => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol
|
||||
},
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
};
|
||||
|
||||
# Handshake with client cert requested but not required or received.
|
||||
push @tests, {
|
||||
name => "client-auth-${protocol_name}-request",
|
||||
server => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"VerifyMode" => "Request"
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol
|
||||
},
|
||||
test => { "ExpectedResult" => "Success" },
|
||||
};
|
||||
|
||||
# Handshake with client cert required but not present.
|
||||
push @tests, {
|
||||
name => "client-auth-${protocol_name}-require-fail",
|
||||
server => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"VerifyCAFile" => test_pem("root-cert.pem"),
|
||||
"VerifyMode" => "Require",
|
||||
},
|
||||
client => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol
|
||||
},
|
||||
test => {
|
||||
"ExpectedResult" => "ServerFail",
|
||||
"ExpectedServerAlert" => "HandshakeFailure",
|
||||
},
|
||||
};
|
||||
|
||||
# Successful handshake with client authentication.
|
||||
push @tests, {
|
||||
name => "client-auth-${protocol_name}-require",
|
||||
server => {
|
||||
"MinProtocol" => $protocol,
|
||||
"MaxProtocol" => $protocol,
|
||||
"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" },
|
||||
};
|
||||
|
||||
# Handshake with client authentication but without the root certificate.
|
||||
push @tests, {
|
||||
name => "client-auth-${protocol_name}-noroot",
|
||||
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,
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
generate_tests();
|
||||
203
test/ssl-tests/05-sni.conf
Normal file
203
test/ssl-tests/05-sni.conf
Normal file
@@ -0,0 +1,203 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 6
|
||||
|
||||
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
|
||||
# ===========================================================
|
||||
|
||||
[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
|
||||
|
||||
|
||||
112
test/ssl-tests/05-sni.conf.in
Normal file
112
test/ssl-tests/05-sni.conf.in
Normal file
@@ -0,0 +1,112 @@
|
||||
# -*- 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;
|
||||
|
||||
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"
|
||||
},
|
||||
},
|
||||
);
|
||||
734
test/ssl-tests/06-sni-ticket.conf
Normal file
734
test/ssl-tests/06-sni-ticket.conf
Normal file
@@ -0,0 +1,734 @@
|
||||
# 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
|
||||
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
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-1]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
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
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-2]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
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
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-3]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
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
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-4]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
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
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-5]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
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
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-6]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
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
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-7]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
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
|
||||
Options = SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-8]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
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
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-9]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
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
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-10]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
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
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-11]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
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
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-12]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
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
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-13]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
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
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-14]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
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
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-15]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server1
|
||||
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
|
||||
Options = -SessionTicket
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-16]
|
||||
ExpectedResult = Success
|
||||
ExpectedServerName = server2
|
||||
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
|
||||
|
||||
|
||||
95
test/ssl-tests/06-sni-ticket.conf.in
Normal file
95
test/ssl-tests/06-sni-ticket.conf.in
Normal file
@@ -0,0 +1,95 @@
|
||||
# -*- 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 = ();
|
||||
|
||||
sub generate_tests() {
|
||||
foreach my $c ("SessionTicket", "-SessionTicket") {
|
||||
foreach my $s1 ("SessionTicket", "-SessionTicket") {
|
||||
foreach my $s2 ("SessionTicket", "-SessionTicket") {
|
||||
foreach my $n ("server1", "server2") {
|
||||
my $result = expected_result($c, $s1, $s2, $n);
|
||||
push @tests, {
|
||||
"name" => "sni-session-ticket",
|
||||
"client" => {
|
||||
"Options" => $c,
|
||||
"extra" => {
|
||||
"ServerName" => $n,
|
||||
},
|
||||
},
|
||||
"server" => {
|
||||
"Options" => $s1,
|
||||
"extra" => {
|
||||
# We don't test mismatch here.
|
||||
"ServerNameCallback" => "IgnoreMismatch",
|
||||
},
|
||||
},
|
||||
"server2" => {
|
||||
"Options" => $s2,
|
||||
},
|
||||
"test" => {
|
||||
"ExpectedServerName" => $n,
|
||||
"ExpectedResult" => "Success",
|
||||
"SessionTicketExpected" => $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" => {
|
||||
"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");
|
||||
794
test/ssl-tests/08-npn.conf
Normal file
794
test/ssl-tests/08-npn.conf
Normal file
@@ -0,0 +1,794 @@
|
||||
# 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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[14-npn-client-switch-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
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
|
||||
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
|
||||
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
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[17-npn-no-client-support-resumption-resume-client]
|
||||
CipherString = DEFAULT
|
||||
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
|
||||
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
|
||||
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
|
||||
|
||||
|
||||
420
test/ssl-tests/08-npn.conf.in
Normal file
420
test/ssl-tests/08-npn.conf.in
Normal file
@@ -0,0 +1,420 @@
|
||||
# -*- 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 => "npn-simple",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-client-finds-match",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "baz,bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-client-honours-server-pref",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar,foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => "bar",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-client-first-pref-on-mismatch",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "baz",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-no-server-support",
|
||||
server => { },
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedNPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-no-client-support",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => { },
|
||||
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",
|
||||
},
|
||||
},
|
||||
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",
|
||||
},
|
||||
},
|
||||
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",
|
||||
},
|
||||
},
|
||||
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",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedServerName" => "server2",
|
||||
"ExpectedNPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "alpn-preferred-over-npn",
|
||||
server => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"ALPNProtocols" => "foo",
|
||||
"NPNProtocols" => "bar",
|
||||
},
|
||||
},
|
||||
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",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"ExpectedALPNProtocol" => undef,
|
||||
"ExpectedNPNProtocol" => "bar",
|
||||
"ExpectedServerName" => "server2",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-simple-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
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",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedNPNProtocol" => "baz",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-client-switch-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,bar,baz",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo,baz",
|
||||
},
|
||||
},
|
||||
resume_client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "bar,baz",
|
||||
},
|
||||
},
|
||||
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",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedNPNProtocol" => "foo",
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-no-server-support-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
resume_server => { },
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
test => {
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedNPNProtocol" => undef,
|
||||
},
|
||||
},
|
||||
{
|
||||
name => "npn-no-client-support-resumption",
|
||||
server => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
client => {
|
||||
extra => {
|
||||
"NPNProtocols" => "foo",
|
||||
},
|
||||
},
|
||||
resume_client => { },
|
||||
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",
|
||||
},
|
||||
},
|
||||
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",
|
||||
},
|
||||
},
|
||||
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
|
||||
|
||||
|
||||
324
test/ssl-tests/09-alpn.conf.in
Normal file
324
test/ssl-tests/09-alpn.conf.in
Normal file
@@ -0,0 +1,324 @@
|
||||
# -*- 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,
|
||||
},
|
||||
},
|
||||
);
|
||||
1336
test/ssl-tests/10-resumption.conf
Normal file
1336
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");
|
||||
612
test/ssl-tests/11-dtls_resumption.conf
Normal file
612
test/ssl-tests/11-dtls_resumption.conf
Normal file
@@ -0,0 +1,612 @@
|
||||
# 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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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",
|
||||
},
|
||||
},
|
||||
);
|
||||
397
test/ssl-tests/13-fragmentation.conf
Normal file
397
test/ssl-tests/13-fragmentation.conf
Normal file
@@ -0,0 +1,397 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 16
|
||||
|
||||
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
|
||||
# ===========================================================
|
||||
|
||||
[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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-15]
|
||||
ApplicationData = 4096
|
||||
MaxFragmentSize = 4096
|
||||
|
||||
|
||||
181
test/ssl-tests/13-fragmentation.conf.in
Normal file
181
test/ssl-tests/13-fragmentation.conf.in
Normal file
@@ -0,0 +1,181 @@
|
||||
# -*- 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 = (
|
||||
# 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 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",
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 1024 * 1024,
|
||||
MaxFragmentSize => 4 * 1024,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "large-app-data-aes-sha2-multibuffer",
|
||||
server => { },
|
||||
client => {
|
||||
CipherString => "AES128-SHA256",
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 1024 * 1024,
|
||||
MaxFragmentSize => 4 * 1024,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "large-app-data-aes-sha1-multibuffer-odd-fragment",
|
||||
server => { },
|
||||
client => {
|
||||
CipherString => "AES128-SHA",
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 1024 * 1024 + 3,
|
||||
MaxFragmentSize => 5 * 1024 - 5,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "large-app-data-aes-sha2-multibuffer-odd-fragment",
|
||||
server => { },
|
||||
client => {
|
||||
CipherString => "AES128-SHA256",
|
||||
},
|
||||
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",
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 4 * 1024,
|
||||
MaxFragmentSize => 4 * 1024,
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "small-app-data-aes-sha2-multibuffer",
|
||||
server => { },
|
||||
client => {
|
||||
CipherString => "AES128-SHA256",
|
||||
},
|
||||
test => {
|
||||
ApplicationData => 4 * 1024,
|
||||
MaxFragmentSize => 4 * 1024,
|
||||
}
|
||||
},
|
||||
);
|
||||
787
test/ssl-tests/14-curves.conf
Normal file
787
test/ssl-tests/14-curves.conf
Normal file
@@ -0,0 +1,787 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 29
|
||||
|
||||
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
|
||||
# ===========================================================
|
||||
|
||||
[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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[0-curve-sect163k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect163k1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[1-curve-sect163r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect163r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[2-curve-sect163r2-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect163r2
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[3-curve-sect193r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect193r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[4-curve-sect193r2-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect193r2
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[5-curve-sect233k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect233k1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-curve-sect233r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect233r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-curve-sect239k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect239k1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-curve-sect283k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect283k1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-curve-sect283r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect283r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[10-curve-sect409k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect409k1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[11-curve-sect409r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect409r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[12-curve-sect571k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect571k1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[13-curve-sect571r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = sect571r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[14-curve-secp160k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp160k1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[15-curve-secp160r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp160r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[16-curve-secp160r2-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp160r2
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[17-curve-secp192k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp192k1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[18-curve-prime192v1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = prime192v1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[19-curve-secp224k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp224k1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[20-curve-secp224r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp224r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[21-curve-secp256k1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp256k1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[22-curve-prime256v1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = prime256v1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[23-curve-secp384r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp384r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[24-curve-secp521r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = secp521r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[25-curve-brainpoolP256r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = brainpoolP256r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[26-curve-brainpoolP384r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = brainpoolP384r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[27-curve-brainpoolP512r1-client]
|
||||
CipherString = ECDHE
|
||||
Curves = brainpoolP512r1
|
||||
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
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[28-curve-X25519-client]
|
||||
CipherString = ECDHE
|
||||
Curves = X25519
|
||||
VerifyCAFile = ${ENV::TEST_CERTS_DIR}/rootcert.pem
|
||||
VerifyMode = Peer
|
||||
|
||||
[test-28]
|
||||
ExpectedResult = Success
|
||||
ExpectedTmpKeyType = X25519
|
||||
|
||||
|
||||
44
test/ssl-tests/14-curves.conf.in
Normal file
44
test/ssl-tests/14-curves.conf.in
Normal file
@@ -0,0 +1,44 @@
|
||||
# -*- 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");
|
||||
|
||||
our @tests = ();
|
||||
|
||||
sub generate_tests() {
|
||||
foreach (0..$#curves) {
|
||||
my $curve = $curves[$_];
|
||||
push @tests, {
|
||||
name => "curve-${curve}",
|
||||
server => {
|
||||
"Curves" => $curve
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "ECDHE",
|
||||
"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
|
||||
|
||||
|
||||
45
test/ssl-tests/16-dtls-certstatus.conf.in
Normal file
45
test/ssl-tests/16-dtls-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 DTLS CertStatus messages
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
package ssltests;
|
||||
|
||||
|
||||
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"
|
||||
}
|
||||
},
|
||||
);
|
||||
312
test/ssl-tests/17-renegotiate.conf
Normal file
312
test/ssl-tests/17-renegotiate.conf
Normal file
@@ -0,0 +1,312 @@
|
||||
# Generated with generate_ssl_tests.pl
|
||||
|
||||
num_tests = 10
|
||||
|
||||
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
|
||||
# ===========================================================
|
||||
|
||||
[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 = 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
|
||||
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
|
||||
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
|
||||
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
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[6-renegotiate-aead-to-non-aead-client]
|
||||
CipherString = AES128-GCM-SHA256
|
||||
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
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[7-renegotiate-non-aead-to-aead-client]
|
||||
CipherString = AES128-SHA
|
||||
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
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[8-renegotiate-non-aead-to-non-aead-client]
|
||||
CipherString = AES128-SHA
|
||||
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
|
||||
MaxProtocol = TLSv1.2
|
||||
Options = NoResumptionOnRenegotiation
|
||||
PrivateKey = ${ENV::TEST_CERTS_DIR}/serverkey.pem
|
||||
|
||||
[9-renegotiate-aead-to-aead-client]
|
||||
CipherString = AES128-GCM-SHA256
|
||||
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
|
||||
|
||||
|
||||
185
test/ssl-tests/17-renegotiate.conf.in
Normal file
185
test/ssl-tests/17-renegotiate.conf.in
Normal file
@@ -0,0 +1,185 @@
|
||||
# -*- 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"
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-client-resume",
|
||||
server => {},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "Yes",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-server-no-resume",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation"
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-server-resume",
|
||||
server => {},
|
||||
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",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-GCM-SHA256",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES128-SHA"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-non-aead-to-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES128-GCM-SHA256"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-non-aead-to-non-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES256-SHA"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-aead-to-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation",
|
||||
"MaxProtocol" => "TLSv1.2"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-GCM-SHA256",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES256-GCM-SHA384"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "TLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
push @tests, @tests_tls1_2 unless disabled("tls1_2");
|
||||
276
test/ssl-tests/18-dtls-renegotiate.conf
Normal file
276
test/ssl-tests/18-dtls-renegotiate.conf
Normal file
@@ -0,0 +1,276 @@
|
||||
# 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
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[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
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[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
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[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
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[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
|
||||
|
||||
|
||||
# ===========================================================
|
||||
|
||||
[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
|
||||
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
|
||||
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
|
||||
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
|
||||
client = 8-renegotiate-aead-to-aead-client-extra
|
||||
|
||||
[8-renegotiate-aead-to-aead-client-extra]
|
||||
RenegotiateCiphers = AES256-GCM-SHA384
|
||||
|
||||
|
||||
174
test/ssl-tests/18-dtls-renegotiate.conf.in
Normal file
174
test/ssl-tests/18-dtls-renegotiate.conf.in
Normal file
@@ -0,0 +1,174 @@
|
||||
# -*- 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"
|
||||
},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-client-resume",
|
||||
server => {},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"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",
|
||||
server => {},
|
||||
client => {},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-client-auth-require",
|
||||
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",
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-client-auth-once",
|
||||
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",
|
||||
"HandshakeMode" => "RenegotiateServer",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
}
|
||||
);
|
||||
our @tests_dtls1_2 = (
|
||||
{
|
||||
name => "renegotiate-aead-to-non-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-GCM-SHA256",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES128-SHA"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-non-aead-to-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES128-GCM-SHA256"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-non-aead-to-non-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-SHA",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES256-SHA"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
{
|
||||
name => "renegotiate-aead-to-aead",
|
||||
server => {
|
||||
"Options" => "NoResumptionOnRenegotiation"
|
||||
},
|
||||
client => {
|
||||
"CipherString" => "AES128-GCM-SHA256",
|
||||
extra => {
|
||||
"RenegotiateCiphers" => "AES256-GCM-SHA384"
|
||||
}
|
||||
},
|
||||
test => {
|
||||
"Method" => "DTLS",
|
||||
"HandshakeMode" => "RenegotiateClient",
|
||||
"ResumptionExpected" => "No",
|
||||
"ExpectedResult" => "Success"
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
push @tests, @tests_dtls1_2 unless disabled("dtls1_2");
|
||||
247
test/ssl-tests/protocol_version.pm
Normal file
247
test/ssl-tests/protocol_version.pm
Normal file
@@ -0,0 +1,247 @@
|
||||
# -*- 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
|
||||
|
||||
package ssltests;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use List::Util qw/max min/;
|
||||
|
||||
use OpenSSL::Test;
|
||||
use OpenSSL::Test::Utils qw/anydisabled alldisabled/;
|
||||
setup("no_test_here");
|
||||
|
||||
my @tls_protocols = ("SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2");
|
||||
# undef stands for "no limit".
|
||||
my @min_tls_protocols = (undef, "SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2");
|
||||
my @max_tls_protocols = ("SSLv3", "TLSv1", "TLSv1.1", "TLSv1.2", undef);
|
||||
|
||||
my @is_tls_disabled = anydisabled("ssl3", "tls1", "tls1_1", "tls1_2");
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
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 = ();
|
||||
|
||||
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,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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;
|
||||
|
||||
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..$#protocols) {
|
||||
# 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..$#protocols) {
|
||||
my $resumption_expected;
|
||||
# We should only resume on exact version match.
|
||||
if ($original_protocol eq $resume_protocol) {
|
||||
$resumption_expected = "Yes";
|
||||
} else {
|
||||
$resumption_expected = "No";
|
||||
}
|
||||
|
||||
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],
|
||||
},
|
||||
"test" => {
|
||||
"ExpectedProtocol" => $protocols[$resume_protocol],
|
||||
"Method" => $method,
|
||||
"HandshakeMode" => "Resume",
|
||||
"ResumptionExpected" => $resumption_expected,
|
||||
}
|
||||
};
|
||||
# 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,
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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.
|
||||
# This results in an internal error since the server will be
|
||||
# waiting for input that never arrives.
|
||||
return ("InternalError", 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) {
|
||||
# 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