diff options
Diffstat (limited to 'fips/rsa')
-rw-r--r-- | fips/rsa/fips_rsa_sign.c | 4 | ||||
-rw-r--r-- | fips/rsa/fips_rsastest.c | 8 | ||||
-rw-r--r-- | fips/rsa/fips_rsavtest.c | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/fips/rsa/fips_rsa_sign.c b/fips/rsa/fips_rsa_sign.c index fc5c28d8a0..f54d890e73 100644 --- a/fips/rsa/fips_rsa_sign.c +++ b/fips/rsa/fips_rsa_sign.c @@ -197,7 +197,7 @@ int FIPS_rsa_sign_ctx(RSA *rsa, EVP_MD_CTX *ctx, { unsigned int md_len, rv; unsigned char md[EVP_MAX_MD_SIZE]; - EVP_DigestFinal_ex(ctx, md, &md_len); + FIPS_digestfinal(ctx, md, &md_len); rv = FIPS_rsa_sign_digest(rsa, md, md_len, M_EVP_MD_CTX_md(ctx), rsa_pad_mode, saltlen, @@ -300,7 +300,7 @@ int FIPS_rsa_verify_ctx(RSA *rsa, EVP_MD_CTX *ctx, { unsigned int md_len, rv; unsigned char md[EVP_MAX_MD_SIZE]; - EVP_DigestFinal_ex(ctx, md, &md_len); + FIPS_digestfinal(ctx, md, &md_len); rv = FIPS_rsa_verify_digest(rsa, md, md_len, M_EVP_MD_CTX_md(ctx), rsa_pad_mode, saltlen, mgf1Hash, sigbuf, siglen); diff --git a/fips/rsa/fips_rsastest.c b/fips/rsa/fips_rsastest.c index 9dff464a36..3f84c1c0b6 100644 --- a/fips/rsa/fips_rsastest.c +++ b/fips/rsa/fips_rsastest.c @@ -331,7 +331,7 @@ static int rsa_printsig(FILE *out, RSA *rsa, const EVP_MD *dgst, if (!sigbuf) goto error; - EVP_MD_CTX_init(&ctx); + FIPS_md_ctx_init(&ctx); if (Saltlen >= 0) pad_mode = RSA_PKCS1_PSS_PADDING; @@ -340,15 +340,15 @@ static int rsa_printsig(FILE *out, RSA *rsa, const EVP_MD *dgst, else pad_mode = RSA_PKCS1_PADDING; - if (!EVP_DigestInit_ex(&ctx, dgst, NULL)) + if (!FIPS_digestinit(&ctx, dgst)) goto error; - if (!EVP_DigestUpdate(&ctx, Msg, Msglen)) + if (!FIPS_digestupdate(&ctx, Msg, Msglen)) goto error; if (!FIPS_rsa_sign_ctx(rsa, &ctx, pad_mode, Saltlen, NULL, sigbuf, (unsigned int *)&siglen)) goto error; - EVP_MD_CTX_cleanup(&ctx); + FIPS_md_ctx_cleanup(&ctx); fputs("S = ", out); diff --git a/fips/rsa/fips_rsavtest.c b/fips/rsa/fips_rsavtest.c index 0971f15fc0..06ade8d04a 100644 --- a/fips/rsa/fips_rsavtest.c +++ b/fips/rsa/fips_rsavtest.c @@ -332,7 +332,7 @@ static int rsa_printver(FILE *out, if (!rsa_pubkey->n || !rsa_pubkey->e) goto error; - EVP_MD_CTX_init(&ctx); + FIPS_md_ctx_init(&ctx); if (Saltlen >= 0) pad_mode = RSA_PKCS1_PSS_PADDING; @@ -341,9 +341,9 @@ static int rsa_printver(FILE *out, else pad_mode = RSA_PKCS1_PADDING; - if (!EVP_DigestInit_ex(&ctx, dgst, NULL)) + if (!FIPS_digestinit(&ctx, dgst)) goto error; - if (!EVP_DigestUpdate(&ctx, Msg, Msglen)) + if (!FIPS_digestupdate(&ctx, Msg, Msglen)) goto error; no_err = 1; @@ -352,7 +352,7 @@ static int rsa_printver(FILE *out, no_err = 0; - EVP_MD_CTX_cleanup(&ctx); + FIPS_md_ctx_cleanup(&ctx); if (r < 0) goto error; |