nRF Connect SDK API 3.4.99
Loading...
Searching...
No Matches

◆ nrf_cloud_credentials_csr_generate()

int nrf_cloud_credentials_csr_generate ( uint32_t sec_tag,
const char * subject,
uint8_t * out,
size_t out_size,
size_t * out_len )

#include <include/net/nrf_cloud_credentials_keygen.h>

Generate a Certificate Signing Request (CSR) for the device key.

The CSR is signed by the on-device key through PSA and written to out in DER format.

Parameters
sec_tagThe security tag whose key is used to sign the CSR.
subjectX.509 subject name string (for example "O=Nordic,CN=<id>").
outDestination buffer for the DER-encoded CSR.
out_sizeSize of out in bytes.
out_lenOn success, set to the number of DER bytes written to out.
Return values
0If successful.
Returns
A negative value indicates an error.