aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/af_alg.c6
-rw-r--r--include/crypto/if_alg.h1
-rw-r--r--include/uapi/linux/if_alg.h2
3 files changed, 9 insertions, 0 deletions
diff --git a/crypto/af_alg.c b/crypto/af_alg.c
index 6a3ad8011585..68ff1137dd70 100644
--- a/crypto/af_alg.c
+++ b/crypto/af_alg.c
@@ -421,6 +421,12 @@ int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con)
421 con->op = *(u32 *)CMSG_DATA(cmsg); 421 con->op = *(u32 *)CMSG_DATA(cmsg);
422 break; 422 break;
423 423
424 case ALG_SET_AEAD_ASSOCLEN:
425 if (cmsg->cmsg_len < CMSG_LEN(sizeof(u32)))
426 return -EINVAL;
427 con->aead_assoclen = *(u32 *)CMSG_DATA(cmsg);
428 break;
429
424 default: 430 default:
425 return -EINVAL; 431 return -EINVAL;
426 } 432 }
diff --git a/include/crypto/if_alg.h b/include/crypto/if_alg.h
index d61c11170213..cd62bf4289e9 100644
--- a/include/crypto/if_alg.h
+++ b/include/crypto/if_alg.h
@@ -42,6 +42,7 @@ struct af_alg_completion {
42struct af_alg_control { 42struct af_alg_control {
43 struct af_alg_iv *iv; 43 struct af_alg_iv *iv;
44 int op; 44 int op;
45 unsigned int aead_assoclen;
45}; 46};
46 47
47struct af_alg_type { 48struct af_alg_type {
diff --git a/include/uapi/linux/if_alg.h b/include/uapi/linux/if_alg.h
index 0f9acce5b1ff..f2acd2fde1f3 100644
--- a/include/uapi/linux/if_alg.h
+++ b/include/uapi/linux/if_alg.h
@@ -32,6 +32,8 @@ struct af_alg_iv {
32#define ALG_SET_KEY 1 32#define ALG_SET_KEY 1
33#define ALG_SET_IV 2 33#define ALG_SET_IV 2
34#define ALG_SET_OP 3 34#define ALG_SET_OP 3
35#define ALG_SET_AEAD_ASSOCLEN 4
36#define ALG_SET_AEAD_AUTHSIZE 5
35 37
36/* Operations */ 38/* Operations */
37#define ALG_OP_DECRYPT 0 39#define ALG_OP_DECRYPT 0