@@ -457,6 +457,28 @@ static int crypto_init_givcipher_ops(struct crypto_tfm *tfm, u32 type,
457
457
return 0 ;
458
458
}
459
459
460
+ static int crypto_givcipher_report (struct sk_buff * skb , struct crypto_alg * alg )
461
+ {
462
+ struct crypto_report_blkcipher rblkcipher ;
463
+
464
+ snprintf (rblkcipher .type , CRYPTO_MAX_ALG_NAME , "%s" , "givcipher" );
465
+ snprintf (rblkcipher .geniv , CRYPTO_MAX_ALG_NAME , "%s" ,
466
+ alg -> cra_ablkcipher .geniv ?: "<built-in>" );
467
+
468
+ rblkcipher .blocksize = alg -> cra_blocksize ;
469
+ rblkcipher .min_keysize = alg -> cra_ablkcipher .min_keysize ;
470
+ rblkcipher .max_keysize = alg -> cra_ablkcipher .max_keysize ;
471
+ rblkcipher .ivsize = alg -> cra_ablkcipher .ivsize ;
472
+
473
+ NLA_PUT (skb , CRYPTOCFGA_REPORT_BLKCIPHER ,
474
+ sizeof (struct crypto_report_blkcipher ), & rblkcipher );
475
+
476
+ return 0 ;
477
+
478
+ nla_put_failure :
479
+ return - EMSGSIZE ;
480
+ }
481
+
460
482
static void crypto_givcipher_show (struct seq_file * m , struct crypto_alg * alg )
461
483
__attribute__ ((unused ));
462
484
static void crypto_givcipher_show (struct seq_file * m , struct crypto_alg * alg )
@@ -479,6 +501,7 @@ const struct crypto_type crypto_givcipher_type = {
479
501
#ifdef CONFIG_PROC_FS
480
502
.show = crypto_givcipher_show ,
481
503
#endif
504
+ .report = crypto_givcipher_report ,
482
505
};
483
506
EXPORT_SYMBOL_GPL (crypto_givcipher_type );
484
507
0 commit comments