C API for BALTECH SDK

§ brp_pki_restore_session()

BRP_LIB brp_errcode brp_pki_restore_session ( brp_protocol  protocol,
brp_buf  persistent_buf,
size_t  persistent_buf_size 
)

This command reloads the current PKI session that was stored by brp_pki_save_session().

This command must be run between brp_create_pki() and brp_open(), as otherwise opening a pki protocol runs a complete authentication sequence.

dev = brp_create(...);
brp_set_io(dev, ...);
brp_restore_session(dev, ...);
brp_open(dev);
Returns
BRP_OK on success or BRP_ERR_INVALID_API_CALL if persistent_buf is invalid.
Parameters
protocola pki protocol handle, that shall be saved
persistent_bufa pointer to a buffer from where to load the session
persistent_buf_sizesize of persistent_session in bytes