nabto_device_set_root_certs()

DESCRIPTION

Set root certs

By default the device is configured to trust “Nabto Root CA 1”. This behavior can be overridden by the following function. All trusted root certs should be in the string and be encoded as PEM. The certs are copied into the device so the string can be freed after the call.

Root certs are used to validate the connection to the basestation.

DECLARATION

NABTO_DEVICE_DECL_PREFIX NabtoDeviceError NABTO_DEVICE_API
nabto_device_set_root_certs(NabtoDevice* device, const char* roots)

PARAMETERS

device:
[in] The device
roots:
[in] Root certs encoded as pem.

RETURN VALUES

NABTO_DEVICE_EC_OK iff ok NABTO_DEVICE_INVALID_STATE if device is started

EXAMPLES

None.