diff options
author | Jonathan Corbet <corbet@lwn.net> | 2016-12-27 12:53:44 -0700 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2016-12-27 12:53:44 -0700 |
commit | 1bd9a34ffdd5f22ef74ed68b5d8b6fb4b781d58c (patch) | |
tree | 3f9b77b397ec915c0eb026a9b6425e82fa843e67 /crypto/crypto_user.c | |
parent | 239a79b2f922a0614334cef0aab2f8a23a4e54f9 (diff) | |
parent | 46cc85f2e4aef88c237a0407cf5d163619a4d565 (diff) | |
download | linux-crypto-1bd9a34ffdd5f22ef74ed68b5d8b6fb4b781d58c.tar.gz linux-crypto-1bd9a34ffdd5f22ef74ed68b5d8b6fb4b781d58c.zip |
Merge tag 'v4.10-rc1' into docs-next
Linux 4.10-rc1
Diffstat (limited to '')
-rw-r--r-- | crypto/crypto_user.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c index 1c570548..a90404a0 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c @@ -112,6 +112,21 @@ nla_put_failure: return -EMSGSIZE; } +static int crypto_report_acomp(struct sk_buff *skb, struct crypto_alg *alg) +{ + struct crypto_report_acomp racomp; + + strncpy(racomp.type, "acomp", sizeof(racomp.type)); + + if (nla_put(skb, CRYPTOCFGA_REPORT_ACOMP, + sizeof(struct crypto_report_acomp), &racomp)) + goto nla_put_failure; + return 0; + +nla_put_failure: + return -EMSGSIZE; +} + static int crypto_report_akcipher(struct sk_buff *skb, struct crypto_alg *alg) { struct crypto_report_akcipher rakcipher; @@ -186,7 +201,11 @@ static int crypto_report_one(struct crypto_alg *alg, goto nla_put_failure; break; + case CRYPTO_ALG_TYPE_ACOMPRESS: + if (crypto_report_acomp(skb, alg)) + goto nla_put_failure; + break; case CRYPTO_ALG_TYPE_AKCIPHER: if (crypto_report_akcipher(skb, alg)) goto nla_put_failure; |