summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-06-10 09:58:43 +0200
committerPauli <pauli@openssl.org>2021-06-11 20:09:30 +1000
commit67eacb60a8a46b610b98533c7e8ae5bd199e49d7 (patch)
tree59c9d6291a0e554a1c51a70395a66ce1c241e516
parentc24b3f2eda0235d04865bf258759d46d8a01608d (diff)
downloadopenssl-new-67eacb60a8a46b610b98533c7e8ae5bd199e49d7.tar.gz
Do not depend on the exact exit failure value of dgst app
On most platforms the EXIT_FAILURE is 1 but on NonStop platform the EXIT_FAILURE is -1 truncated to 255. Fixes #15633 Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15694)
-rw-r--r--test/recipes/15-test_rsapss.t30
1 files changed, 15 insertions, 15 deletions
diff --git a/test/recipes/15-test_rsapss.t b/test/recipes/15-test_rsapss.t
index 5c8340259f..f80ce30673 100644
--- a/test/recipes/15-test_rsapss.t
+++ b/test/recipes/15-test_rsapss.t
@@ -33,21 +33,21 @@ ok(run(app(['openssl', 'dgst', '-sign', srctop_file('test', 'testrsa.pem'), '-sh
srctop_file('test', 'testrsa.pem')])),
"openssl dgst -sign [plain RSA key, PSS padding mode, no PSS restrictions]");
-with({ exit_checker => sub { return shift == 1; } },
- sub { ok(run(app(['openssl', 'dgst', '-sign', srctop_file('test', 'testrsa.pem'), '-sha512',
- '-sigopt', 'rsa_padding_mode:pss', '-sigopt', 'rsa_pss_saltlen:max',
- '-sigopt', 'rsa_mgf1_md:sha512', srctop_file('test', 'testrsa.pem')])),
- "openssl dgst -sign, expect to fail gracefully");
- ok(run(app(['openssl', 'dgst', '-sign', srctop_file('test', 'testrsa.pem'), '-sha512',
- '-sigopt', 'rsa_padding_mode:pss', '-sigopt', 'rsa_pss_saltlen:2147483647',
- '-sigopt', 'rsa_mgf1_md:sha1', srctop_file('test', 'testrsa.pem')])),
- "openssl dgst -sign, expect to fail gracefully");
- ok(run(app(['openssl', 'dgst', '-prverify', srctop_file('test', 'testrsa.pem'), '-sha512',
- '-sigopt', 'rsa_padding_mode:pss', '-sigopt', 'rsa_pss_saltlen:max',
- '-sigopt', 'rsa_mgf1_md:sha512', '-signature', 'testrsapss.sig',
- srctop_file('test', 'testrsa.pem')])),
- "openssl dgst -prverify, expect to fail gracefully");
- });
+ok(!run(app(['openssl', 'dgst', '-sign', srctop_file('test', 'testrsa.pem'), '-sha512',
+ '-sigopt', 'rsa_padding_mode:pss', '-sigopt', 'rsa_pss_saltlen:max',
+ '-sigopt', 'rsa_mgf1_md:sha512', srctop_file('test', 'testrsa.pem')])),
+ "openssl dgst -sign, expect to fail gracefully");
+
+ok(!run(app(['openssl', 'dgst', '-sign', srctop_file('test', 'testrsa.pem'), '-sha512',
+ '-sigopt', 'rsa_padding_mode:pss', '-sigopt', 'rsa_pss_saltlen:2147483647',
+ '-sigopt', 'rsa_mgf1_md:sha1', srctop_file('test', 'testrsa.pem')])),
+ "openssl dgst -sign, expect to fail gracefully");
+
+ok(!run(app(['openssl', 'dgst', '-prverify', srctop_file('test', 'testrsa.pem'), '-sha512',
+ '-sigopt', 'rsa_padding_mode:pss', '-sigopt', 'rsa_pss_saltlen:max',
+ '-sigopt', 'rsa_mgf1_md:sha512', '-signature', 'testrsapss.sig',
+ srctop_file('test', 'testrsa.pem')])),
+ "openssl dgst -prverify, expect to fail gracefully");
ok(run(app(['openssl', 'dgst', '-prverify', srctop_file('test', 'testrsa.pem'),
'-sha1',