The branch master has been updated via 67eacb60a8a46b610b98533c7e8ae5bd199e49d7 (commit) from c24b3f2eda0235d04865bf258759d46d8a01608d (commit)
- Log ----------------------------------------------------------------- commit 67eacb60a8a46b610b98533c7e8ae5bd199e49d7 Author: Tomas Mraz <to...@openssl.org> Date: Thu Jun 10 09:58:43 2021 +0200 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 <levi...@openssl.org> Reviewed-by: Paul Dale <pa...@openssl.org> (Merged from https://github.com/openssl/openssl/pull/15694) ----------------------------------------------------------------------- Summary of changes: test/recipes/15-test_rsapss.t | 30 +++++++++++++++--------------- 1 file 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',