]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
libkmod-module: modinfo: print signature id
authorLucas De Marchi <lucas.demarchi@intel.com>
Sun, 5 Jun 2016 03:09:22 +0000 (00:09 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 27 Jun 2016 11:17:55 +0000 (08:17 -0300)
This way it's possible to give at least the signature type for PKCS#7.

libkmod/libkmod-module.c

index b7b5daae80b8e6d1744b43f59b226ec491b23a36..bf6a8d60f7c4ea48a724d7d48636fcfe70e51106 100644 (file)
@@ -2255,6 +2255,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)
@@ -2294,7 +2300,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.
                 */
        }