size_t signer_len;
const char *key_id;
size_t key_id_len;
- const char *algo, *hash_algo, *id_type;
+ const char *hash_algo, *id_type;
const char *sig;
size_t sig_len;
void (*free)(void *);
PKEY_ALGO__LAST,
};
-static const char *const pkey_algo[PKEY_ALGO__LAST] = {
- [PKEY_ALGO_DSA] = "DSA",
- [PKEY_ALGO_RSA] = "RSA",
-};
-
enum pkey_hash_algo {
PKEY_HASH_MD4,
PKEY_HASH_MD5,
sig_info->signer = mem + size;
sig_info->signer_len = modsig->signer_len;
- sig_info->algo = pkey_algo[modsig->algo];
sig_info->hash_algo = pkey_hash_algo[modsig->hash];
return true;
return false;
size -= sizeof(struct module_signature);
memcpy(&modsig, mem + size, sizeof(struct module_signature));
+ /* The algo value seems to be hard-coded to PKEY_ALGO_RSA, so we don't bother
+ * parsing and/or printing it.
+ */
if (modsig.algo >= PKEY_ALGO__LAST || modsig.hash >= PKEY_HASH__LAST ||
modsig.id_type >= PKEY_ID_TYPE__LAST)
return false;