Fix for DH max size calc not including DH_Pub.

This commit is contained in:
David Garske
2018-08-08 17:08:28 -07:00
parent 7b83db0f65
commit ff7d2fefdc
2 changed files with 2 additions and 2 deletions

View File

@ -306,7 +306,7 @@ static int wolfSSL_BIO_BIO_write(WOLFSSL_BIO* bio, const void* data,
WOLFSSL_ENTER("wolfSSL_BIO_BIO_write");
/*adding in sanity checks for static analysis tools */
/* adding in sanity checks for static analysis tools */
if (bio == NULL || data == NULL) {
return BAD_FUNC_ARG;
}

View File

@ -1158,7 +1158,7 @@ enum Misc {
MAX_COMP_EXTRA = 1024, /* max compression extra */
MAX_MTU = WOLFSSL_MAX_MTU, /* max expected MTU */
MAX_UDP_SIZE = 8192 - 100, /* was MAX_MTU - 100 */
MAX_DH_SZ = (MAX_DHKEY_SZ * 2) + 12,
MAX_DH_SZ = (MAX_DHKEY_SZ * 3) + 12, /* DH_P, DH_G and DH_Pub */
/* 4096 p, pub, g + 2 byte size for each */
MAX_STR_VERSION = 8, /* string rep of protocol version */