Rationale for duplicating the pkey context in EVP_DigestVerifyFinal

Christian Schmidt schmidt at digadd.de
Wed Nov 1 10:42:04 UTC 2023


Hi,

In EVP_DigestVerifyFinal() in crypto/evp/m_sigver.c this code exists:

[...]
     dctx = EVP_PKEY_CTX_dup(pctx);
     if (dctx == NULL)
         return 0;

     r = dctx->op.sig.signature->digest_verify_final(dctx->op.sig.algctx,
                                                     sig, siglen);
     EVP_PKEY_CTX_free(dctx);
[...]

I wonder why this is is duplicated before the final so I can handle the 
duplication according to the intention for an Ed25519 Init-Update-Final 
implementation?

Best regards,
Chris


More information about the openssl-users mailing list