Always go the legacy route if EVP_MD_CTX_FLAG_NO_INIT is set
authorMatt Caswell <matt@openssl.org>
Thu, 9 Jan 2020 15:58:19 +0000 (15:58 +0000)
committerMatt Caswell <matt@openssl.org>
Mon, 13 Jan 2020 13:50:06 +0000 (13:50 +0000)
commit557d673783f82795e8ae8ca71b0092f9dbdaaeef
tree44c1633f1ac207c3238015383e99106e854382c1
parent0ae5d4d6f8a0cd17fb9beb5876827f311c1b350c
Always go the legacy route if EVP_MD_CTX_FLAG_NO_INIT is set

If we're using an explicitly fetched digest in an EVP_DigestUpdate
operation, then we should still go the legacy route if
EVP_MD_CTX_FLAG_NO_INIT has been set because we are being used in the
context of a legacy signature algorithm and EVP_DigestInit has not been
called.

This fixes a seg fault in EVP_DigestSignUpdate()

Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10796)
crypto/evp/digest.c