Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15354)
signature context I<ctx>. This function can be called several times on the
same I<ctx> to include additional data.
-EVP_DigestSignFinal() signs the data in I<ctx> and places the signature in I<sig>.
-If I<sig> is NULL then the maximum size of the output buffer is written to
+Unless I<sig> is NULL EVP_DigestSignFinal() signs the data in I<ctx>
+and places the signature in I<sig>.
+Otherwise the maximum necessary size of the output buffer is written to
the I<siglen> parameter. If I<sig> is not NULL then before the call the
I<siglen> parameter should contain the length of the I<sig> buffer. If the
call is successful the signature is written to I<sig> and the amount of data