Skip to content

Commit 189ed66

Browse files
committed
[CRYPTO] api: Show async type
This patch adds an async field to /proc/crypto for ablkcipher and aead algorithms. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent e7cd251 commit 189ed66

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

‎crypto/ablkcipher.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ static void crypto_ablkcipher_show(struct seq_file *m, struct crypto_alg *alg)
109109
struct ablkcipher_alg *ablkcipher = &alg->cra_ablkcipher;
110110

111111
seq_printf(m, "type : ablkcipher\n");
112+
seq_printf(m, "async : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
113+
"yes" : "no");
112114
seq_printf(m, "blocksize : %u\n", alg->cra_blocksize);
113115
seq_printf(m, "min keysize : %u\n", ablkcipher->min_keysize);
114116
seq_printf(m, "max keysize : %u\n", ablkcipher->max_keysize);
@@ -158,6 +160,8 @@ static void crypto_givcipher_show(struct seq_file *m, struct crypto_alg *alg)
158160
struct ablkcipher_alg *ablkcipher = &alg->cra_ablkcipher;
159161

160162
seq_printf(m, "type : givcipher\n");
163+
seq_printf(m, "async : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
164+
"yes" : "no");
161165
seq_printf(m, "blocksize : %u\n", alg->cra_blocksize);
162166
seq_printf(m, "min keysize : %u\n", ablkcipher->min_keysize);
163167
seq_printf(m, "max keysize : %u\n", ablkcipher->max_keysize);

‎crypto/aead.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ static void crypto_aead_show(struct seq_file *m, struct crypto_alg *alg)
115115
struct aead_alg *aead = &alg->cra_aead;
116116

117117
seq_printf(m, "type : aead\n");
118+
seq_printf(m, "async : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
119+
"yes" : "no");
118120
seq_printf(m, "blocksize : %u\n", alg->cra_blocksize);
119121
seq_printf(m, "ivsize : %u\n", aead->ivsize);
120122
seq_printf(m, "maxauthsize : %u\n", aead->maxauthsize);
@@ -169,6 +171,8 @@ static void crypto_nivaead_show(struct seq_file *m, struct crypto_alg *alg)
169171
struct aead_alg *aead = &alg->cra_aead;
170172

171173
seq_printf(m, "type : nivaead\n");
174+
seq_printf(m, "async : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
175+
"yes" : "no");
172176
seq_printf(m, "blocksize : %u\n", alg->cra_blocksize);
173177
seq_printf(m, "ivsize : %u\n", aead->ivsize);
174178
seq_printf(m, "maxauthsize : %u\n", aead->maxauthsize);

0 commit comments

Comments
 (0)