From: Lucas De Marchi <lucas.de.marchi@gmail.com>
To: linux-modules@vger.kernel.org
Cc: Michal Marek <mmarek@suse.cz>,
Wouter van Kesteren <woutershep@gmail.com>,
Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [PATCH 3/3] libkmod-module: modinfo: print signature id
Date: Sun, 5 Jun 2016 00:13:49 -0300 [thread overview]
Message-ID: <1465096429-14024-3-git-send-email-lucas.de.marchi@gmail.com> (raw)
In-Reply-To: <1465096429-14024-1-git-send-email-lucas.de.marchi@gmail.com>
From: Lucas De Marchi <lucas.demarchi@intel.com>
This way it's possible to give at least the signature type for PKCS#7.
---
libkmod/libkmod-module.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/libkmod/libkmod-module.c b/libkmod/libkmod-module.c
index a19e8bc..39a081d 100644
--- a/libkmod/libkmod-module.c
+++ b/libkmod/libkmod-module.c
@@ -2247,6 +2247,12 @@ KMOD_EXPORT int kmod_module_get_info(const struct kmod_module *mod, struct kmod_
struct kmod_list *n;
char *key_hex;
+ n = kmod_module_info_append(list, "signature", strlen("sig_id"),
+ sig_info.id_type, strlen(sig_info.id_type));
+ if (n == NULL)
+ goto list_error;
+ count++;
+
n = kmod_module_info_append(list, "signer", strlen("signer"),
sig_info.signer, sig_info.signer_len);
if (n == NULL)
@@ -2286,7 +2292,7 @@ KMOD_EXPORT int kmod_module_get_info(const struct kmod_module *mod, struct kmod_
count++;
/*
- * Omit sig_info.id_type and sig_info.algo for now, as these
+ * Omit sig_info.algo for now, as these
* are currently constant.
*/
}
--
2.5.5
prev parent reply other threads:[~2016-06-05 3:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-05 3:13 [PATCH 1/3] libkmod-module: do not crash modinfo on 0 key id len Lucas De Marchi
2016-06-05 3:13 ` [PATCH 2/3] libkmod-signature: handle PKCS#7 Lucas De Marchi
2016-06-05 3:13 ` Lucas De Marchi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1465096429-14024-3-git-send-email-lucas.de.marchi@gmail.com \
--to=lucas.de.marchi@gmail.com \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.demarchi@intel.com \
--cc=mmarek@suse.cz \
--cc=woutershep@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).