summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/tls.h
diff options
context:
space:
mode:
authorMichael Brown2012-03-20 18:05:37 +0100
committerMichael Brown2012-03-20 18:10:39 +0100
commit7869f71ae79392aed3fbeb76f449ee2132769d4b (patch)
treecbabc02226476c87f163e78e9d3f1a099b7d2c6e /src/include/ipxe/tls.h
parent[tls] Use hybrid MD5+SHA1 algorithm (diff)
downloadipxe-7869f71ae79392aed3fbeb76f449ee2132769d4b.tar.gz
ipxe-7869f71ae79392aed3fbeb76f449ee2132769d4b.tar.xz
ipxe-7869f71ae79392aed3fbeb76f449ee2132769d4b.zip
[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 <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/tls.h')
-rw-r--r--src/include/ipxe/tls.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/ipxe/tls.h b/src/include/ipxe/tls.h
index a491b795..0d1f2d85 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;