[tls] Record ServerKeyExchange record, if provided

Accept and record the ServerKeyExchange record, which is required for
key exchange mechanisms such as Ephemeral Diffie-Hellman (DHE).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2022-10-11 13:49:57 +01:00
parent 028aac99a3
commit 80c45c5c71
2 changed files with 40 additions and 0 deletions

View File

@@ -310,6 +310,10 @@ struct tls_connection {
uint8_t server_random[32];
/** Client random bytes */
struct tls_client_random client_random;
/** Server Key Exchange record (if any) */
void *server_key;
/** Server Key Exchange record length */
size_t server_key_len;
/** MD5+SHA1 context for handshake verification */
uint8_t handshake_md5_sha1_ctx[MD5_SHA1_CTX_SIZE];
/** SHA256 context for handshake verification */