BALTECH Docs |
C API for BALTECH SDK
|
BRP_LIB brp_errcode brp_pki_save_session | ( | brp_protocol | protocol, |
brp_buf | persistent_buf, | ||
size_t | peristent_buf_size, | ||
size_t * | persistent_buf_actlen | ||
) |
This command stores the current PKI session state in a persistent storage for being continued later using brp_pki_restore_session().
This command freezes the current session, e.g. in a database, and finishes the current process. When the device is reconnected later, you can use brp_pki_restore_session() to restore the session without having to re-authenticate (which requires about 30 secs).
ATTENTION:
protocol | a PKI protocol handle that shall be saved |
persistent_buf | a pointer to a buffer where to store the session. If NULL, persistent_buf_size has to be 0, too (persistent_buf_len will be set anyway) |
peristent_buf_size | size of persistent_session in bytes |
persistent_buf_actlen | actual length of persistent_session in bytes. If NULL, this parameter will be ignored. |