diff options
author | Peiwei Hu <jlu.hpw@foxmail.com> | 2022-05-24 23:38:39 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-06-02 11:09:34 +0200 |
commit | 199b41021169f2f8fe6aaf63f6d853825af7de52 (patch) | |
tree | 278252b068ba35e1ec942ae99aaa5c8d6b0381f2 /test | |
parent | ad8d425a5ffa66b062a362e53267a7ceb94c51a4 (diff) |
Fix the checks of EVP_PKEY_CTX_get/set_rsa_pss_saltlen
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18399)
(cherry picked from commit 7263a7fc3d0c0c17616c2e5309e0fd52ed654ecc)
Diffstat (limited to 'test')
-rw-r--r-- | test/evp_extra_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c index ade3cb29f1..1b5cdbcc3e 100644 --- a/test/evp_extra_test.c +++ b/test/evp_extra_test.c @@ -3404,8 +3404,8 @@ static int test_EVP_rsa_pss_set_saltlen(void) && TEST_ptr(sha256_ctx = EVP_MD_CTX_new()) && TEST_true(EVP_DigestSignInit(sha256_ctx, &pkey_ctx, sha256, NULL, pkey)) && TEST_true(EVP_PKEY_CTX_set_rsa_padding(pkey_ctx, RSA_PKCS1_PSS_PADDING)) - && TEST_true(EVP_PKEY_CTX_set_rsa_pss_saltlen(pkey_ctx, test_value)) - && TEST_true(EVP_PKEY_CTX_get_rsa_pss_saltlen(pkey_ctx, &saltlen)) + && TEST_int_gt(EVP_PKEY_CTX_set_rsa_pss_saltlen(pkey_ctx, test_value), 0) + && TEST_int_gt(EVP_PKEY_CTX_get_rsa_pss_saltlen(pkey_ctx, &saltlen), 0) && TEST_int_eq(saltlen, test_value); EVP_MD_CTX_free(sha256_ctx); |