Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272305
b: refs/heads/master
c: 540b97c
h: refs/heads/master
i:
  272303: fa77c33
v: v3
  • Loading branch information
Steffen Klassert authored and Herbert Xu committed Oct 21, 2011
1 parent 51bef0e commit fc04334
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 07a5fa4abd8b6965d4585d3b110f89bdf5612aff
refs/heads/master: 540b97c1dd9ee68112269be322d901f1edc1a282
20 changes: 20 additions & 0 deletions trunk/crypto/crypto_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit fc04334

Please sign in to comment.