Pass static ephemeral keys for TLS v1.2 as well.

This commit is contained in:
David Garske
2020-11-11 14:23:06 -08:00
parent a6f2081af1
commit cdf44f6ff6

View File

@@ -2426,6 +2426,14 @@ static int ProcessClientKeyExchange(const byte* input, int* sslBytes,
}
XMEMSET(&keys, 0, sizeof(keys));
#ifdef WOLFSSL_STATIC_EPHEMERAL
#ifndef NO_DH
keys.dhKey = session->sslServer->staticKE.dhKey;
#endif
#ifdef HAVE_ECC
keys.ecKey = session->sslServer->staticKE.ecKey;
#endif
#endif
keys.rsaKey = session->sslServer->buffers.key;
return SetupKeys(input, sslBytes, session, error, NULL, &keys);
}