Public/Private keys implement a has_fingerprint() method

This commit is contained in:
Martin Willi
2009-09-21 16:47:25 +02:00
parent fde7f5abf8
commit 640ed4d5a5
14 changed files with 83 additions and 0 deletions
@@ -154,6 +154,14 @@ struct public_key_t {
bool (*get_fingerprint)(public_key_t *this, key_encoding_type_t type,
chunk_t *fp);
/**
* Check if a key has a given fingerprint of any kind.
*
* @param fp fingerprint to check
* @return TRUE if key has given fingerprint
*/
bool (*has_fingerprint)(public_key_t *this, chunk_t fp);
/**
* Get the key in an encoded form as a chunk.
*
@@ -186,6 +194,15 @@ struct public_key_t {
*/
bool public_key_equals(public_key_t *this, public_key_t *other);
/**
* Generic public key has_fingerprint() implementation, usable by implementors.
*
* @param this key to check fingerprint
* @param fp fingerprint to check
* @return TRUE if key has given fingerprint
*/
bool public_key_has_fingerprint(public_key_t *this, chunk_t fingerprint);
/**
* Conversion of ASN.1 signature or hash OID to signature scheme.
*