mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	[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>
This commit is contained in:
		
							parent
							
								
									e7cd2514ea
								
							
						
					
					
						commit
						189ed66e95
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -109,6 +109,8 @@ static void crypto_ablkcipher_show(struct seq_file *m, struct crypto_alg *alg)
 | 
				
			||||||
	struct ablkcipher_alg *ablkcipher = &alg->cra_ablkcipher;
 | 
						struct ablkcipher_alg *ablkcipher = &alg->cra_ablkcipher;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	seq_printf(m, "type         : ablkcipher\n");
 | 
						seq_printf(m, "type         : ablkcipher\n");
 | 
				
			||||||
 | 
						seq_printf(m, "async        : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
 | 
				
			||||||
 | 
										     "yes" : "no");
 | 
				
			||||||
	seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
 | 
						seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
 | 
				
			||||||
	seq_printf(m, "min keysize  : %u\n", ablkcipher->min_keysize);
 | 
						seq_printf(m, "min keysize  : %u\n", ablkcipher->min_keysize);
 | 
				
			||||||
	seq_printf(m, "max keysize  : %u\n", ablkcipher->max_keysize);
 | 
						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)
 | 
				
			||||||
	struct ablkcipher_alg *ablkcipher = &alg->cra_ablkcipher;
 | 
						struct ablkcipher_alg *ablkcipher = &alg->cra_ablkcipher;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	seq_printf(m, "type         : givcipher\n");
 | 
						seq_printf(m, "type         : givcipher\n");
 | 
				
			||||||
 | 
						seq_printf(m, "async        : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
 | 
				
			||||||
 | 
										     "yes" : "no");
 | 
				
			||||||
	seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
 | 
						seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
 | 
				
			||||||
	seq_printf(m, "min keysize  : %u\n", ablkcipher->min_keysize);
 | 
						seq_printf(m, "min keysize  : %u\n", ablkcipher->min_keysize);
 | 
				
			||||||
	seq_printf(m, "max keysize  : %u\n", ablkcipher->max_keysize);
 | 
						seq_printf(m, "max keysize  : %u\n", ablkcipher->max_keysize);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -115,6 +115,8 @@ static void crypto_aead_show(struct seq_file *m, struct crypto_alg *alg)
 | 
				
			||||||
	struct aead_alg *aead = &alg->cra_aead;
 | 
						struct aead_alg *aead = &alg->cra_aead;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	seq_printf(m, "type         : aead\n");
 | 
						seq_printf(m, "type         : aead\n");
 | 
				
			||||||
 | 
						seq_printf(m, "async        : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
 | 
				
			||||||
 | 
										     "yes" : "no");
 | 
				
			||||||
	seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
 | 
						seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
 | 
				
			||||||
	seq_printf(m, "ivsize       : %u\n", aead->ivsize);
 | 
						seq_printf(m, "ivsize       : %u\n", aead->ivsize);
 | 
				
			||||||
	seq_printf(m, "maxauthsize  : %u\n", aead->maxauthsize);
 | 
						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)
 | 
				
			||||||
	struct aead_alg *aead = &alg->cra_aead;
 | 
						struct aead_alg *aead = &alg->cra_aead;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	seq_printf(m, "type         : nivaead\n");
 | 
						seq_printf(m, "type         : nivaead\n");
 | 
				
			||||||
 | 
						seq_printf(m, "async        : %s\n", alg->cra_flags & CRYPTO_ALG_ASYNC ?
 | 
				
			||||||
 | 
										     "yes" : "no");
 | 
				
			||||||
	seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
 | 
						seq_printf(m, "blocksize    : %u\n", alg->cra_blocksize);
 | 
				
			||||||
	seq_printf(m, "ivsize       : %u\n", aead->ivsize);
 | 
						seq_printf(m, "ivsize       : %u\n", aead->ivsize);
 | 
				
			||||||
	seq_printf(m, "maxauthsize  : %u\n", aead->maxauthsize);
 | 
						seq_printf(m, "maxauthsize  : %u\n", aead->maxauthsize);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue