signature: do not report wrong data for pkc#7 signature
authorYauheni Kaliuta <yauheni.kaliuta@redhat.com>
Fri, 16 Nov 2018 08:56:34 +0000 (10:56 +0200)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 16 Nov 2018 08:59:44 +0000 (00:59 -0800)
commita11057201ed326a9e65e757202da960735e45799
tree7f1007177ef8977b4bb0a75a6af9b59dc8f63390
parent068729e3688cbe7eb5a51821f14a668cca314ddf
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>
libkmod/libkmod-module.c
libkmod/libkmod-signature.c