diff options
-rw-r--r-- | net/tls/tls_sw.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index e28a6ff25d96..f29b7c49cbf2 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c | |||
@@ -1136,7 +1136,6 @@ void tls_sw_free_resources_rx(struct sock *sk) | |||
1136 | 1136 | ||
1137 | int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx, int tx) | 1137 | int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx, int tx) |
1138 | { | 1138 | { |
1139 | char keyval[TLS_CIPHER_AES_GCM_128_KEY_SIZE]; | ||
1140 | struct tls_crypto_info *crypto_info; | 1139 | struct tls_crypto_info *crypto_info; |
1141 | struct tls12_crypto_info_aes_gcm_128 *gcm_128_info; | 1140 | struct tls12_crypto_info_aes_gcm_128 *gcm_128_info; |
1142 | struct tls_sw_context_tx *sw_ctx_tx = NULL; | 1141 | struct tls_sw_context_tx *sw_ctx_tx = NULL; |
@@ -1265,9 +1264,7 @@ int tls_set_sw_offload(struct sock *sk, struct tls_context *ctx, int tx) | |||
1265 | 1264 | ||
1266 | ctx->push_pending_record = tls_sw_push_pending_record; | 1265 | ctx->push_pending_record = tls_sw_push_pending_record; |
1267 | 1266 | ||
1268 | memcpy(keyval, gcm_128_info->key, TLS_CIPHER_AES_GCM_128_KEY_SIZE); | 1267 | rc = crypto_aead_setkey(*aead, gcm_128_info->key, |
1269 | |||
1270 | rc = crypto_aead_setkey(*aead, keyval, | ||
1271 | TLS_CIPHER_AES_GCM_128_KEY_SIZE); | 1268 | TLS_CIPHER_AES_GCM_128_KEY_SIZE); |
1272 | if (rc) | 1269 | if (rc) |
1273 | goto free_aead; | 1270 | goto free_aead; |