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
@@ -96,6 +96,14 @@ struct private_key_t {
bool (*get_fingerprint)(private_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)(private_key_t *this, chunk_t fp);
/**
* Get the key in an encoded form as a chunk.
*
@@ -137,4 +145,13 @@ bool private_key_equals(private_key_t *this, private_key_t *other);
*/
bool private_key_belongs_to(private_key_t *private, public_key_t *public);
/**
* Generic private 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 private_key_has_fingerprint(private_key_t *this, chunk_t fingerprint);
#endif /** PRIVATE_KEY_H_ @}*/