From patchwork Sun Jun 5 03:13:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lucas De Marchi X-Patchwork-Id: 9155065 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B8C6960221 for ; Sun, 5 Jun 2016 03:14:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ADF91272AA for ; Sun, 5 Jun 2016 03:14:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A2BA2282E8; Sun, 5 Jun 2016 03:14:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, FSL_HELO_HOME, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46455272AA for ; Sun, 5 Jun 2016 03:14:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751411AbcFEDOT (ORCPT ); Sat, 4 Jun 2016 23:14:19 -0400 Received: from mail-qg0-f65.google.com ([209.85.192.65]:36111 "EHLO mail-qg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751342AbcFEDOT (ORCPT ); Sat, 4 Jun 2016 23:14:19 -0400 Received: by mail-qg0-f65.google.com with SMTP id k43so3221247qgk.3 for ; Sat, 04 Jun 2016 20:14:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uLn9dz39ACyZe/r2h/h83xVe+79qw+D3kvVf5zpaPzA=; b=ZazJS0L+a33Le4k17afoQi1O/BKidolTBhDWzVoqS/k4yJAIGn9ROWcMSeE3iVjxhj KjWVH9NnptvG3mpIs+3Y6a7x+pz8Exhibo4ZjAmBQd5WGH2/yjX0VXM0FCTh37Mu8/Ra fXgnb7AJW99UrDmNkfPAstZPmVobd9WO6N1r4zStb2oy3IiQTabfcbVYqXJ9t3ASODDZ iZFfuKOX6iBCb8I6Nnp0IY61EKfGm3YOgVgWV6LOpBJWLW4sXX++p2SbaSAyyWog7Prm 6T9k7fwv45AsE3lwu1wgieeIb2c5/iAZ0FPh+lxOYG7t91+4DPeql854B0q/1XHete52 E98g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uLn9dz39ACyZe/r2h/h83xVe+79qw+D3kvVf5zpaPzA=; b=AFVQ26HC88XVaIOHJjbKjv+IA3iYgHiA7+O/ooBdVJn7889CPCZQXJbsSFjjYtB+3J d2mLw0zx5kPPw7CJDHYMkwmC81xwqOFNfwFeEMUjFHwGvqsyHyG5E+Mywylm4mZfJ7Pc yYqbzpmcDvIFoqMheiyW51pf2D8ufT1aq78lT4GyFJdKt08NIesEJXw8b7QlK6d0N+HG Az94YQDELfgI4QjhRzVm4CIntqK1OGrmYFkOFh517O+xLRm5+7xQekyqBGuOMgRsC2OZ J6LX86wgZg0TgWjrnSXcWOf5wbgmG5WhjcsOGI5c7p2bespUDPdGr5a8ZcbEF8xz8E7c KcXw== X-Gm-Message-State: ALyK8tJkeEYAAyANFOxdkcycjdkuhP1lNHeKj3051pffPGGMMJcyhQhq1YVIxEnWOypV0g== X-Received: by 10.140.167.193 with SMTP id n184mr719941qhn.23.1465096458412; Sat, 04 Jun 2016 20:14:18 -0700 (PDT) Received: from ldmartin-mobl.home ([177.188.72.96]) by smtp.gmail.com with ESMTPSA id t65sm3658723qhe.23.2016.06.04.20.14.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Jun 2016 20:14:17 -0700 (PDT) From: Lucas De Marchi To: linux-modules@vger.kernel.org Cc: Michal Marek , Wouter van Kesteren , Lucas De Marchi Subject: [PATCH 3/3] libkmod-module: modinfo: print signature id Date: Sun, 5 Jun 2016 00:13:49 -0300 Message-Id: <1465096429-14024-3-git-send-email-lucas.de.marchi@gmail.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1465096429-14024-1-git-send-email-lucas.de.marchi@gmail.com> References: <1465096429-14024-1-git-send-email-lucas.de.marchi@gmail.com> Sender: owner-linux-modules@vger.kernel.org Precedence: bulk List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Lucas De Marchi 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. */ }