aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/credentials/keys/public_key.h
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-08-24 14:04:23 +0200
committerMartin Willi <martin@strongswan.org>2009-08-26 11:23:52 +0200
commit1384a42e1b212ed8dd56112a151e0efde45c06e4 (patch)
tree36417f053f0edfb00b71e35330a88ce55c58b0ed /src/libstrongswan/credentials/keys/public_key.h
parent1ef69b01abd50fa3ca3a88ad76b87cf7386c6e78 (diff)
downloadstrongswan-1384a42e1b212ed8dd56112a151e0efde45c06e4.tar.bz2
strongswan-1384a42e1b212ed8dd56112a151e0efde45c06e4.tar.xz
changed get_id/get_encoding API of private/public key to use new encoding framework
Diffstat (limited to 'src/libstrongswan/credentials/keys/public_key.h')
-rw-r--r--src/libstrongswan/credentials/keys/public_key.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/libstrongswan/credentials/keys/public_key.h b/src/libstrongswan/credentials/keys/public_key.h
index 6cab37d2d..294a9568a 100644
--- a/src/libstrongswan/credentials/keys/public_key.h
+++ b/src/libstrongswan/credentials/keys/public_key.h
@@ -137,23 +137,26 @@ struct public_key_t {
* @return strength of the key in bytes
*/
size_t (*get_keysize) (public_key_t *this);
-
+
/**
- * Get a unique key identifier, such as a hash over the key.
- *
- * @param type type of the key ID to get
- * @return unique ID of the key as identification_t, or NULL
+ * Get the fingerprint of the key.
+ *
+ * @param type type of fingerprint, one of KEY_ID_*
+ * @param fp fingerprint, points to internal data
+ * @return TRUE if fingerprint type supported
*/
- identification_t* (*get_id) (public_key_t *this, id_type_t type);
+ bool (*get_fingerprint)(public_key_t *this, key_encoding_type_t type,
+ chunk_t *fp);
/**
- * Get an encoded form of the key.
- *
- * @todo Do we need a encoding type specification?
+ * Get the key in an encoded form as a chunk.
*
- * @return allocated chunk containing encoded key
+ * @param type type of the encoding, one of KEY_PRIV_*
+ * @param encoding encoding of the key, allocated
+ * @return TRUE if encoding supported
*/
- chunk_t (*get_encoding)(public_key_t *this);
+ bool (*get_encoding)(public_key_t *this, key_encoding_type_t type,
+ chunk_t *encoding);
/**
* Increase the refcount of the key.