C API for BALTECH SDK

§ brp_pki_get_dev_cert()

BRP_LIB brp_errcode brp_pki_get_dev_cert ( brp_protocol  protocol,
brp_buf  dev_cert_buf,
size_t  dev_cert_buf_size,
size_t *  dev_cert_len 
)

This command retrieves the certificate of the device which it created a PKI connection to.

Returns
BRP_OK on success or BRP_ERR_BUFFER_OVERFLOW if dev_cert_buf_size is smaller than the device certificates actual size.
Parameters
protocolan opened pki protocol handle
dev_cert_bufa pointer to a buffer, where the device's certificate shall be returned. Will only be written if BRP_OK is returned. May be NULL if dev_cert_buf_size is 0.
dev_cert_buf_sizethe size of 'dev_cert_buf'
dev_cert_lenreturns the actual size of the certificate. Will be even set to the actual size of the certificate, if dev_cert_buf_size is smaller.