#include <zrtp_iface.h>
Data Fields | |
zrtp_status_t(* | on_init )(zrtp_global_t *zrtp) |
Cache initialization. | |
void(* | on_down )() |
Cache deinitialization. | |
zrtp_status_t(* | on_put )(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, zrtp_shared_secret_t *rss) |
Add/Update cache value. | |
zrtp_status_t(* | on_get )(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, zrtp_shared_secret_t *rss, int prev_requested) |
Return secret cache associated with specified pair of ZIDs. | |
zrtp_status_t(* | on_set_verified )(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, uint32_t verified) |
Set/clear cache verification flag. | |
zrtp_status_t(* | on_get_verified )(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, uint32_t *verified) |
Return cache verification flag. | |
zrtp_status_t(* | on_reset_since )(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid) |
Should set Secure Since cache aparemeter to current date and time. | |
zrtp_status_t(* | on_put_mitm )(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, zrtp_shared_secret_t *rss) |
Add/Update cache value for MiTM endpoint. | |
zrtp_status_t(* | on_get_mitm )(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, zrtp_shared_secret_t *rss) |
Return secret cache for MiTM endpoint. | |
zrtp_status_t(* | on_presh_counter_get )(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, uint32_t *counter) |
Return Preshared calls counter. | |
zrtp_status_t(* | on_presh_counter_set )(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, uint32_t counter) |
Increase/reset Preshared streams counter made between two endpoints (ZIDs). |
void(* on_down)() |
Cache deinitialization.
libzrtp calls this function when zrtp cache is no longer needed at zrtp_down().
zrtp_status_t(* on_get)(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, zrtp_shared_secret_t *rss, int prev_requested) |
Return secret cache associated with specified pair of ZIDs.
This function should return the secret associated with the specified pair of ZIDs. In addition to the secret value, TTL (rss->ttl) and cache timestamp (rss->lastused_at) value should be also returned.
one_zid | - one side's ZID; | |
another_zid | - the other side's ZID; | |
prev_requested | - if this parameter value is 1, the function should return the previous secret's value. If this parameter value is 0, the function should return the current secret's value; | |
rss | - structure that needs to be filled in. |
zrtp_status_t(* on_get_mitm)(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, zrtp_shared_secret_t *rss) |
Return secret cache for MiTM endpoint.
This function is analogy to zrtp_callback_cache_t::on_get but for MiTM endpoint.
zrtp_status_t(* on_get_verified)(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, uint32_t *verified) |
Return cache verification flag.
This function return the secret verification flag associated with a pair of ZIDs.
one_zid | - first ZID for cache identification; | |
another_zid | - second ZID for cache identification; | |
verified | - verification flag to be filled in |
zrtp_status_t(* on_init)(zrtp_global_t *zrtp) |
Cache initialization.
libzrtp calls this function before start using cache routine at zrtp_init().
zrtp | - libzrtp global context; |
zrtp_status_t(* on_presh_counter_get)(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, uint32_t *counter) |
Return Preshared calls counter.
This function should return the preshared calls counter associated with a pair of ZIDs.
one_zid | - first ZID for cache identification; | |
another_zid | - second ZID for cache identification; | |
counter | - preshared calls counter to be filled in |
zrtp_status_t(* on_presh_counter_set)(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, uint32_t counter) |
Increase/reset Preshared streams counter made between two endpoints (ZIDs).
This function should set the preshared calls counter associated with a pair of ZIDs. Function is optional and should be implemented if your prodict uses Preshared keys exchange.
one_zid | - first ZID for; | |
another_zid | - second ZID; | |
counter | - Preshared calls counter. |
zrtp_status_t(* on_put)(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, zrtp_shared_secret_t *rss) |
Add/Update cache value.
Interface function for entering the retained secret to the cache. This function should guarantee permanent storage in the cache. The implementation algorithm is the following:
one_zid | - ZID of one side; | |
another_zid | - ZID of the other side; | |
rss | - a structure storing the value of the secret that needs to be saved. |
zrtp_status_t(* on_put_mitm)(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, zrtp_shared_secret_t *rss) |
Add/Update cache value for MiTM endpoint.
This function is analogy to zrtp_callback_cache_t::on_put but for MiTM endpoint.
zrtp_status_t(* on_reset_since)(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid) |
Should set Secure Since cache aparemeter to current date and time.
This function is optional and may be ommited.
one_zid | - first ZID for cache identification; | |
another_zid | - second ZID for cache identification; |
zrtp_status_t(* on_set_verified)(const zrtp_stringn_t *one_zid, const zrtp_stringn_t *another_zid, uint32_t verified) |
Set/clear cache verification flag.
This function should set the secret verification flag associated with a pair of ZIDs.
one_zid | - first ZID for cache identification; | |
another_zid | - second ZID for cache identification; | |
verified | - verification flag (value can be 0 or 1). |