mirror of
https://github.com/ipxe/ipxe
synced 2026-02-04 15:09:29 +03:00
[tls] Abstract out concept of a TLS authentication header
All TLS cipher types use a common structure for the per-record data that is authenticated in addition to the plaintext itself. This data is used as a prefix in the HMAC calculation for stream and block ciphers, or as additional authenticated data for AEAD ciphers. Define a "TLS authentication header" structure to hold this data as a contiguous block, in order to meet the alignment requirement for AEAD ciphers such as GCM. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -122,6 +122,14 @@ struct tls_header {
|
||||
/* TLS renegotiation information extension */
|
||||
#define TLS_RENEGOTIATION_INFO 0xff01
|
||||
|
||||
/** TLS authentication header */
|
||||
struct tls_auth_header {
|
||||
/** Sequence number */
|
||||
uint64_t seq;
|
||||
/** TLS header */
|
||||
struct tls_header header;
|
||||
} __attribute__ (( packed ));
|
||||
|
||||
/** TLS verification data */
|
||||
struct tls_verify_data {
|
||||
/** Client verification data */
|
||||
|
||||
Reference in New Issue
Block a user