diff options
Diffstat (limited to 'crypto/crypto_user.c')
-rw-r--r-- | crypto/crypto_user.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c index 52459ae711a9..748990fa3c53 100644 --- a/crypto/crypto_user.c +++ b/crypto/crypto_user.c | |||
@@ -89,6 +89,21 @@ nla_put_failure: | |||
89 | return -EMSGSIZE; | 89 | return -EMSGSIZE; |
90 | } | 90 | } |
91 | 91 | ||
92 | static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) | ||
93 | { | ||
94 | struct crypto_report_comp rcomp; | ||
95 | |||
96 | snprintf(rcomp.type, CRYPTO_MAX_ALG_NAME, "%s", "compression"); | ||
97 | |||
98 | NLA_PUT(skb, CRYPTOCFGA_REPORT_COMPRESS, | ||
99 | sizeof(struct crypto_report_comp), &rcomp); | ||
100 | |||
101 | return 0; | ||
102 | |||
103 | nla_put_failure: | ||
104 | return -EMSGSIZE; | ||
105 | } | ||
106 | |||
92 | static int crypto_report_one(struct crypto_alg *alg, | 107 | static int crypto_report_one(struct crypto_alg *alg, |
93 | struct crypto_user_alg *ualg, struct sk_buff *skb) | 108 | struct crypto_user_alg *ualg, struct sk_buff *skb) |
94 | { | 109 | { |
@@ -127,6 +142,11 @@ static int crypto_report_one(struct crypto_alg *alg, | |||
127 | goto nla_put_failure; | 142 | goto nla_put_failure; |
128 | 143 | ||
129 | break; | 144 | break; |
145 | case CRYPTO_ALG_TYPE_COMPRESS: | ||
146 | if (crypto_report_comp(skb, alg)) | ||
147 | goto nla_put_failure; | ||
148 | |||
149 | break; | ||
130 | } | 150 | } |
131 | 151 | ||
132 | out: | 152 | out: |