diff options
author | Yauheni Kaliuta <yauheni.kaliuta@redhat.com> | 2017-04-11 15:15:03 +0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2017-04-11 09:04:28 -0700 |
commit | e5b6a658eab9f1fa6405e2ac98930723b7f2bbfd (patch) | |
tree | 6976f005407753110ebd2a387310580a35cafbb8 /libkmod/libkmod-signature.c | |
parent | abcd0bf8ec6623b26cddee3c2a9175b786957600 (diff) | |
download | kmod-e5b6a658eab9f1fa6405e2ac98930723b7f2bbfd.tar.gz kmod-e5b6a658eab9f1fa6405e2ac98930723b7f2bbfd.tar.bz2 kmod-e5b6a658eab9f1fa6405e2ac98930723b7f2bbfd.zip |
libkmod: modinfo: implement signature output
Signature was ignored from the modinfo. Implement its parsing
from the module data and add its output to the modinfo utility.
Signed-off-by: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
Diffstat (limited to 'libkmod/libkmod-signature.c')
-rw-r--r-- | libkmod/libkmod-signature.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libkmod/libkmod-signature.c b/libkmod/libkmod-signature.c index ef5fe6e..1f3e26d 100644 --- a/libkmod/libkmod-signature.c +++ b/libkmod/libkmod-signature.c @@ -134,7 +134,11 @@ bool kmod_module_signature_info(const struct kmod_file *file, struct kmod_signat size < (int64_t)(modsig->signer_len + modsig->key_id_len + sig_len)) return false; - size -= modsig->key_id_len + sig_len; + size -= sig_len; + sig_info->sig = mem + size; + sig_info->sig_len = sig_len; + + size -= modsig->key_id_len; sig_info->key_id = mem + size; sig_info->key_id_len = modsig->key_id_len; |