diff options
Diffstat (limited to 'fips/rsa/fips_rsastest.c')
-rw-r--r-- | fips/rsa/fips_rsastest.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/fips/rsa/fips_rsastest.c b/fips/rsa/fips_rsastest.c index 72e75a3cc6..a96f277e6a 100644 --- a/fips/rsa/fips_rsastest.c +++ b/fips/rsa/fips_rsastest.c @@ -325,15 +325,12 @@ static int rsa_printsig(FILE *out, RSA *rsa, const EVP_MD *dgst, unsigned char *sigbuf = NULL; int i, siglen, pad_mode; /* EVP_PKEY structure */ - EVP_MD_CTX ctx; siglen = RSA_size(rsa); sigbuf = OPENSSL_malloc(siglen); if (!sigbuf) goto error; - FIPS_md_ctx_init(&ctx); - if (Saltlen >= 0) pad_mode = RSA_PKCS1_PSS_PADDING; else if (Saltlen == -2) @@ -341,16 +338,10 @@ static int rsa_printsig(FILE *out, RSA *rsa, const EVP_MD *dgst, else pad_mode = RSA_PKCS1_PADDING; - if (!FIPS_digestinit(&ctx, dgst)) - goto error; - if (!FIPS_digestupdate(&ctx, Msg, Msglen)) - goto error; - if (!FIPS_rsa_sign_ctx(rsa, &ctx, pad_mode, Saltlen, NULL, + if (!FIPS_rsa_sign(rsa, Msg, Msglen, dgst, pad_mode, Saltlen, NULL, sigbuf, (unsigned int *)&siglen)) goto error; - FIPS_md_ctx_cleanup(&ctx); - fputs("S = ", out); for (i = 0; i < siglen; i++) |