Skip to content

Commit

Permalink
doc: nrf: lib: modem_key_mgmt: Correct signature for _read()
Browse files Browse the repository at this point in the history
Correct signature for modem_key_mgmt_read(). It takes a pointer
to the length.

Signed-off-by: Eivind Jølsgard <[email protected]>
  • Loading branch information
eivindj-nordic authored and rlubos committed Oct 8, 2024
1 parent 71b94bc commit 2c7add3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion doc/nrf/libraries/modem/modem_key_mgmt.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,11 @@ The following code snippet shows how to read a CA chain certificate stored in th
int err;
char cert[CERT_SIZE];
size_t len;
err = modem_key_mgmt_read(<YOUR_SEC_TAG>, MODEM_KEY_MGMT_CRED_TYPE_CA_CHAIN, cert, sizeof(cert));
len = sizeof(cert);
err = modem_key_mgmt_read(<YOUR_SEC_TAG>, MODEM_KEY_MGMT_CRED_TYPE_CA_CHAIN, cert, &len);
if (err) {
printk("Failed to read certificate\n");
}
Expand Down

0 comments on commit 2c7add3

Please sign in to comment.