Re: [PATCH v2 2/3] libkmod: Return module signature information in kmod_module_get_info()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 21.1.2013 16:31, David Howells wrote:
> Michal Marek <mmarek@xxxxxxx> wrote:
> 
>> +		if (sig_info.algo) {

struct kmod_signature_info is the textual representation already. The
libkmod/libkmod-signature.c file has copies of the PKEY_* enums and the
patch checks for PKEY_ALGO_RSA and PKEY_ID_X509:

+       if (modsig->algo == PKEY_ALGO_RSA)
+               /*
+                * Current kernels only support RSA, exclude it to not
+                * pollute modinfo output with obvious information.
+                */
+               sig_info->algo = NULL;
+       else
+               sig_info->algo = modsig->algo < PKEY_ALGO__LAST ?
+                       pkey_algo[modsig->algo] : "unknown";
...
+       if (modsig->id_type == PKEY_ID_X509)
+               /* Current kernels only support X.509. */
+               sig_info->id_type = NULL;
+       else
+               sig_info->id_type = modsig->id_type < PKEY_ID_TYPE__LAST ?
+                       pkey_id_type[modsig->id_type] : "unknown";

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux