summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-04-26 15:04:53 +0200
committerTomas Mraz <tomas@openssl.org>2021-04-28 09:38:31 +0200
commit8365652287a27179143ee67b88c607a087f5d6f8 (patch)
tree817e6b63f61fc0ae97b193270f271d7c8994b63c /test
parentSkip GOST engine tests in out of tree builds (diff)
downloadopenssl-8365652287a27179143ee67b88c607a087f5d6f8.tar.xz
openssl-8365652287a27179143ee67b88c607a087f5d6f8.zip
Use "canonical" names when matching the output of the commands
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15028)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/20-test_dgst.t4
-rw-r--r--test/recipes/25-test_crl.t2
2 files changed, 3 insertions, 3 deletions
diff --git a/test/recipes/20-test_dgst.t b/test/recipes/20-test_dgst.t
index 0c19c029a0..451bcabbb1 100644
--- a/test/recipes/20-test_dgst.t
+++ b/test/recipes/20-test_dgst.t
@@ -111,7 +111,7 @@ subtest "HMAC generation with `dgst` CLI" => sub {
my @hmacdata = run(app(['openssl', 'dgst', '-sha256', '-hmac', '123456',
$testdata, $testdata]), capture => 1);
chomp(@hmacdata);
- my $expected = qr/HMAC-SHA256\(\Q$testdata\E\)= 6f12484129c4a761747f13d8234a1ff0e074adb34e9e9bf3a155c391b97b9a7c/;
+ my $expected = qr/HMAC-SHA2-256\(\Q$testdata\E\)= 6f12484129c4a761747f13d8234a1ff0e074adb34e9e9bf3a155c391b97b9a7c/;
ok($hmacdata[0] =~ $expected, "HMAC: Check HMAC value is as expected ($hmacdata[0]) vs ($expected)");
ok($hmacdata[1] =~ $expected,
"HMAC: Check second HMAC value is consistent with the first ($hmacdata[1]) vs ($expected)");
@@ -125,7 +125,7 @@ subtest "Custom length XOF digest generation with `dgst` CLI" => sub {
my @xofdata = run(app(['openssl', 'dgst', '-shake128', '-xoflen', '64',
$testdata, $testdata]), capture => 1);
chomp(@xofdata);
- my $expected = qr/SHAKE128\(\Q$testdata\E\)= bb565dac72640109e1c926ef441d3fa64ffd0b3e2bf8cd73d5182dfba19b6a8a2eab96d2df854b647b3795ef090582abe41ba4e0717dc4df40bc4e17d88e4677/;
+ my $expected = qr/SHAKE-128\(\Q$testdata\E\)= bb565dac72640109e1c926ef441d3fa64ffd0b3e2bf8cd73d5182dfba19b6a8a2eab96d2df854b647b3795ef090582abe41ba4e0717dc4df40bc4e17d88e4677/;
ok($xofdata[0] =~ $expected, "XOF: Check digest value is as expected ($xofdata[0]) vs ($expected)");
ok($xofdata[1] =~ $expected,
"XOF: Check second digest value is consistent with the first ($xofdata[1]) vs ($expected)");
diff --git a/test/recipes/25-test_crl.t b/test/recipes/25-test_crl.t
index 4b487867f5..128ad116ff 100644
--- a/test/recipes/25-test_crl.t
+++ b/test/recipes/25-test_crl.t
@@ -34,7 +34,7 @@ ok(compare1stline([qw{openssl crl -noout -fingerprint -in},
'SHA1 Fingerprint=BA:F4:1B:AD:7A:9B:2F:09:16:BC:60:A7:0E:CE:79:2E:36:00:E7:B2'));
ok(compare1stline([qw{openssl crl -noout -fingerprint -sha256 -in},
srctop_file('test', 'testcrl.pem')],
- 'SHA256 Fingerprint=B3:A9:FD:A7:2E:8C:3D:DF:D0:F1:C3:1A:96:60:B5:FD:B0:99:7C:7F:0E:E4:34:F5:DB:87:62:36:BC:F1:BC:1B'));
+ 'SHA2-256 Fingerprint=B3:A9:FD:A7:2E:8C:3D:DF:D0:F1:C3:1A:96:60:B5:FD:B0:99:7C:7F:0E:E4:34:F5:DB:87:62:36:BC:F1:BC:1B'));
ok(run(app(["openssl", "crl", "-text", "-in", $pem, "-out", $out,
"-nameopt", "utf8"])));