diff options
author | Tomas Mraz <tmraz@fedoraproject.org> | 2020-11-18 16:22:08 +0100 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2020-11-26 17:39:26 +0100 |
commit | 2b407d050868c24ee36172e1abcfbfa0f003a98d (patch) | |
tree | 92dbb6a2bff12f7ab62814fc366bd6890a97734b /doc/man3/EVP_DigestInit.pod | |
parent | Fix regression in EVP_DigestInit_ex: crash when called with NULL type (diff) | |
download | openssl-2b407d050868c24ee36172e1abcfbfa0f003a98d.tar.xz openssl-2b407d050868c24ee36172e1abcfbfa0f003a98d.zip |
Documentation improvements for EVP_DigestInit_ex and related functions
Documenting when EVP_MD_CTX_reset() is implicitly called and when
type can be set to NULL.
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13402)
Diffstat (limited to '')
-rw-r--r-- | doc/man3/EVP_DigestInit.pod | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/doc/man3/EVP_DigestInit.pod b/doc/man3/EVP_DigestInit.pod index 0af06869aa..082f26370c 100644 --- a/doc/man3/EVP_DigestInit.pod +++ b/doc/man3/EVP_DigestInit.pod @@ -208,6 +208,10 @@ value explicitly fetched with EVP_MD_fetch(). If I<impl> is non-NULL, its implementation of the digest I<type> is used if there is one, and if not, the default implementation is used. +The I<type> parameter can be NULL if I<ctx> has been already initialized +with another EVP_DigestInit_ex() call and has not been reset with +EVP_MD_CTX_reset(). + =item EVP_DigestUpdate() Hashes I<cnt> bytes of data at I<d> into the digest context I<ctx>. This @@ -239,12 +243,13 @@ few bytes. =item EVP_DigestInit() Behaves in the same way as EVP_DigestInit_ex() except it always uses the -default digest implementation and calls EVP_MD_CTX_reset(). +default digest implementation and calls EVP_MD_CTX_reset() so it cannot +be used with an I<type> of NULL. =item EVP_DigestFinal() -Similar to EVP_DigestFinal_ex() except the digest context I<ctx> is -automatically cleaned up. +Similar to EVP_DigestFinal_ex() except after computing the digest +the digest context I<ctx> is automatically cleaned up with EVP_MD_CTX_reset(). =item EVP_MD_CTX_copy() |