Latest update.

This commit is contained in:
2020-01-17 19:45:12 +09:00
parent 016df9f433
commit 0f7abb4eb6
1100 changed files with 47785 additions and 16292 deletions
+18
View File
@@ -0,0 +1,18 @@
#! /usr/bin/env perl
# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use OpenSSL::Test qw(:DEFAULT bldtop_dir);
use OpenSSL::Test::Simple;
use OpenSSL::Test::Utils;
setup("test_internal_provider");
$ENV{OPENSSL_MODULES} = bldtop_dir("test");
simple_test("test_internal_keymgmt", "keymgmt_internal_test");
+5 -2
View File
@@ -41,8 +41,11 @@ sub testordinals
#Some ordinals can be repeated, e.g. if one is VMS and another is !VMS
$newqual = $tokens[4];
$newqual =~ s/!//g;
if ($cnt > $tokens[1]
|| ($cnt == $tokens[1] && ($qualifier ne $newqual
my $number = $tokens[1];
$number = $cnt + 1 if $number eq '?';
$number = $cnt if $number eq '?+';
if ($cnt > $number
|| ($cnt == $number && ($qualifier ne $newqual
|| $qualifier eq ""))) {
print STDERR "Invalid ordinal detected: ".$tokens[1]."\n";
$ret = 0;
+33 -12
View File
@@ -24,24 +24,24 @@ use platform;
plan skip_all => "Test only supported in a fips build" if disabled("fips");
plan tests => 6;
plan tests => 9;
my $infile = bldtop_file('providers', platform->dso('fips'));
$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
#fail if no module name
# fail if no module name
ok(!run(app(['openssl', 'fipsinstall', '-out', 'fips.conf', '-module',
'-provider_name', 'fips',
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
'-section_name', 'fips_install'])),
"fipinstall fail");
"fipsinstall fail");
# fail to Verify if the configuration file is missing
# fail to verify if the configuration file is missing
ok(!run(app(['openssl', 'fipsinstall', '-in', 'dummy.tmp', '-module', $infile,
'-provider_name', 'fips', '-mac_name', 'HMAC',
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
'-section_name', 'fips_install', '-verify'])),
"fipinstall verify fail");
"fipsinstall verify fail");
# output a fips.conf file containing mac data
@@ -49,25 +49,46 @@ ok(run(app(['openssl', 'fipsinstall', '-out', 'fips.conf', '-module', $infile,
'-provider_name', 'fips', '-mac_name', 'HMAC',
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
'-section_name', 'fips_install'])),
"fipinstall");
"fipsinstall");
# Verify the fips.conf file
# verify the fips.conf file
ok(run(app(['openssl', 'fipsinstall', '-in', 'fips.conf', '-module', $infile,
'-provider_name', 'fips', '-mac_name', 'HMAC',
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
'-section_name', 'fips_install', '-verify'])),
"fipinstall verify");
"fipsinstall verify");
# Fail to Verify the fips.conf file if a different key is used
# fail to verify the fips.conf file if a different key is used
ok(!run(app(['openssl', 'fipsinstall', '-in', 'fips.conf', '-module', $infile,
'-provider_name', 'fips', '-mac_name', 'HMAC',
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:01',
'-section_name', 'fips_install', '-verify'])),
"fipinstall verify fail bad key");
"fipsinstall verify fail bad key");
# Fail to Verify the fips.conf file if a different mac digest is used
# fail to verify the fips.conf file if a different mac digest is used
ok(!run(app(['openssl', 'fipsinstall', '-in', 'fips.conf', '-module', $infile,
'-provider_name', 'fips', '-mac_name', 'HMAC',
'-macopt', 'digest:SHA512', '-macopt', 'hexkey:00',
'-section_name', 'fips_install', '-verify'])),
"fipinstall verify fail incorrect digest");
"fipsinstall verify fail incorrect digest");
# corrupt the module hmac
ok(!run(app(['openssl', 'fipsinstall', '-out', 'fips.conf', '-module', $infile,
'-provider_name', 'fips', '-mac_name', 'HMAC',
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
'-section_name', 'fips_install', '-corrupt_desc', 'HMAC'])),
"fipsinstall fails when the module integrity is corrupted");
# corrupt the first digest
ok(!run(app(['openssl', 'fipsinstall', '-out', 'fips.conf', '-module', $infile,
'-provider_name', 'fips', '-mac_name', 'HMAC',
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
'-section_name', 'fips_install', '-corrupt_desc', 'SHA1'])),
"fipsinstall fails when the digest result is corrupted");
# corrupt another digest
ok(!run(app(['openssl', 'fipsinstall', '-out', 'fips.conf', '-module', $infile,
'-provider_name', 'fips', '-mac_name', 'HMAC',
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
'-section_name', 'fips_install', '-corrupt_desc', 'SHA3'])),
"fipsinstall fails when the digest result is corrupted");
+41
View File
@@ -0,0 +1,41 @@
#! /usr/bin/env perl
# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use warnings;
use OpenSSL::Test qw(:DEFAULT data_file);
use OpenSSL::Test::Utils;
use File::Compare qw(compare_text);
setup('test_conf');
my %input_result = (
'dollarid_on.conf' => 'dollarid_on.txt',
'dollarid_off.conf' => 'dollarid_off.txt',
);
plan skip_all => 'This is unsupported for cross compiled configurations'
if config('CROSS_COMPILE');
plan tests => 2 * scalar(keys %input_result);
foreach (sort keys %input_result) {
SKIP: {
my $input_path = data_file($_);
my $expected_path = data_file($input_result{$_});
my $result_path = "test_conf-$_-stdout";
skip "Problem dumping $_", 1
unless ok(run(test([ 'confdump', $input_path ],
stdout => $result_path)),
"dumping $_");
is(compare_text($result_path, $expected_path), 0,
"comparing the dump of $_ with $input_result{$_}");
}
}
@@ -0,0 +1,5 @@
.pragma dollarid:off
bar = 0
foo = $bar
cookie = ${foo}
@@ -0,0 +1,4 @@
[ default ]
bar = 0
foo = 0
cookie = 0
@@ -0,0 +1,5 @@
.pragma dollarid:on
bar = 0
foo$bar = 1
cookie = ${foo$bar}
@@ -0,0 +1,4 @@
[ default ]
bar = 0
foo$bar = 1
cookie = 1
+1
View File
@@ -32,6 +32,7 @@ my %cert_expected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0LmV4YW1wbGUwggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7MOIrqH+ZIJiZdroKMrelKMSvvRKg2MEg
j/sx9TaHHqrKys4AiL4Rq/ybQEigFC6G8mpZWbBrU+vN2SLr1ZsPftCHIY12LF56
0WLYTYNqDgF5BdCZCrjJ2hhN+XwML2tgYdWioV/Eey8SJSqUskf03MpcwnLbVfSp
hwmowqNfiEFFqPBCf7E8IVarGWctbMpvlMbAM5owhMev/Ccmqqt81NFkb1WVejvN
5v/JKv243/Xedf4I7ZJv7zKeswoP9piFzWHXCd9SIVzWqF77u/crHufIhoEa7NkZ
hSC2aosQF619iKnfk0nqWaLDJ182CCXkHERoQC7q9X2IGLDLoA0XAgMBAAEwDQYJ
KoZIhvcNAQELBQADggEBAKbtLx+YlCGRCBmYn3dfYF+BIvK/b/e0DKNhDKhb4s9J
ywlJ4qnAB48tgPx0q+ZB+EdMYRqCwyvXJxEdZ7PsCdUeU6xI2ybkhSdUUfQbYem3
aYRG+yukGzazySQJs8lGqxBlRMFl/FGCg+oSQ/I32eGf8micDskj2zkAJtCkUPHX
30YrWMfOwW1r2xYr2mBNXbNWXJhW/sIg5u8aa9fcALeuQcMXkbsbVoPmC5aLdiVZ
rvUFoJ8DPg0aYYwj64RwU0B5HW/7jKhQ25FgKVAzLGrgYx1DivkM7UQGdWYnU8IA
A8S89gRjGk2hnkeagWas3dxqTTpgJDhprgWzyKa9hII=
-----END CERTIFICATE-----
+10
View File
@@ -6,7 +6,17 @@
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use warnings;
use OpenSSL::Test::Simple;
use OpenSSL::Test;
use OpenSSL::Test::Utils;
setup("test_bf");
plan skip_all => "Low-level Blowfish APIs are disabled in this build"
if disabled("deprecated")
&& (!defined config("api") || config("api") >= 30000);
simple_test("test_bf", "bftest", "bf");
+11
View File
@@ -7,6 +7,17 @@
# https://www.openssl.org/source/license.html
use strict;
use warnings;
use OpenSSL::Test::Simple;
use OpenSSL::Test;
use OpenSSL::Test::Utils;
setup("test_cast");
plan skip_all => "Low-level CAST APIs are disabled in this build"
if disabled("deprecated")
&& (!defined config("api") || config("api") >= 30000);
simple_test("test_cast", "casttest", "cast");
+41 -13
View File
@@ -16,23 +16,51 @@ use OpenSSL::Test::Utils;
setup("test_ec");
plan tests => 5;
plan tests => 11;
require_ok(srctop_file('test','recipes','tconversion.pl'));
ok(run(test(["ectest"])), "running ectest");
SKIP: {
skip "Skipping ec conversion test", 3
if disabled("ec");
SKIP: {
skip "Skipping EC conversion test", 3
if disabled("ec");
subtest 'ec conversions -- private key' => sub {
tconversion("ec", srctop_file("test","testec-p256.pem"));
};
subtest 'ec conversions -- private key PKCS#8' => sub {
tconversion("ec", srctop_file("test","testec-p256.pem"), "pkey");
};
subtest 'ec conversions -- public key' => sub {
tconversion("ec", srctop_file("test","testecpub-p256.pem"), "ec", "-pubin", "-pubout");
};
subtest 'EC conversions -- private key' => sub {
tconversion("ec", srctop_file("test","testec-p256.pem"));
};
subtest 'EC conversions -- private key PKCS#8' => sub {
tconversion("ec", srctop_file("test","testec-p256.pem"), "pkey");
};
subtest 'EC conversions -- public key' => sub {
tconversion("ec", srctop_file("test","testecpub-p256.pem"),
"ec", "-pubin", "-pubout");
};
}
SKIP: {
skip "Skipping EdDSA conversion test", 6
if disabled("ec");
subtest 'Ed25519 conversions -- private key' => sub {
tconversion("pkey", srctop_file("test","tested25519.pem"));
};
subtest 'Ed25519 conversions -- private key PKCS#8' => sub {
tconversion("pkey", srctop_file("test","tested25519.pem"), "pkey");
};
subtest 'Ed25519 conversions -- public key' => sub {
tconversion("pkey", srctop_file("test","tested25519pub.pem"),
"pkey", "-pubin", "-pubout");
};
subtest 'Ed448 conversions -- private key' => sub {
tconversion("pkey", srctop_file("test","tested448.pem"));
};
subtest 'Ed448 conversions -- private key PKCS#8' => sub {
tconversion("pkey", srctop_file("test","tested448.pem"), "pkey");
};
subtest 'Ed448 conversions -- public key' => sub {
tconversion("pkey", srctop_file("test","tested448pub.pem"),
"pkey", "-pubin", "-pubout");
};
}
+104
View File
@@ -0,0 +1,104 @@
#! /usr/bin/env perl
# Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use warnings;
use File::Spec;
use OpenSSL::Test qw/:DEFAULT with srctop_file/;
use OpenSSL::Test::Utils;
setup("test_dgst");
plan tests => 5;
sub tsignverify {
my $testtext = shift;
my $privkey = shift;
my $pubkey = shift;
my $data_to_sign = srctop_file('test', 'README');
my $other_data = srctop_file('test', 'README.external');
plan tests => 4;
ok(run(app(['openssl', 'dgst', '-sign', $privkey,
'-out', 'testdgst.sig',
$data_to_sign])),
$testtext.": Generating signature");
ok(run(app(['openssl', 'dgst', '-prverify', $privkey,
'-signature', 'testdgst.sig',
$data_to_sign])),
$testtext.": Verify signature with private key");
ok(run(app(['openssl', 'dgst', '-verify', $pubkey,
'-signature', 'testdgst.sig',
$data_to_sign])),
$testtext.": Verify signature with public key");
ok(!run(app(['openssl', 'dgst', '-verify', $pubkey,
'-signature', 'testdgst.sig',
$other_data])),
$testtext.": Expect failure verifying mismatching data");
unlink 'testdgst.sig';
}
SKIP: {
skip "RSA is not supported by this OpenSSL build", 1
if disabled("rsa");
subtest "RSA signature generation and verification with `dgst` CLI" => sub {
tsignverify("RSA",
srctop_file("test","testrsa.pem"),
srctop_file("test","testrsapub.pem"));
};
}
SKIP: {
skip "DSA is not supported by this OpenSSL build", 1
if disabled("dsa");
subtest "DSA signature generation and verification with `dgst` CLI" => sub {
tsignverify("DSA",
srctop_file("test","testdsa.pem"),
srctop_file("test","testdsapub.pem"));
};
}
SKIP: {
skip "ECDSA is not supported by this OpenSSL build", 1
if disabled("ec");
subtest "ECDSA signature generation and verification with `dgst` CLI" => sub {
tsignverify("ECDSA",
srctop_file("test","testec-p256.pem"),
srctop_file("test","testecpub-p256.pem"));
};
}
SKIP: {
skip "EdDSA is not supported by this OpenSSL build", 2
if disabled("ec");
skip "EdDSA is not supported with `dgst` CLI", 2;
subtest "Ed25519 signature generation and verification with `dgst` CLI" => sub {
tsignverify("Ed25519",
srctop_file("test","tested25519.pem"),
srctop_file("test","tested25519pub.pem"));
};
subtest "Ed448 signature generation and verification with `dgst` CLI" => sub {
tsignverify("Ed448",
srctop_file("test","tested448.pem"),
srctop_file("test","tested448pub.pem"));
};
}
+2 -2
View File
@@ -30,14 +30,14 @@ my $ciphersstatus = undef;
my @ciphers =
grep(! /wrap|^$|^[^-]/,
(map { split /\s+/ }
run(app([$cmd, "enc", "-ciphers"]),
run(app([$cmd, "enc", "-list"]),
capture => 1, statusvar => \$ciphersstatus)));
plan tests => 2 + scalar @ciphers;
SKIP: {
skip "Problems getting ciphers...", 1 + scalar(@ciphers)
unless ok($ciphersstatus, "Running 'openssl enc -ciphers'");
unless ok($ciphersstatus, "Running 'openssl enc -list'");
unless (ok(copy($testsrc, $plaintext), "Copying $testsrc to $plaintext")) {
diag($!);
skip "Not initialized, skipping...", scalar(@ciphers);
+104 -1
View File
@@ -15,7 +15,7 @@ use OpenSSL::Test::Utils;
setup("test_pkeyutl");
plan tests => 6;
plan tests => 11;
# For the tests below we use the cert itself as the TBS file
@@ -68,3 +68,106 @@ SKIP: {
}
unlink 'signature.dat';
sub tsignverify {
my $testtext = shift;
my $privkey = shift;
my $pubkey = shift;
my @extraopts = @_;
my $data_to_sign = srctop_file('test', 'README');
my $other_data = srctop_file('test', 'README.external');
my $sigfile = 'testpkeyutl.sig';
my @args = ();
plan tests => 4;
@args = ('openssl', 'pkeyutl', '-sign',
'-inkey', $privkey,
'-out', $sigfile,
'-in', $data_to_sign);
push(@args, @extraopts);
ok(run(app([@args])),
$testtext.": Generating signature");
@args = ('openssl', 'pkeyutl', '-verify',
'-inkey', $privkey,
'-sigfile', $sigfile,
'-in', $data_to_sign);
push(@args, @extraopts);
ok(run(app([@args])),
$testtext.": Verify signature with private key");
@args = ('openssl', 'pkeyutl', '-verify',
'-inkey', $pubkey, '-pubin',
'-sigfile', $sigfile,
'-in', $data_to_sign);
push(@args, @extraopts);
ok(run(app([@args])),
$testtext.": Verify signature with public key");
@args = ('openssl', 'pkeyutl', '-verify',
'-inkey', $pubkey, '-pubin',
'-sigfile', $sigfile,
'-in', $other_data);
push(@args, @extraopts);
ok(!run(app([@args])),
$testtext.": Expect failure verifying mismatching data");
unlink $sigfile;
}
SKIP: {
skip "RSA is not supported by this OpenSSL build", 1
if disabled("rsa");
subtest "RSA CLI signature generation and verification" => sub {
tsignverify("RSA",
srctop_file("test","testrsa.pem"),
srctop_file("test","testrsapub.pem"),
"-rawin", "-digest", "sha256");
};
}
SKIP: {
skip "DSA is not supported by this OpenSSL build", 1
if disabled("dsa");
subtest "DSA CLI signature generation and verification" => sub {
tsignverify("DSA",
srctop_file("test","testdsa.pem"),
srctop_file("test","testdsapub.pem"),
"-rawin", "-digest", "sha256");
};
}
SKIP: {
skip "ECDSA is not supported by this OpenSSL build", 1
if disabled("ec");
subtest "ECDSA CLI signature generation and verification" => sub {
tsignverify("ECDSA",
srctop_file("test","testec-p256.pem"),
srctop_file("test","testecpub-p256.pem"),
"-rawin", "-digest", "sha256");
};
}
SKIP: {
skip "EdDSA is not supported by this OpenSSL build", 2
if disabled("ec");
subtest "Ed2559 CLI signature generation and verification" => sub {
tsignverify("Ed25519",
srctop_file("test","tested25519.pem"),
srctop_file("test","tested25519pub.pem"),
"-rawin");
};
subtest "Ed448 CLI signature generation and verification" => sub {
tsignverify("Ed448",
srctop_file("test","tested448.pem"),
srctop_file("test","tested448pub.pem"),
"-rawin");
};
}
+126 -26
View File
@@ -15,14 +15,10 @@ use OpenSSL::Test qw/:DEFAULT srctop_file/;
setup("test_req");
plan tests => 10;
plan tests => 15;
require_ok(srctop_file('test','recipes','tconversion.pl'));
open RND, ">>", ".rnd";
print RND "string to make the random number generator think it has randomness";
close RND;
# What type of key to generate?
my @req_new;
if (disabled("rsa")) {
@@ -46,15 +42,115 @@ ok(!run(app([@addext_args, "-addext", $val, "-addext", $val2])));
ok(!run(app([@addext_args, "-addext", $val, "-addext", $val3])));
ok(!run(app([@addext_args, "-addext", $val2, "-addext", $val3])));
subtest "generating certificate requests with RSA" => sub {
plan tests => 2;
SKIP: {
skip "RSA is not supported by this OpenSSL build", 2
if disabled("rsa");
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-new", "-out", "testreq.pem", "-utf8",
"-key", srctop_file("test", "testrsa.pem")])),
"Generating request");
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-verify", "-in", "testreq.pem", "-noout"])),
"Verifying signature on request");
}
};
subtest "generating certificate requests with DSA" => sub {
plan tests => 2;
SKIP: {
skip "DSA is not supported by this OpenSSL build", 2
if disabled("dsa");
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-new", "-out", "testreq.pem", "-utf8",
"-key", srctop_file("test", "testdsa.pem")])),
"Generating request");
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-verify", "-in", "testreq.pem", "-noout"])),
"Verifying signature on request");
}
};
subtest "generating certificate requests with ECDSA" => sub {
plan tests => 2;
SKIP: {
skip "ECDSA is not supported by this OpenSSL build", 2
if disabled("ec");
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-new", "-out", "testreq.pem", "-utf8",
"-key", srctop_file("test", "testec-p256.pem")])),
"Generating request");
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-verify", "-in", "testreq.pem", "-noout"])),
"Verifying signature on request");
}
};
subtest "generating certificate requests with Ed25519" => sub {
plan tests => 2;
SKIP: {
skip "Ed25519 is not supported by this OpenSSL build", 2
if disabled("ec");
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-new", "-out", "testreq.pem", "-utf8",
"-key", srctop_file("test", "tested25519.pem")])),
"Generating request");
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-verify", "-in", "testreq.pem", "-noout"])),
"Verifying signature on request");
}
};
subtest "generating certificate requests with Ed448" => sub {
plan tests => 2;
SKIP: {
skip "Ed448 is not supported by this OpenSSL build", 2
if disabled("ec");
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-new", "-out", "testreq.pem", "-utf8",
"-key", srctop_file("test", "tested448.pem")])),
"Generating request");
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-verify", "-in", "testreq.pem", "-noout"])),
"Verifying signature on request");
}
};
subtest "generating certificate requests" => sub {
plan tests => 2;
ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
@req_new, "-out", "testreq.pem"])),
@req_new, "-out", "testreq.pem"])),
"Generating request");
ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
"-verify", "-in", "testreq.pem", "-noout"])),
"-verify", "-in", "testreq.pem", "-noout"])),
"Verifying signature on request");
};
@@ -64,24 +160,28 @@ subtest "generating SM2 certificate requests" => sub {
SKIP: {
skip "SM2 is not supported by this OpenSSL build", 4
if disabled("sm2");
ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-new", "-key", srctop_file("test", "certs", "sm2.key"),
"-sigopt", "sm2_id:1234567812345678",
"-out", "testreq.pem", "-sm3"])),
"Generating SM2 certificate request");
ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-verify", "-in", "testreq.pem", "-noout",
"-sm2-id", "1234567812345678", "-sm3"])),
"Verifying signature on SM2 certificate request");
ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-new", "-key", srctop_file("test", "certs", "sm2.key"),
"-sigopt", "sm2_hex_id:DEADBEEF",
"-out", "testreq.pem", "-sm3"])),
"Generating SM2 certificate request with hex id");
ok(run(app(["openssl", "req", "-config", srctop_file("test", "test.cnf"),
ok(run(app(["openssl", "req",
"-config", srctop_file("test", "test.cnf"),
"-verify", "-in", "testreq.pem", "-noout",
"-sm2-hex-id", "DEADBEEF", "-sm3"])),
"Verifying signature on SM2 certificate request");
@@ -91,9 +191,9 @@ subtest "generating SM2 certificate requests" => sub {
my @openssl_args = ("req", "-config", srctop_file("apps", "openssl.cnf"));
run_conversion('req conversions',
"testreq.pem");
"testreq.pem");
run_conversion('req conversions -- testreq2',
srctop_file("test", "testreq2.pem"));
srctop_file("test", "testreq2.pem"));
unlink "testkey.pem", "testreq.pem";
@@ -102,20 +202,20 @@ sub run_conversion {
my $reqfile = shift;
subtest $title => sub {
run(app(["openssl", @openssl_args,
"-in", $reqfile, "-inform", "p",
"-noout", "-text"],
stderr => "req-check.err", stdout => undef));
open DATA, "req-check.err";
SKIP: {
plan skip_all => "skipping req conversion test for $reqfile"
if grep /Unknown Public Key/, map { s/\R//; } <DATA>;
run(app(["openssl", @openssl_args,
"-in", $reqfile, "-inform", "p",
"-noout", "-text"],
stderr => "req-check.err", stdout => undef));
open DATA, "req-check.err";
SKIP: {
plan skip_all => "skipping req conversion test for $reqfile"
if grep /Unknown Public Key/, map { s/\R//; } <DATA>;
tconversion("req", $reqfile, @openssl_args);
}
close DATA;
unlink "req-check.err";
tconversion("req", $reqfile, @openssl_args);
}
close DATA;
unlink "req-check.err";
done_testing();
done_testing();
};
}
+118
View File
@@ -0,0 +1,118 @@
#! /usr/bin/env perl
# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use warnings;
use OpenSSL::Test qw/:DEFAULT with bldtop_file srctop_file cmdstr/;
use OpenSSL::Test::Utils;
setup("test_verify_store");
plan tests => 10;
my $dummycnf = srctop_file("apps", "openssl.cnf");
my $CAkey = "keyCA.ss";
my $CAcert="certCA.ss";
my $CAserial="certCA.srl";
my $CAreq="reqCA.ss";
my $CAconf=srctop_file("test","CAss.cnf");
my $CAreq2="req2CA.ss"; # temp
my $Uconf=srctop_file("test","Uss.cnf");
my $Ukey="keyU.ss";
my $Ureq="reqU.ss";
my $Ucert="certU.ss";
SKIP: {
req( 'make cert request',
qw(-new),
-config => $CAconf,
-out => $CAreq,
-keyout => $CAkey );
skip 'failure', 8 unless
x509( 'convert request into self-signed cert',
qw(-req -CAcreateserial),
-in => $CAreq,
-out => $CAcert,
-signkey => $CAkey,
-days => 30,
-extfile => $CAconf,
-extensions => 'v3_ca' );
skip 'failure', 7 unless
x509( 'convert cert into a cert request',
qw(-x509toreq),
-in => $CAcert,
-out => $CAreq2,
-signkey => $CAkey );
skip 'failure', 6 unless
req( 'verify request 1',
qw(-verify -noout),
-config => $dummycnf,
-in => $CAreq );
skip 'failure', 5 unless
req( 'verify request 2',
qw(-verify -noout),
-config => $dummycnf,
-in => $CAreq2 );
skip 'failure', 4 unless
verify( 'verify signature',
-CAstore => $CAcert,
$CAcert );
skip 'failure', 3 unless
req( 'make a user cert request',
qw(-new),
-config => $Uconf,
-out => $Ureq,
-keyout => $Ukey );
skip 'failure', 2 unless
x509( 'sign user cert request',
qw(-req -CAcreateserial),
-in => $Ureq,
-out => $Ucert,
-CA => $CAcert,
-CAkey => $CAkey,
-CAserial => $CAserial,
-days => 30,
-extfile => $Uconf,
-extensions => 'v3_ee' )
&& verify( undef,
-CAstore => $CAcert,
$Ucert );
skip 'failure', 0 unless
x509( 'Certificate details',
qw( -subject -issuer -startdate -enddate -noout),
-in => $Ucert );
}
sub verify {
my $title = shift;
ok(run(app([qw(openssl verify), @_])), $title);
}
sub req {
my $title = shift;
ok(run(app([qw(openssl req), @_])), $title);
}
sub x509 {
my $title = shift;
ok(run(app([qw(openssl x509), @_])), $title);
}
+11 -3
View File
@@ -33,11 +33,13 @@ push @configs, 'fips.cnf' unless $no_fips;
my @files = qw( evpciph.txt evpdigest.txt );
my @defltfiles = qw( evpencod.txt evpkdf.txt evppkey_kdf.txt evpmac.txt
evppbe.txt evppkey.txt evppkey_ecc.txt evpcase.txt evpaessiv.txt
evpccmcavs.txt );
evppbe.txt evppkey.txt evppkey_ecc.txt evpcase.txt evpccmcavs.txt );
my @ideafiles = qw( evpciph_idea.txt );
push @defltfiles, @ideafiles unless disabled("idea");
my @sivfiles = qw( evpaessiv.txt );
push @defltfiles, @sivfiles unless disabled("siv");
my @castfiles = qw( evpciph_cast5.txt );
push @defltfiles, @castfiles unless disabled("cast");
@@ -62,6 +64,12 @@ push @defltfiles, @rc2files unless disabled("rc2");
my @chachafiles = qw( evpciph_chacha.txt );
push @defltfiles, @chachafiles unless disabled("chacha");
my @bffiles = qw( evpciph_bf.txt );
push @defltfiles, @bffiles unless disabled("bf");
my @bffiles = qw( evpmd_md2.txt );
push @defltfiles, @bffiles unless disabled("md2");
plan tests =>
($no_fips ? 0 : 1) # FIPS install test
+ (scalar(@configs) * scalar(@files))
@@ -78,7 +86,7 @@ unless ($no_fips) {
'-provider_name', 'fips', '-mac_name', 'HMAC',
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
'-section_name', 'fips_sect'])),
"fipinstall");
"fipsinstall");
}
foreach (@configs) {
+11
View File
@@ -2462,3 +2462,14 @@ AAD = 8008315ebf2e6fe020e8f5eb
Tag = 3615b7f90a651de15da20fb6
Plaintext = f57af5fd4ae19562976ec57a5a7ad55a5af5c5e5c5fdf5c55ad57a4a7272d57262e9729566ed66e97ac54a4a5a7ad5e15ae5fdd5fd5ac5d56ae56ad5c572d54ae54ac55a956afd6aed5a4ac562957a9516991691d572fd14e97ae962ed7a9f4a955af572e162f57a956666e17ae1f54a95f566d54a66e16e4afd6a9f7ae1c5c55ae5d56afde916c5e94a6ec56695e14afde1148416e94ad57ac5146ed59d1cc5
Ciphertext = ff78128ee18ee3cb9fb0d20726a017ff67fbd09d3a4c38aa32f6d306d3fdda378e459b83ed005507449d6cd981a4c1e3ff4193870c276ef09b6317a01a2283206ae4b4be0d0b235422c8abb00122410656b75e1ffc7fb49c0d0c5d6169aa7623610579968037aee8e83fc26264ea866590fd620aa3c0a5f323d953aa7f8defb0d0d60ab5a9de44dbaf8eae74ea3ab5f30594154f405fd630aa4c4d5603efdfa1
# Test that the tag can be set after specifying AAD.
Cipher = ARIA-256-CCM
Availablein = default
Key = 0c5ffd37a11edc42c325287fc0604f2e3e8cd5671a00fe3216aa5eb105783b54
IV = 000020e8f5eb00000000315e
AAD = 8008315ebf2e6fe020e8f5eb
Tag = 3615b7f90a651de15da20fb6
SetTagLate = TRUE
Plaintext = f57af5fd4ae19562976ec57a5a7ad55a5af5c5e5c5fdf5c55ad57a4a7272d57262e9729566ed66e97ac54a4a5a7ad5e15ae5fdd5fd5ac5d56ae56ad5c572d54ae54ac55a956afd6aed5a4ac562957a9516991691d572fd14e97ae962ed7a9f4a955af572e162f57a956666e17ae1f54a95f566d54a66e16e4afd6a9f7ae1c5c55ae5d56afde916c5e94a6ec56695e14afde1148416e94ad57ac5146ed59d1cc5
Ciphertext = ff78128ee18ee3cb9fb0d20726a017ff67fbd09d3a4c38aa32f6d306d3fdda378e459b83ed005507449d6cd981a4c1e3ff4193870c276ef09b6317a01a2283206ae4b4be0d0b235422c8abb00122410656b75e1ffc7fb49c0d0c5d6169aa7623610579968037aee8e83fc26264ea866590fd620aa3c0a5f323d953aa7f8defb0d0d60ab5a9de44dbaf8eae74ea3ab5f30594154f405fd630aa4c4d5603efdfa1
@@ -0,0 +1,68 @@
#
# Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
Title = Self generated BF test vectors
Cipher = BF-ECB
Availablein = default
Key = 000102030405060708090a0b0c0d0e0f
Plaintext = 0f0e0c0d0b0a09080706050403020100
Ciphertext = 079590e0010626685653b9b6c2a406e0
#Bigger key
Cipher = BF-ECB
Availablein = default
Key = 000102030405060708090a0b0c0d0e0f00000000
Plaintext = 0f0e0c0d0b0a09080706050403020100
Ciphertext = 7a0fe3734ad4785b49e59296b7861789
Cipher = BF-CBC
Availablein = default
Key = 000102030405060708090a0b0c0d0e0f
IV = 0101010101010101
Plaintext = 0f0e0c0d0b0a09080706050403020100
Ciphertext = 39c65006742b62a49f7a40ff69749c0a
#Bigger key
Cipher = BF-CBC
Availablein = default
Key = 000102030405060708090a0b0c0d0e0f00000000
IV = 0101010101010101
Plaintext = 0f0e0c0d0b0a09080706050403020100
Ciphertext = 3a5cefdb91e56e7aab45e7ea562bd465
Cipher = BF-OFB
Availablein = default
Key = 0001020304050607
IV = 0101010101010101
Plaintext = 0f0e0c0d0b0a09080706050403020100
Ciphertext = 27be8331cdc52dc61724029d302b9358
#Bigger key
Cipher = BF-OFB
Availablein = default
Key = 000102030405060700000000
IV = 0101010101010101
Plaintext = 0f0e0c0d0b0a09080706050403020100
Ciphertext = f108f229cc1cbe228aa3b2407979289a
Cipher = BF-CFB
Availablein = default
Key = 0001020304050607
IV = 0101010101010101
Plaintext = 0f0e0c0d0b0a09080706050403020100
Ciphertext = 27be8331cdc52dc675a93625f90f5db4
#Bigger key
Cipher = BF-CFB
Availablein = default
Key = 000102030405060700000000
IV = 0101010101010101
Plaintext = 0f0e0c0d0b0a09080706050403020100
Ciphertext = f108f229cc1cbe2214f00c3a8611cb46
@@ -60,3 +60,8 @@ Key = ebb46227c6cc8b37641910833222772a
Plaintext = 00000000000000000000000000000000
Ciphertext = 720c94b63edf44e131d950ca211a5a30
#Self generated. Long key
Cipher = RC4
Key = ebb46227c6cc8b37641910833222772a00000000
Plaintext = 00000000000000000000000000000000
Ciphertext = 358b23dba47770e72c7ea8ce5bd68da3
@@ -20,6 +20,12 @@ Key = 00000000000000000000000000000000
Plaintext = 000102030405060708090A0B0C0D0E0F
Ciphertext = d9d37019aec1161b27d7ad56b21f0f42
#Self generated. Bigger key.
Cipher = RC5-ECB
Key = 0000000000000000000000000000000000000000
Plaintext = 000102030405060708090A0B0C0D0E0F
Ciphertext = 610084f3e141cbc5455b82e2d56da565
Cipher = RC5-CBC
Key = 00000000000000000000000000000000
IV = 0000000000000000
@@ -32,6 +38,13 @@ IV = 0102030405060708
Plaintext = 000102030405060708090A0B0C0D0E0F
Ciphertext = eeebae12d768ac9e5b3d6072a9c76c65
#Self generated. Bigger key.
Cipher = RC5-CBC
Key = 0102030405060708090A0B0C0D0E0F1000000000
IV = 0102030405060708
Plaintext = 000102030405060708090A0B0C0D0E0F
Ciphertext = af64972111a80ec28871c51dd4bfe8de
Cipher = RC5-OFB
Key = 00000000000000000000000000000000
IV = 0000000000000000
@@ -44,6 +57,13 @@ IV = 0102030405060708
Plaintext = 000102030405060708090A0B0C0D0E0F
Ciphertext = c0ad101b40fc7ffdfc386ea5ecf458b7
#Self generated. Bigger key.
Cipher = RC5-OFB
Key = 0102030405060708090A0B0C0D0E0F1000000000
IV = 0102030405060708
Plaintext = 000102030405060708090A0B0C0D0E0F
Ciphertext = 66ff8fee03d45533dde93632e8f81f6f
Cipher = RC5-CFB
Key = 00000000000000000000000000000000
IV = 0000000000000000
+120
View File
@@ -6523,3 +6523,123 @@ Ctrl.hexsecret = hexsecret:000102030405060708090a0b0c0d0e0f10111213
Ctrl.cekalg = cekalg:id-smime-alg-CMSRC2wrap
Ctrl.hexukm = hexukm:0123456789abcdeffedcba98765432010123456789abcdeffedcba98765432010123456789abcdeffedcba98765432010123456789abcdeffedcba9876543201
Output = 48950c46e0530075403cce72889604e0
Title = KRB5KDF tests (from RFC 3961 test vectors and krb5 sources)
#RFC3961
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:dce06b1f64c857a11c3db57c51899b2cc1791008ce973b92
Ctrl.hexconstant = hexconstant:0000000155
Output = 925179d04591a79b5d3192c4a7e9c289b049c71f6ee604cd
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:5e13d31c70ef765746578531cb51c15bf11ca82c97cee9f2
Ctrl.hexconstant = hexconstant:00000001aa
Output = 9e58e5a146d9942a101c469845d67a20e3c4259ed913f207
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:98e6fd8a04a4b6859b75a176540b9752bad3ecd610a252bc
Ctrl.hexconstant = hexconstant:0000000155
Output = 13fef80d763e94ec6d13fd2ca1d085070249dad39808eabf
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:622aec25a2fe2cad7094680b7c64940280084c1a7cec92b5
Ctrl.hexconstant = hexconstant:00000001aa
Output = f8dfbf04b097e6d9dc0702686bcb3489d91fd9a4516b703e
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:d3f8298ccb166438dcb9b93ee5a7629286a491f838f802fb
Ctrl.hexconstant = hexconstant:6b65726265726f73
Output = 2370da575d2a3da864cebfdc5204d56df779a7df43d9da43
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:c1081649ada74362e6a1459d01dfd30d67c2234c940704da
Ctrl.hexconstant = hexconstant:0000000155
Output = 348057ec98fdc48016161c2a4c7a943e92ae492c989175f7
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:5d154af238f46713155719d55e2f1f790dd661f279a7917c
Ctrl.hexconstant = hexconstant:00000001aa
Output = a8808ac267dada3dcbe9a7c84626fbc761c294b01315e5c1
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:798562e049852f57dc8c343ba17f2ca1d97394efc8adc443
Ctrl.hexconstant = hexconstant:0000000155
Output = c813f88a3be3b334f75425ce9175fbe3c8493b89c8703b49
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:26dce334b545292f2feab9a8701a89a4b99eb9942cecd016
Ctrl.hexconstant = hexconstant:00000001aa
Output = f48ffd6e83f83e7354e694fd252cf83bfe58f7d5ba37ec5d
#Krb5 sources
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:850BB51358548CD05E86768C313E3BFEF7511937DCF72C3E
Ctrl.hexconstant = hexconstant:0000000299
Output = F78C496D16E6C2DAE0E0B6C24057A84C0426AEEF26FD6DCE
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:850BB51358548CD05E86768C313E3BFEF7511937DCF72C3E
Ctrl.hexconstant = hexconstant:00000002AA
Output = 5B5723D0B634CB684C3EBA5264E9A70D52E683231AD3C4CE
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:850BB51358548CD05E86768C313E3BFEF7511937DCF72C3E
Ctrl.hexconstant = hexconstant:0000000255
Output = A77C94980E9B7345A81525C423A737CE67F4CD91B6B3DA45
KDF = KRB5KDF
Ctrl.cipher = cipher:AES-128-CBC
Ctrl.hexkey = hexkey:42263C6E89F4FC28B8DF68EE09799F15
Ctrl.hexconstant = hexconstant:0000000299
Output = 34280A382BC92769B2DA2F9EF066854B
KDF = KRB5KDF
Ctrl.cipher = cipher:AES-128-CBC
Ctrl.hexkey = hexkey:42263C6E89F4FC28B8DF68EE09799F15
Ctrl.hexconstant = hexconstant:00000002AA
Output = 5B14FC4E250E14DDF9DCCF1AF6674F53
KDF = KRB5KDF
Ctrl.cipher = cipher:AES-128-CBC
Ctrl.hexkey = hexkey:42263C6E89F4FC28B8DF68EE09799F15
Ctrl.hexconstant = hexconstant:0000000255
Output = 4ED31063621684F09AE8D89991AF3E8F
KDF = KRB5KDF
Ctrl.cipher = cipher:AES-256-CBC
Ctrl.hexkey = hexkey:FE697B52BC0D3CE14432BA036A92E65BBB52280990A2FA27883998D72AF30161
Ctrl.hexconstant = hexconstant:0000000299
Output = BFAB388BDCB238E9F9C98D6A878304F04D30C82556375AC507A7A852790F4674
KDF = KRB5KDF
Ctrl.cipher = cipher:AES-256-CBC
Ctrl.hexkey = hexkey:FE697B52BC0D3CE14432BA036A92E65BBB52280990A2FA27883998D72AF30161
Ctrl.hexconstant = hexconstant:00000002AA
Output = C7CFD9CD75FE793A586A542D87E0D1396F1134A104BB1A9190B8C90ADA3DDF37
KDF = KRB5KDF
Ctrl.cipher = cipher:AES-256-CBC
Ctrl.hexkey = hexkey:FE697B52BC0D3CE14432BA036A92E65BBB52280990A2FA27883998D72AF30161
Ctrl.hexconstant = hexconstant:0000000255
Output = 97151B4C76945063E2EB0529DC067D97D7BBA90776D8126D91F34F3101AEA8BA
#Same as the first but with no "fixup"
KDF = KRB5KDF
Ctrl.cipher = cipher:DES-EDE3-CBC
Ctrl.hexkey = hexkey:dce06b1f64c857a11c3db57c51899b2cc1791008ce973b92
Ctrl.hexconstant = hexconstant:0000000155
Output = 935079d14490a75c3093c4a6e8c3b049c71e6ee705
@@ -0,0 +1,44 @@
#
# Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
Title = MD2 tests
Digest = MD2
Availablein = legacy
Input =
Output = 8350e5a3e24c153df2275c9f80692773
Digest = MD2
Availablein = legacy
Input = "a"
Output = 32ec01ec4a6dac72c0ab96fb34c0b5d1
Digest = MD2
Availablein = legacy
Input = "abc"
Output = da853b0d3f88d99b30283a69e6ded6bb
Digest = MD2
Availablein = legacy
Input = "message digest"
Output = ab4f496bfb2a530b219ff33031fe06b0
Digest = MD2
Availablein = legacy
Input = "abcdefghijklmnopqrstuvwxyz"
Output = 4e8ddff3650292ab5a4108c3aa47940b
Digest = MD2
Availablein = legacy
Input = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
Output = da33def2a42df13975352846c30338cd
Digest = MD2
Availablein = legacy
Input = "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
Output = d5976f79d83d3a0dc9806c3c66f3efd8
@@ -807,6 +807,8 @@ PublicKeyRaw=Bob-448-PUBLIC-Raw:X448:3eb7a829b0cd20f5bcfc0b599b6feccf6da4627107b
PrivPubKeyPair = Bob-448-Raw:Bob-448-PUBLIC-Raw
PublicKeyRaw=Bob-448-PUBLIC-Raw-NonCanonical:X448:ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
Derive=Alice-448
PeerKey=Bob-448-PUBLIC
SharedSecret=07fff4181ac6cc95ec1c16a94a0f74d12da232ce40a77552281d282bb60c0b56fd2464c335543936521c24403085d59a449a5037514a879d
@@ -823,6 +825,11 @@ Derive=Bob-448-Raw
PeerKey=Alice-448-PUBLIC-Raw
SharedSecret=07fff4181ac6cc95ec1c16a94a0f74d12da232ce40a77552281d282bb60c0b56fd2464c335543936521c24403085d59a449a5037514a879d
# Self-generated non-canonical
Derive=Alice-448-Raw
PeerKey=Bob-448-PUBLIC-Raw-NonCanonical
SharedSecret=66e2e682b1f8e68c809f1bb3e406bd826921d9c1a5bfbfcbab7ae72feecee63660eabd54934f3382061d17607f581a90bdac917a064959fb
# Illegal sign/verify operations with X448 key
Sign=Alice-448
+1 -1
View File
@@ -53,7 +53,7 @@ unless ($no_fips) {
'-provider_name', 'fips', '-mac_name', 'HMAC',
'-macopt', 'digest:SHA256', '-macopt', 'hexkey:00',
'-section_name', 'fips_sect']),
message => "fipinstall"
message => "fipsinstall"
};
push @testdata, (
{ config => srctop_file("test", "fips.cnf"),
@@ -1,5 +1,6 @@
#! /usr/bin/env perl
# Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
# Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
@@ -8,8 +9,5 @@
use OpenSSL::Test::Simple;
use OpenSSL::Test qw/:DEFAULT bldtop_dir/;
setup("test_md2");
simple_test("test_md2", "md2test", "md2");
simple_test("test_evp_pkey_provided", "evp_pkey_provided_test");
+55
View File
@@ -0,0 +1,55 @@
#! /usr/bin/env perl
# Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use warnings;
use OpenSSL::Test qw(:DEFAULT data_file);
use File::Compare qw(compare_text);
setup('test_bio_prefix');
my %input_result = (
'in1.txt' => [ 'args1.pl', 'out1.txt' ],
'in2.txt' => [ 'args2.pl', 'out2.txt' ],
);
plan tests => 2 * scalar(keys %input_result);
foreach (sort keys %input_result) {
SKIP: {
my $input_path = data_file($_);
my $args_path = data_file($input_result{$_}->[0]);
my $expected_path = data_file($input_result{$_}->[1]);
my $result_path = "test_bio_prefix-$_-stdout";
my @args = do $args_path;
skip "Problem prefixing $_", 1
unless ok(run(test([ 'bio_prefix_text', @args ],
stdin => $input_path, stdout => $result_path)),
"prefixing $_ with args " . join(' ', @args));
is(compare_text($result_path, $expected_path, \&cmp_line), 0,
"comparing the dump of $_ with $expected_path");
}
}
sub cmp_line {
return 0 if scalar @_ == 0;
if (scalar @_ != 2) {
diag "Lines to compare less than 2: ", scalar @_;
return -1;
}
$_[0] =~ s|\R$||;
$_[1] =~ s|\R$||;
my $r = $_[0] cmp $_[1];
diag "Lines differ:\n<: $_[0]\n>: $_[1]\n" unless $r == 0;
return $r;
}
@@ -0,0 +1,6 @@
(
-n => 2,
-i => '1:32',
-p => '1:FOO',
-i => '0:3'
);
@@ -0,0 +1,3 @@
(
-n => 1,
);
@@ -0,0 +1 @@
foo
@@ -0,0 +1 @@
bar
@@ -0,0 +1 @@
FOO foo
@@ -0,0 +1 @@
bar
+22
View File
@@ -0,0 +1,22 @@
#! /usr/bin/env perl
# Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
# Copyright Nokia 2007-2019
# Copyright Siemens AG 2015-2019
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use OpenSSL::Test qw/:DEFAULT data_file/;
use OpenSSL::Test::Utils;
setup("test_cmp_lib");
plan skip_all => "This test is not supported in a no-cmp build"
if disabled("cmp");
plan tests => 1;
ok(run(test(["cmp_hdr_test"])));
+24
View File
@@ -0,0 +1,24 @@
#! /usr/bin/env perl
# Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
# Copyright Nokia 2007-2019
# Copyright Siemens AG 2015-2019
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use OpenSSL::Test qw/:DEFAULT data_file/;
use OpenSSL::Test::Utils;
setup("test_cmp_msg");
plan skip_all => "This test is not supported in a no-cmp build"
if disabled("cmp");
plan tests => 1;
ok(run(test(["cmp_msg_test",
data_file("server.crt"),
data_file("pkcs10.der")])));
Binary file not shown.
@@ -0,0 +1,17 @@
-----BEGIN CERTIFICATE-----
MIICpTCCAY2gAwIBAgIBATANBgkqhkiG9w0BAQUFADAWMRQwEgYDVQQKDAtvcGVu
c3NsX2NtcDAeFw0xNzEyMjAxMzA0MDBaFw0xODEyMjAxMzA0MDBaMBYxFDASBgNV
BAoMC29wZW5zc2xfY21wMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
4ckRrH0UWmIJFj99kBqvCipGjJRAaPkdvWjdDQLglTpI3eZAJHnq0ypW/PZccrWj
o7mxuvAStEYWF+5Jx6ZFmAsC1K0NNebSAZQoLWYZqiOzkfVVpLicMnItNFElfCoh
BzPCYmF5UlC5yp9PSUEfNwPJqDIRMtw+IlVUV3AJw9TJ3uuWq/vWW9r96/gBKKdd
mj/q2gGT8RC6LxEaolTbhfPbHaA1DFpv1WQFb3oAV3Wq14SOZf9bH1olBVsmBMsU
shFEw5MXVrNCv2moM4HtITMyjvZe7eIwHzSzf6dvQjERG6GvZ/i5KOhaqgJCnRKd
HHzijz9cLec5p9NSOuC1OwIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQDGUXpFCBkV
WgPrBfZyBwt6VCjWB/e67q4IdcKMfDa4hwSquah1AyXHI0PlC/qitnoSx2+7f7pY
TEOay/3eEPUl1J5tdPF2Vg56Dw8jdhSkMwO7bXKDEE3R6o6jaa4ECgxwQtdGHmNU
A41PgKX76yEXku803ptO39/UR7i7Ye3MbyAmWE+PvixJYUbxd3fqz5fsaJqTCzAy
AT9hrr4uu8J7m3LYaYXo4LVL4jw5UsP5bIYtpmmEBfy9GhpUqH5/LzBNij7y3ziE
T59wHkzawAQDHsBPuCe07DFtlzqWWvaih0TQAw9MZ2tbyK9jt7P80Rqt9CwpM/i9
jQYqSl/ix5hn
-----END CERTIFICATE-----
+35
View File
@@ -0,0 +1,35 @@
#! /usr/bin/env perl
# Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
# Copyright Nokia 2007-2019
# Copyright Siemens AG 2015-2019
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use OpenSSL::Test qw/:DEFAULT data_file/;
use OpenSSL::Test::Utils;
setup("test_cmp_protect");
plan skip_all => "This test is not supported in a no-cmp build"
if disabled("cmp");
plan skip_all => "This test is not supported in a shared library build on Windows"
if $^O eq 'MSWin32' && !disabled("shared");
plan tests => 1;
ok(run(test(["cmp_protect_test",
data_file("server.pem"),
data_file("IR_protected.der"),
data_file("IR_unprotected.der"),
data_file("IP_PBM.der"),
data_file("server.crt"),
data_file("server.pem"),
data_file("EndEntity1.crt"),
data_file("EndEntity2.crt"),
data_file("Root_CA.crt"),
data_file("Intermediate_CA.crt")])));
@@ -0,0 +1,16 @@
-----BEGIN CERTIFICATE-----
MIICnDCCAYSgAwIBAgIBAzANBgkqhkiG9w0BAQUFADASMRAwDgYDVQQDEwdSb290
IENBMB4XDTE3MTEwODE1NDgwMFoXDTE4MTEwODExMTkwMFowETEPMA0GA1UEAxMG
Q2xpZW50MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtNiWJufEotHe
p6E/4b0laX7K1NRamNoUokLIsq78RoBieBXaGxIdbT6zmhLnLmZdb0UN3v7FUP75
rqPN2yyj3TbS4o5ilh5El8bDDAPhW5lthCddvH/uBziRAM5oIB4xxOumNbgHpLUT
Clh49sdXd4ydYpCTWld5emRouBmMUeP/0EkyWMBIrHGSBxrqtFVRXhxvVHImQv6Z
hIKql7dCVCZbhUtxw6sLxIGL4xlhKoM2o31k4I/9tjZrWSZZ7KAIOlOLrjxZc/bQ
MwvxVUgS+C+iXzhCY8v+N/K37jwtAAk4C1aOGv/VygNcN0C/ynfKSzFmtnfei4+3
6GC7HtFzewIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQB3GYpPSCCYsJM5owKcODr/
I1aJ8jQ+u5jCKjvYLp6Cnbr4AbRXzvKuMyV6UfIAQbrGOxAClvX++5/ZQbhY+TxN
iiUM3yr5yYCLqj4MeYHhJ3gOzcppAO9LQ9V7eA8C830giZMm3cpApFSLP8CpwNUD
W/fgoQfaOae5IYPZdea88Gmt5RVNbtHgVqtm4ifTQo577kfxTeh20s+M6pgYW3/R
vftXy2ITEtk/j3NcRvOyZ7Bu1mAg7wNeUjL+gDWAaxs16LsWsCsUGwfr/Z2Rq1CF
zB0XwIyigkVLDLqDzUShcw0Eb/zYy2KXsxNWA2tb27mw+T+tmmOszpn7JjLrlVks
-----END CERTIFICATE-----
@@ -0,0 +1,13 @@
-----BEGIN CERTIFICATE-----
MIIB3zCCAZSgAwIBAgIBBjAKBggqhkjOPQQDAzAVMRMwEQYDVQQDEwpad2lzY2hl
bkNBMB4XDTE3MTEwODE2MDUwMFoXDTE4MTEwODExMTkwMFowEjEQMA4GA1UEAxMH
Q2xpZW50MjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALTYlibnxKLR
3qehP+G9JWl+ytTUWpjaFKJCyLKu/EaAYngV2hsSHW0+s5oS5y5mXW9FDd7+xVD+
+a6jzdsso9020uKOYpYeRJfGwwwD4VuZbYQnXbx/7gc4kQDOaCAeMcTrpjW4B6S1
EwpYePbHV3eMnWKQk1pXeXpkaLgZjFHj/9BJMljASKxxkgca6rRVUV4cb1RyJkL+
mYSCqpe3QlQmW4VLccOrC8SBi+MZYSqDNqN9ZOCP/bY2a1kmWeygCDpTi648WXP2
0DML8VVIEvgvol84QmPL/jfyt+48LQAJOAtWjhr/1coDXDdAv8p3yksxZrZ33ouP
t+hgux7Rc3sCAwEAAaMNMAswCQYDVR0TBAIwADAKBggqhkjOPQQDAwM5ADA2AhkA
qASBLwTauET6FGp/EBe7b/99jTyGB861AhkA5ILGkLX4KmjRkTcNxJ3JKB1Sumya
cbqF
-----END CERTIFICATE-----
Binary file not shown.
@@ -0,0 +1 @@
Reference#: 3078Secret Value: insta
@@ -0,0 +1,12 @@
-----BEGIN CERTIFICATE-----
MIIB1jCBv6ADAgECAgEFMA0GCSqGSIb3DQEBDQUAMBIxEDAOBgNVBAMTB1Jvb3Qg
Q0EwHhcNMTcxMTA4MTYwNDAwWhcNMTgxMTA4MTExOTAwWjAVMRMwEQYDVQQDEwpa
d2lzY2hlbkNBMEkwEwYHKoZIzj0CAQYIKoZIzj0DAQEDMgAE9bJcmZWj2CmO6aW8
9Qylkj1WgPREf9/s4Z1VYqFODeJnebPXFBLVH/aoGxnds9E9oxAwDjAMBgNVHRME
BTADAQH/MA0GCSqGSIb3DQEBDQUAA4IBAQBwQD4NTIWM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SfSjN2Sae4LVhC7rWJ43LtyRepptzBPGqd26eLPGAMr8CgYEA7P8u
RGkMOrMzEKAb0A9smrzq2xW88T1VejqEt6R8mUcNt8PFHMgjuzVU4zDysrlb7G/0
VSkQWnJxBh1yNGc1Av7YgwicIgApr4ty0hZhLcnKX2VrNw+L/sSe/cnwVAc6RtPK
RR6xQubuLlrCGcbYXmyn5Jv+nlY0S3uCyDFHqIUCgYAwtpLxhJf7RwWeqva9wNJl
ZpUcHE9iPwtwxXx/tyfBjoI4Zv11HyS1BQYrJm2kXCYKeHBB4FlREXEeKDMGluZO
F1XocP+GIDtY71jg6xLXNtY76yt5pzH6ae4p53WtyKhrO1UyRFaDh3bkwuK3b8j6
wZbuLCpjGGn2BPAvBeWXPQKBgEewKN6op/pZmmi9Bay5/bAQ1TnQKYcPdnuyl9K0
/ruespeTsFw0bhqC11qhw8gsKZIri0z3TusNEwM2hQU08uQlEnkQcaoXQoTHOcQy
4NJo575Tf0r4ePBnqXA7VWcViJtEFTszPYtvLzz2VyBU9b4aP+73AN4EVW0/vx+v
SG3BAoGBAMzESFA2TXwUFmozK5zowIszc995Xqpi7mXKk77WESOpoS1dQ1wF1dSg
XOwxzFoYovLxcc1K9lqOrod8BV+qGuEfc/PIJ2aiXjvEDeZYX2eWaANNmj4OSLoJ
MNYj9tZxbq56slD7snf7AgUBnwKz0Pj6H6UsbE3gdJqZWCDyw/bB
-----END RSA PRIVATE KEY-----
+22
View File
@@ -0,0 +1,22 @@
#! /usr/bin/env perl
# Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
# Copyright Nokia 2007-2019
# Copyright Siemens AG 2015-2019
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use OpenSSL::Test qw/:DEFAULT data_file/;
use OpenSSL::Test::Utils;
setup("test_cmp_lib");
plan skip_all => "This test is not supported in a no-cmp build"
if disabled("cmp");
plan tests => 1;
ok(run(test(["cmp_status_test"])));
+16
View File
@@ -0,0 +1,16 @@
#! /usr/bin/env perl
# Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the Apache License 2.0 (the "License"). You may not use
# this file except in compliance with the License. You can obtain a copy
# in the file LICENSE in the source distribution or at
# https://www.openssl.org/source/license.html
use strict;
use warnings;
use OpenSSL::Test;
setup("ssl_ctx_test");
plan tests => 1;
ok(run(test(["ssl_ctx_test"])));
-4
View File
@@ -100,10 +100,6 @@ testssl("keyU.ss", $Ucert, $CAcert);
# -----------
# subtest functions
sub testss {
open RND, ">>", ".rnd";
print RND "string to make the random number generator think it has randomness";
close RND;
my @req_dsa = ("-newkey",
"dsa:".srctop_file("apps", "dsa1024.pem"));
my $dsaparams = srctop_file("apps", "dsa1024.pem");
+11
View File
@@ -7,6 +7,17 @@
# https://www.openssl.org/source/license.html
use strict;
use warnings;
use OpenSSL::Test::Simple;
use OpenSSL::Test;
use OpenSSL::Test::Utils;
setup("test_ige");
plan skip_all => "AES_ige support is disabled in this build"
if disabled("deprecated")
&& (!defined config("api") || config("api") >= 30000);
simple_test("test_ige", "igetest");
@@ -4,8 +4,6 @@
# This is mostly being used for generation of certificate requests.
#
RANDFILE = ./.rnd
####################################################################
[ ca ]
default_ca = CA_default # The default ca section
@@ -23,7 +21,6 @@ certificate = $dir/CAcert.pem # The CA certificate
serial = $dir/serial # The current serial number
crl = $dir/crl.pem # The current CRL
private_key = $dir/private/CAkey.pem# The private key
RANDFILE = $dir/private/.rand # private random number file
default_days = 365 # how long to certify for
default_crl_days= 30 # how long before next CRL
+5 -1
View File
@@ -10,6 +10,10 @@
use OpenSSL::Test;
setup("test_memleak");
plan skip_all => "MacOS currently doesn't support leak sanitizer"
if $^O eq 'darwin';
plan tests => 2;
ok(run(test(["memleaktest"])), "running leak test");
ok(!run(test(["memleaktest"])), "running leak test");
ok(run(test(["memleaktest", "freeit"])), "running no leak test");
-3
View File
@@ -12,9 +12,6 @@ use OpenSSL::Test::Utils;
setup("test_overhead");
plan skip_all => "Only supported in no-shared builds"
if !disabled("shared");
plan tests => 1;
ok(run(test(["cipher_overhead_test"])), "running cipher_overhead_test");