Re: [PATCH 08/13] KEYS: Overhaul key identification when searching for asymmetric keys

From: David Howells
Date: Fri Oct 03 2014 - 08:21:14 EST


Dmitry Kasatkin <dmitry.kasatkin@xxxxxxxxx> wrote:

> What is this 6865612e68326732?

It's the tail of the first ID attached to the key (there may be more than
one). As this is derived from an X.509 cert, that will be the serial number
plus the ASN.1 encoded issuer name.

To quote from the description in the patch:

(1) Use the previously created asymmetric_key_id struct to hold the following
key IDs derived from the X.509 certificate or PKCS#7 message:

id: serial number + issuer
skid: subjKeyId + subject
authority: authKeyId + issuer

(2) Replace the hex fingerprint attached to key->type_data[1] with an
asymmetric_key_ids struct containing the id and the skid (if present).

If you turn the hex into chars, you will see "hea.h2g2"

I'm open to suggestions about the best way to represent the auxiliary IDs in
/proc/keys - but don't forget there can be more than one.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/