24
24
#include <linux/module.h>
25
25
#include <linux/seq_file.h>
26
26
#include <linux/string.h>
27
+ #include <linux/cryptouser.h>
28
+ #include <net/netlink.h>
27
29
28
30
#include <crypto/compress.h>
29
31
#include <crypto/internal/compress.h>
@@ -46,6 +48,21 @@ static int crypto_pcomp_init_tfm(struct crypto_tfm *tfm)
46
48
return 0 ;
47
49
}
48
50
51
+ static int crypto_pcomp_report (struct sk_buff * skb , struct crypto_alg * alg )
52
+ {
53
+ struct crypto_report_comp rpcomp ;
54
+
55
+ snprintf (rpcomp .type , CRYPTO_MAX_ALG_NAME , "%s" , "pcomp" );
56
+
57
+ NLA_PUT (skb , CRYPTOCFGA_REPORT_COMPRESS ,
58
+ sizeof (struct crypto_report_comp ), & rpcomp );
59
+
60
+ return 0 ;
61
+
62
+ nla_put_failure :
63
+ return - EMSGSIZE ;
64
+ }
65
+
49
66
static void crypto_pcomp_show (struct seq_file * m , struct crypto_alg * alg )
50
67
__attribute__ ((unused ));
51
68
static void crypto_pcomp_show (struct seq_file * m , struct crypto_alg * alg )
@@ -60,6 +77,7 @@ static const struct crypto_type crypto_pcomp_type = {
60
77
#ifdef CONFIG_PROC_FS
61
78
.show = crypto_pcomp_show ,
62
79
#endif
80
+ .report = crypto_pcomp_report ,
63
81
.maskclear = ~CRYPTO_ALG_TYPE_MASK ,
64
82
.maskset = CRYPTO_ALG_TYPE_MASK ,
65
83
.type = CRYPTO_ALG_TYPE_PCOMPRESS ,
0 commit comments