2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

Pass the digest buffer length to EVP_DigestSignFinal

OpenSSL 3.0.1 does not accept 0 as a digest buffer length when
calling EVP_DigestSignFinal as it now checks that the digest buffer
length is large enough for the digest.  Pass the digest buffer
length instead.
This commit is contained in:
Mark Andrews
2021-12-15 21:27:49 +11:00
parent 9e77e51f72
commit a23507c4fa
5 changed files with 23 additions and 21 deletions

View File

@@ -252,7 +252,7 @@ sign(unsigned char *data, unsigned int length, unsigned char *hmac,
isc_result_t result;
isccc_region_t source, target;
unsigned char digest[ISC_MAX_MD_SIZE];
unsigned int digestlen;
unsigned int digestlen = sizeof(digest);
unsigned char digestb64[HSHA_LENGTH + 4];
source.rstart = digest;
@@ -375,7 +375,7 @@ verify(isccc_sexpr_t *alist, unsigned char *data, unsigned int length,
isc_result_t result;
isccc_sexpr_t *_auth, *hmac;
unsigned char digest[ISC_MAX_MD_SIZE];
unsigned int digestlen;
unsigned int digestlen = sizeof(digest);
unsigned char digestb64[HSHA_LENGTH * 4];
/*