aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tls.h')
-rw-r--r--include/net/tls.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/include/net/tls.h b/include/net/tls.h
index d5c683e8bb22..0a769cf2f5f3 100644
--- a/include/net/tls.h
+++ b/include/net/tls.h
@@ -171,15 +171,14 @@ struct cipher_context {
171 char *rec_seq; 171 char *rec_seq;
172}; 172};
173 173
174union tls_crypto_context {
175 struct tls_crypto_info info;
176 struct tls12_crypto_info_aes_gcm_128 aes_gcm_128;
177};
178
174struct tls_context { 179struct tls_context {
175 union { 180 union tls_crypto_context crypto_send;
176 struct tls_crypto_info crypto_send; 181 union tls_crypto_context crypto_recv;
177 struct tls12_crypto_info_aes_gcm_128 crypto_send_aes_gcm_128;
178 };
179 union {
180 struct tls_crypto_info crypto_recv;
181 struct tls12_crypto_info_aes_gcm_128 crypto_recv_aes_gcm_128;
182 };
183 182
184 struct list_head list; 183 struct list_head list;
185 struct net_device *netdev; 184 struct net_device *netdev;
@@ -367,8 +366,8 @@ static inline void tls_fill_prepend(struct tls_context *ctx,
367 * size KTLS_DTLS_HEADER_SIZE + KTLS_DTLS_NONCE_EXPLICIT_SIZE 366 * size KTLS_DTLS_HEADER_SIZE + KTLS_DTLS_NONCE_EXPLICIT_SIZE
368 */ 367 */
369 buf[0] = record_type; 368 buf[0] = record_type;
370 buf[1] = TLS_VERSION_MINOR(ctx->crypto_send.version); 369 buf[1] = TLS_VERSION_MINOR(ctx->crypto_send.info.version);
371 buf[2] = TLS_VERSION_MAJOR(ctx->crypto_send.version); 370 buf[2] = TLS_VERSION_MAJOR(ctx->crypto_send.info.version);
372 /* we can use IV for nonce explicit according to spec */ 371 /* we can use IV for nonce explicit according to spec */
373 buf[3] = pkt_len >> 8; 372 buf[3] = pkt_len >> 8;
374 buf[4] = pkt_len & 0xFF; 373 buf[4] = pkt_len & 0xFF;