summaryrefslogtreecommitdiff
path: root/crypto/asymmetric_keys/asymmetric_keys.h
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2014-09-16 17:36:11 +0100
committerDavid Howells <dhowells@redhat.com>2014-09-16 17:36:11 +0100
commit57c2e45a010d72febc9c37522716f035e67ea20c (patch)
tree731f3475fea852313c8ae78a2b20fcec2d12fe86 /crypto/asymmetric_keys/asymmetric_keys.h
parent0a8526d3c545a4f59f75a1609667310097b435aa (diff)
downloadlinux-crypto-57c2e45a010d72febc9c37522716f035e67ea20c.tar.gz
linux-crypto-57c2e45a010d72febc9c37522716f035e67ea20c.zip
KEYS: Implement binary asymmetric key ID handling
Implement the first step in using binary key IDs for asymmetric keys rather than hex string keys. The previously added match data preparsing will be able to convert hex criterion strings into binary which can then be compared more rapidly. Further, we actually want more then one ID string per public key. The problem is that X.509 certs refer to other X.509 certs by matching Issuer + AuthKeyId to Subject + SubjKeyId, but PKCS#7 messages match against X.509 Issuer + SerialNumber. This patch just provides facilities for a later patch to make use of. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'crypto/asymmetric_keys/asymmetric_keys.h')
-rw-r--r--crypto/asymmetric_keys/asymmetric_keys.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/crypto/asymmetric_keys/asymmetric_keys.h b/crypto/asymmetric_keys/asymmetric_keys.h
index a63c551c..917be6b9 100644
--- a/crypto/asymmetric_keys/asymmetric_keys.h
+++ b/crypto/asymmetric_keys/asymmetric_keys.h
@@ -10,6 +10,10 @@
*/
int asymmetric_keyid_match(const char *kid, const char *id);
+extern bool asymmetric_match_key_ids(const struct asymmetric_key_ids *kids,
+ const struct asymmetric_key_id *match_id);
+
+extern struct asymmetric_key_id *asymmetric_key_hex_to_key_id(const char *id);
static inline const char *asymmetric_key_id(const struct key *key)
{