| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {void} {gnutls_anti_replay_set_add_function} (gnutls_anti_replay_t @var{anti_replay}, gnutls_db_add_func @var{add_func}) |
| 6 |
@var{anti_replay}: is a @code{gnutls_anti_replay_t} type. |
| 7 |
|
| 8 |
@var{add_func}: is the function. |
| 9 |
|
| 10 |
Sets the function that will be used to store an entry if it is not |
| 11 |
already present in the resumed sessions database. This function returns 0 |
| 12 |
if the entry is successfully stored, and a negative error code |
| 13 |
otherwise. In particular, if the entry is found in the database, |
| 14 |
it returns @code{GNUTLS_E_DB_ENTRY_EXISTS} . |
| 15 |
|
| 16 |
The arguments to the @code{add_func} are: |
| 17 |
- @code{ptr} : the pointer set with @code{gnutls_anti_replay_set_ptr()} |
| 18 |
- @code{exp_time} : the expiration time of the entry |
| 19 |
- @code{key} : a pointer to the key |
| 20 |
- @code{data} : a pointer to data to store |
| 21 |
|
| 22 |
The data set by this function can be examined using |
| 23 |
@code{gnutls_db_check_entry_expire_time()} and @code{gnutls_db_check_entry_time()} . |
| 24 |
|
| 25 |
@strong{Since:} 3.6.5 |
| 26 |
@end deftypefun |