Merge pull request #1892 from dgarske/ecdhe_keysize

Fix for ephemeral key size selection
pull/1893/head
toddouska 2018-10-25 07:27:20 -07:00 committed by GitHub
commit 23445546c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -4021,7 +4021,8 @@ int TLSX_ValidateSupportedCurves(WOLFSSL* ssl, byte first, byte second) {
defSz = octets;
}
if (currOid == 0 && ssl->eccTempKeySz <= octets)
/* The eccTempKeySz is the preferred ephemeral key size */
if (currOid == 0 && ssl->eccTempKeySz == octets)
currOid = oid;
if ((nextOid == 0 || nextSz > octets) && ssl->eccTempKeySz <= octets) {
nextOid = oid;