our @tests = ();
-my $dir_sep = $^O ne "VMS" ? "/" : "";
-
sub generate_tests() {
foreach (0..$#protocols) {
server => {
"MinProtocol" => $protocol,
"MaxProtocol" => $protocol,
- "VerifyCAFile" => "\${ENV::TEST_CERTS_DIR}${dir_sep}root-cert.pem",
+ "VerifyCAFile" => test_pem("root-cert.pem"),
"VerifyMode" => "Require",
},
client => {
server => {
"MinProtocol" => $protocol,
"MaxProtocol" => $protocol,
- "VerifyCAFile" => "\${ENV::TEST_CERTS_DIR}${dir_sep}root-cert.pem",
+ "VerifyCAFile" => test_pem("root-cert.pem"),
"VerifyMode" => "Request",
},
client => {
"MinProtocol" => $protocol,
"MaxProtocol" => $protocol,
- "Certificate" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-client-chain.pem",
- "PrivateKey" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-key.pem",
+ "Certificate" => test_pem("ee-client-chain.pem"),
+ "PrivateKey" => test_pem("ee-key.pem"),
},
test => { "ExpectedResult" => "Success" },
};
client => {
"MinProtocol" => $protocol,
"MaxProtocol" => $protocol,
- "Certificate" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-client-chain.pem",
- "PrivateKey" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-key.pem",
+ "Certificate" => test_pem("ee-client-chain.pem"),
+ "PrivateKey" => test_pem("ee-key.pem"),
},
test => {
"ExpectedResult" => "ServerFail",
package ssltests;
use OpenSSL::Test::Utils;
-my $dir_sep = $^O ne "VMS" ? "/" : "";
-
our @tests = (
{
name => "renegotiate-client-no-resume",
server => {
"Options" => "NoResumptionOnRenegotiation",
"MaxProtocol" => "TLSv1.2",
- "VerifyCAFile" => "\${ENV::TEST_CERTS_DIR}${dir_sep}root-cert.pem",
+ "VerifyCAFile" => test_pem("root-cert.pem"),
"VerifyMode" => "Require",
},
client => {
- "Certificate" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-client-chain.pem",
- "PrivateKey" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-key.pem"
+ "Certificate" => test_pem("ee-client-chain.pem"),
+ "PrivateKey" => test_pem("ee-key.pem"),
},
test => {
"Method" => "TLS",
server => {
"Options" => "NoResumptionOnRenegotiation",
"MaxProtocol" => "TLSv1.2",
- "VerifyCAFile" => "\${ENV::TEST_CERTS_DIR}${dir_sep}root-cert.pem",
+ "VerifyCAFile" => test_pem("root-cert.pem"),
"VerifyMode" => "Once",
},
client => {
- "Certificate" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-client-chain.pem",
- "PrivateKey" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-key.pem"
+ "Certificate" => test_pem("ee-client-chain.pem"),
+ "PrivateKey" => test_pem("ee-key.pem"),
},
test => {
"Method" => "TLS",
package ssltests;
use OpenSSL::Test::Utils;
-my $dir_sep = $^O ne "VMS" ? "/" : "";
-
our @tests = (
{
name => "renegotiate-client-no-resume",
{
name => "renegotiate-client-auth-require",
server => {
- "VerifyCAFile" => "\${ENV::TEST_CERTS_DIR}${dir_sep}root-cert.pem",
+ "VerifyCAFile" => test_pem("root-cert.pem"),
"VerifyMode" => "Require",
},
client => {
- "Certificate" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-client-chain.pem",
- "PrivateKey" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-key.pem"
+ "Certificate" => test_pem("ee-client-chain.pem"),
+ "PrivateKey" => test_pem("ee-key.pem"),
},
test => {
"Method" => "DTLS",
{
name => "renegotiate-client-auth-once",
server => {
- "VerifyCAFile" => "\${ENV::TEST_CERTS_DIR}${dir_sep}root-cert.pem",
+ "VerifyCAFile" => test_pem("root-cert.pem"),
"VerifyMode" => "Once",
},
client => {
- "Certificate" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-client-chain.pem",
- "PrivateKey" => "\${ENV::TEST_CERTS_DIR}${dir_sep}ee-key.pem"
+ "Certificate" => test_pem("ee-client-chain.pem"),
+ "PrivateKey" => test_pem("ee-key.pem"),
},
test => {
"Method" => "DTLS",
package ssltests;
-my $dir_sep = $^O ne "VMS" ? "/" : "";
+sub test_pem
+{
+ my ($file) = @_;
+ my $dir_sep = $^O ne "VMS" ? "/" : "";
+ return "\${ENV::TEST_CERTS_DIR}" . $dir_sep . $file,
+}
our %base_server = (
- "Certificate" => "\${ENV::TEST_CERTS_DIR}${dir_sep}servercert.pem",
- "PrivateKey" => "\${ENV::TEST_CERTS_DIR}${dir_sep}serverkey.pem",
+ "Certificate" => test_pem("servercert.pem"),
+ "PrivateKey" => test_pem("serverkey.pem"),
"CipherString" => "DEFAULT",
);
our %base_client = (
- "VerifyCAFile" => "\${ENV::TEST_CERTS_DIR}${dir_sep}rootcert.pem",
+ "VerifyCAFile" => test_pem("rootcert.pem"),
"VerifyMode" => "Peer",
"CipherString" => "DEFAULT",
);