Public/Private keys implement a has_fingerprint() method
This commit is contained in:
@@ -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_ @}*/
|
||||
|
||||
Reference in New Issue
Block a user