Golioth Firmware SDK
Loading...
Searching...
No Matches
golioth_pki

Functions

enum golioth_status golioth_pki_issue_cert (struct golioth_client *client, const uint8_t *csr, size_t csr_size, golioth_post_cb_fn callback, void *callback_arg)
 

Detailed Description

Functions for interacting with Golioth Public Key Infrastructure services

Function Documentation

◆ golioth_pki_issue_cert()

enum golioth_status golioth_pki_issue_cert ( struct golioth_client * client,
const uint8_t * csr,
size_t csr_size,
golioth_post_cb_fn callback,
void * callback_arg )

Request a new certificate from the configured PKI provider

Posts a Certificate Signing Request (CSR) to the PKI provider, which returns a signed certificate for the device.

The CSR must be a DER encoded PKCS #10 object signed by the private key the device uses for authenticating with Golioth. If successful, a DER encoded X.509 certificate is returned.

All fields in the CSR subject are optional, but if present, the Organization and Common Name fields must contain the device's project and certificate ID, respectively. The configured PKI provider may have additional restrictions on the CSR's subject, format or extensions.

Parameters
clientThe client handle from golioth_client_create
csrA DER formatted Certificate Signing Request.
csr_sizeThe size of the CSR
callbackCallback to call on response received.
callback_argCallback argument, passed directly when callback invoked. Can be NULL.