Merge pull request #3266 from dgarske/unit_test

Fix for DH compute key compatibility function failure
This commit is contained in:
toddouska
2020-09-02 10:23:23 -07:00
committed by GitHub
3 changed files with 8 additions and 3 deletions

View File

@@ -29795,7 +29795,7 @@ int wolfSSL_DH_compute_key(unsigned char* key, WOLFSSL_BIGNUM* otherPub,
privSz = wolfSSL_BN_bn2bin(dh->priv_key, priv);
pubSz = wolfSSL_BN_bn2bin(otherPub, pub);
if (dh->inSet == 0 && SetDhInternal(dh) != SSL_SUCCESS){
WOLFSSL_MSG("Bad DH set internal");
WOLFSSL_MSG("Bad DH set internal");
}
if (privSz <= 0 || pubSz <= 0)
WOLFSSL_MSG("Bad BN2bin set");
@@ -29811,6 +29811,8 @@ int wolfSSL_DH_compute_key(unsigned char* key, WOLFSSL_BIGNUM* otherPub,
XFREE(priv, NULL, DYNAMIC_TYPE_PRIVATE_KEY);
#endif
WOLFSSL_LEAVE("wolfSSL_DH_compute_key", ret);
return ret;
}