From fc04334bd2c15cfc4b8809cf5a751fc442d142ab Mon Sep 17 00:00:00 2001 From: Steffen Klassert Date: Tue, 27 Sep 2011 07:48:48 +0200 Subject: [PATCH] --- yaml --- r: 272305 b: refs/heads/master c: 540b97c1dd9ee68112269be322d901f1edc1a282 h: refs/heads/master i: 272303: fa77c336a571f85e61aa6393e1bc832f6f294d47 v: v3 --- [refs] | 2 +- trunk/crypto/crypto_user.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f34baaee4038..b5edde2f3634 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 07a5fa4abd8b6965d4585d3b110f89bdf5612aff +refs/heads/master: 540b97c1dd9ee68112269be322d901f1edc1a282 diff --git a/trunk/crypto/crypto_user.c b/trunk/crypto/crypto_user.c index 52459ae711a9..748990fa3c53 100644 --- a/trunk/crypto/crypto_user.c +++ b/trunk/crypto/crypto_user.c @@ -89,6 +89,21 @@ static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) return -EMSGSIZE; } +static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) +{ + struct crypto_report_comp rcomp; + + snprintf(rcomp.type, CRYPTO_MAX_ALG_NAME, "%s", "compression"); + + NLA_PUT(skb, CRYPTOCFGA_REPORT_COMPRESS, + sizeof(struct crypto_report_comp), &rcomp); + + return 0; + +nla_put_failure: + return -EMSGSIZE; +} + static int crypto_report_one(struct crypto_alg *alg, struct crypto_user_alg *ualg, struct sk_buff *skb) { @@ -126,6 +141,11 @@ static int crypto_report_one(struct crypto_alg *alg, if (crypto_report_cipher(skb, alg)) goto nla_put_failure; + break; + case CRYPTO_ALG_TYPE_COMPRESS: + if (crypto_report_comp(skb, alg)) + goto nla_put_failure; + break; }