padding: Fix error checking in RSA-PSS

This commit is contained in:
Jakub Jelen 2018-10-31 17:50:08 +01:00 committed by Frank Morgner
parent 0f5d73d816
commit 9342f8ad0a
1 changed files with 1 additions and 1 deletions

View File

@ -345,7 +345,7 @@ static int sc_pkcs1_add_pss_padding(unsigned int hash, unsigned int mgf1_hash,
if (EVP_DigestInit_ex(ctx, mgf1_md, NULL) != 1 ||
EVP_DigestUpdate(ctx, out + dblen, hlen) != 1 || /* H (Z parameter of MGF1) */
EVP_DigestUpdate(ctx, buf, 4) != 1 || /* C */
EVP_DigestFinal_ex(ctx, mask, NULL)) {
EVP_DigestFinal_ex(ctx, mask, NULL) != 1) {
goto done;
}
/* this is no longer part of the MGF1, but actually