diff options
author | Martin Willi <martin@strongswan.org> | 2009-08-27 09:57:49 +0200 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2009-08-27 09:57:49 +0200 |
commit | 2ee8cd04bdeac33c893c9b20c82e465e03b5a769 (patch) | |
tree | 9beed0a311f3133e38090523ab19fe05ce3f24db /src/libstrongswan/credentials/keys/key_encoding.h | |
parent | 277627043e704e97e912944b4e9867c22212409e (diff) | |
download | strongswan-2ee8cd04bdeac33c893c9b20c82e465e03b5a769.tar.bz2 strongswan-2ee8cd04bdeac33c893c9b20c82e465e03b5a769.tar.xz |
key encoding gained a cache() method, allows caching of externally created encodings
Diffstat (limited to 'src/libstrongswan/credentials/keys/key_encoding.h')
-rw-r--r-- | src/libstrongswan/credentials/keys/key_encoding.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libstrongswan/credentials/keys/key_encoding.h b/src/libstrongswan/credentials/keys/key_encoding.h index a338f07ad..0f70186c2 100644 --- a/src/libstrongswan/credentials/keys/key_encoding.h +++ b/src/libstrongswan/credentials/keys/key_encoding.h @@ -154,13 +154,26 @@ struct key_encoding_t { * * @param type format of the key encoding * @param cache key to use for caching, as given to encode() - * @encoding encoding result, internal data + * @param encoding encoding result, internal data * @return TRUE if cache entry found */ bool (*get_cache)(key_encoding_t *this, key_encoding_type_t type, void *cache, chunk_t *encoding); /** + * Cache a key encoding created externally. + * + * After calling cache(), the passed encoding is owned by the key encoding + * facility. + * + * @param type format of the key encoding + * @param cache key to use for caching, as given to encode() + * @param encoding encoding to cache, gets owned by this + */ + void (*cache)(key_encoding_t *this, key_encoding_type_t type, void *cache, + chunk_t encoding); + + /** * Register a key encoder function. * * @param encoder key encoder function to add |