From 7869f71ae79392aed3fbeb76f449ee2132769d4b Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 20 Mar 2012 17:05:37 +0000 Subject: [tls] Treat handshake digest algorithm as a session parameter Simplify code by recording the active handshake digest algorithm as a session parameter. (Note that we must still accumulate digests for all supported algorithms, since we don't know which digest will eventually be used until we receive the Server Hello.) Signed-off-by: Michael Brown --- src/include/ipxe/tls.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/include') diff --git a/src/include/ipxe/tls.h b/src/include/ipxe/tls.h index a491b7958..0d1f2d85b 100644 --- a/src/include/ipxe/tls.h +++ b/src/include/ipxe/tls.h @@ -201,6 +201,10 @@ struct tls_session { uint8_t handshake_md5_sha1_ctx[MD5_SHA1_CTX_SIZE]; /** SHA256 context for handshake verification */ uint8_t handshake_sha256_ctx[SHA256_CTX_SIZE]; + /** Digest algorithm used for handshake verification */ + struct digest_algorithm *handshake_digest; + /** Digest algorithm context used for handshake verification */ + uint8_t *handshake_ctx; /** TX sequence number */ uint64_t tx_seq; -- cgit v1.2.3-55-g7522