Explorar el Código

Fix rsa_pss_to_ctx return value.

It should return 0 for failure, not -1; the call site was expecting 0 anyway.

Change-Id: I24ab5d3695b8ac438e40be1a4fd74ecd3b845f5a
Reviewed-on: https://boringssl-review.googlesource.com/1914
Reviewed-by: Adam Langley <agl@google.com>
kris/onging/CECPQ3_patch15
David Benjamin hace 10 años
committed by Adam Langley
padre
commit
f4b4952719
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. +2
    -2
      crypto/evp/p_rsa_asn1.c

+ 2
- 2
crypto/evp/p_rsa_asn1.c Ver fichero

@@ -588,7 +588,7 @@ err:
* is NULL parameters are passed to pkctx instead. */
static int rsa_pss_to_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pkctx,
X509_ALGOR *sigalg, EVP_PKEY *pkey) {
int ret = -1;
int ret = 0;
int saltlen;
const EVP_MD *mgf1md = NULL, *md = NULL;
RSA_PSS_PARAMS *pss;
@@ -597,7 +597,7 @@ static int rsa_pss_to_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pkctx,
/* Sanity check: make sure it is PSS */
if (OBJ_obj2nid(sigalg->algorithm) != NID_rsassaPss) {
OPENSSL_PUT_ERROR(EVP, rsa_pss_to_ctx, EVP_R_UNSUPPORTED_SIGNATURE_TYPE);
return -1;
return 0;
}
/* Decode PSS parameters */
pss = rsa_pss_decode(sigalg, &maskHash);


Cargando…
Cancelar
Guardar