Deleted Added
full compact
rsa_pss.c (194206) rsa_pss.c (205128)
1/* rsa_pss.c */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2005.
4 */
5/* ====================================================================
6 * Copyright (c) 2005 The OpenSSL Project. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 203 unchanged lines hidden (view full) ---

212 {
213 salt = OPENSSL_malloc(sLen);
214 if (!salt)
215 {
216 RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_PSS,
217 ERR_R_MALLOC_FAILURE);
218 goto err;
219 }
1/* rsa_pss.c */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2005.
4 */
5/* ====================================================================
6 * Copyright (c) 2005 The OpenSSL Project. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 203 unchanged lines hidden (view full) ---

212 {
213 salt = OPENSSL_malloc(sLen);
214 if (!salt)
215 {
216 RSAerr(RSA_F_RSA_PADDING_ADD_PKCS1_PSS,
217 ERR_R_MALLOC_FAILURE);
218 goto err;
219 }
220 if (!RAND_bytes(salt, sLen))
220 if (RAND_bytes(salt, sLen) <= 0)
221 goto err;
222 }
223 maskedDBLen = emLen - hLen - 1;
224 H = EM + maskedDBLen;
225 EVP_MD_CTX_init(&ctx);
226 EVP_DigestInit_ex(&ctx, Hash, NULL);
227 EVP_DigestUpdate(&ctx, zeroes, sizeof zeroes);
228 EVP_DigestUpdate(&ctx, mHash, hLen);

--- 41 unchanged lines hidden ---
221 goto err;
222 }
223 maskedDBLen = emLen - hLen - 1;
224 H = EM + maskedDBLen;
225 EVP_MD_CTX_init(&ctx);
226 EVP_DigestInit_ex(&ctx, Hash, NULL);
227 EVP_DigestUpdate(&ctx, zeroes, sizeof zeroes);
228 EVP_DigestUpdate(&ctx, mHash, hLen);

--- 41 unchanged lines hidden ---