summaryrefslogtreecommitdiffstats
path: root/include/net/tls.h
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2018-11-02 09:00:55 +0200
committerJani Nikula <jani.nikula@intel.com>2018-11-02 09:01:28 +0200
commit7a085c3aad94cce7e11031c6800e41668418ae4c (patch)
treeb3474f8bd622f87ad39227057f9de60959c8bd95 /include/net/tls.h
parent18cde299df33ff73908f7e5dcebf321fb79ed36c (diff)
parentf9885ef875e9160454392f85159163674159c51f (diff)
downloadlinux-stable-7a085c3aad94cce7e11031c6800e41668418ae4c.tar.gz
linux-stable-7a085c3aad94cce7e11031c6800e41668418ae4c.tar.bz2
linux-stable-7a085c3aad94cce7e11031c6800e41668418ae4c.zip
Merge drm/drm-next into drm-intel-next-queued
Although there's nothing crucial missing, it's been a long time since the last backmerge. Catch up with drm-next. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
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 {
char *rec_seq;
};
+union tls_crypto_context {
+ struct tls_crypto_info info;
+ struct tls12_crypto_info_aes_gcm_128 aes_gcm_128;
+};
+
struct tls_context {
- union {
- struct tls_crypto_info crypto_send;
- struct tls12_crypto_info_aes_gcm_128 crypto_send_aes_gcm_128;
- };
- union {
- struct tls_crypto_info crypto_recv;
- struct tls12_crypto_info_aes_gcm_128 crypto_recv_aes_gcm_128;
- };
+ union tls_crypto_context crypto_send;
+ union tls_crypto_context crypto_recv;
struct list_head list;
struct net_device *netdev;
@@ -367,8 +366,8 @@ static inline void tls_fill_prepend(struct tls_context *ctx,
* size KTLS_DTLS_HEADER_SIZE + KTLS_DTLS_NONCE_EXPLICIT_SIZE
*/
buf[0] = record_type;
- buf[1] = TLS_VERSION_MINOR(ctx->crypto_send.version);
- buf[2] = TLS_VERSION_MAJOR(ctx->crypto_send.version);
+ buf[1] = TLS_VERSION_MINOR(ctx->crypto_send.info.version);
+ buf[2] = TLS_VERSION_MAJOR(ctx->crypto_send.info.version);
/* we can use IV for nonce explicit according to spec */
buf[3] = pkt_len >> 8;
buf[4] = pkt_len & 0xFF;