summaryrefslogtreecommitdiff
path: root/libkmod/libkmod-module.c
diff options
context:
space:
mode:
authorYauheni Kaliuta <yauheni.kaliuta@redhat.com>2018-11-16 10:56:34 +0200
committerLucas De Marchi <lucas.demarchi@intel.com>2018-11-16 00:59:44 -0800
commita11057201ed326a9e65e757202da960735e45799 (patch)
tree7f1007177ef8977b4bb0a75a6af9b59dc8f63390 /libkmod/libkmod-module.c
parent068729e3688cbe7eb5a51821f14a668cca314ddf (diff)
downloadkmod-a11057201ed326a9e65e757202da960735e45799.tar.gz
kmod-a11057201ed326a9e65e757202da960735e45799.tar.bz2
kmod-a11057201ed326a9e65e757202da960735e45799.zip
signature: do not report wrong data for pkc#7 signature
when PKC#7 signing method is used the old structure doesn't contain any useful data, but the data are encoded in the certificate. The info getting/showing code is not aware of that at the moment and since 0 is a valid constant, shows, for example, wrong "md4" for the hash algo. The patch splits the 2 mothods of gethering the info and reports "unknown" for the algo. Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
Diffstat (limited to 'libkmod/libkmod-module.c')
-rw-r--r--libkmod/libkmod-module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
index ee420f4..889f264 100644
--- a/libkmod/libkmod-module.c
+++ b/libkmod/libkmod-module.c
@@ -2273,7 +2273,7 @@ KMOD_EXPORT int kmod_module_get_info(const struct kmod_module *mod, struct kmod_
struct kmod_elf *elf;
char **strings;
int i, count, ret = -ENOMEM;
- struct kmod_signature_info sig_info;
+ struct kmod_signature_info sig_info = {};
if (mod == NULL || list == NULL)
return -ENOENT;