xref: /linux/crypto/asymmetric_keys/asymmetric_keys.h (revision 7901c1a8effbe5f89673bfc09d6e37b8f334f1a7)
1964f3b3bSDavid Howells /* Internal definitions for asymmetric key type
2964f3b3bSDavid Howells  *
3964f3b3bSDavid Howells  * Copyright (C) 2012 Red Hat, Inc. All Rights Reserved.
4964f3b3bSDavid Howells  * Written by David Howells (dhowells@redhat.com)
5964f3b3bSDavid Howells  *
6964f3b3bSDavid Howells  * This program is free software; you can redistribute it and/or
7964f3b3bSDavid Howells  * modify it under the terms of the GNU General Public Licence
8964f3b3bSDavid Howells  * as published by the Free Software Foundation; either version
9964f3b3bSDavid Howells  * 2 of the Licence, or (at your option) any later version.
10964f3b3bSDavid Howells  */
11964f3b3bSDavid Howells 
12b3426827SDmitry Kasatkin int asymmetric_keyid_match(const char *kid, const char *id);
13*7901c1a8SDavid Howells extern bool asymmetric_match_key_ids(const struct asymmetric_key_ids *kids,
14*7901c1a8SDavid Howells 				     const struct asymmetric_key_id *match_id);
15*7901c1a8SDavid Howells 
16*7901c1a8SDavid Howells extern struct asymmetric_key_id *asymmetric_key_hex_to_key_id(const char *id);
17b3426827SDmitry Kasatkin 
18964f3b3bSDavid Howells static inline const char *asymmetric_key_id(const struct key *key)
19964f3b3bSDavid Howells {
20964f3b3bSDavid Howells 	return key->type_data.p[1];
21964f3b3bSDavid Howells }
22