|
AWS IoT Device SDK C:
Fleet Provisioning
AWS IoT Fleet Provisioning
|
| Return to main page ↑ |
Implements the internal serializer functions of the Provisioning library. More...
#include "iot_config.h"#include <string.h>#include "iot_error.h"#include "private/aws_iot_provisioning_internal.h"#include "iot_logging_setup.h"Functions | |
| static bool | _checkSuccess (IotSerializerError_t error) |
Wrapper for assert checking the passed serializer error code for IOT_SERIALIZER_SUCCESS value. More... | |
| static bool | _checkSuccessOrBufferToSmall (IotSerializerError_t error) |
Wrapper for assert checking the passed serializer error code for either IOT_SERIALIZER_SUCCESS or IOT_SERIALIZER_BUFFER_TOO_SMALL values. More... | |
| static AwsIotProvisioningError_t | _serializeCreateKeysAndCertificateRequestPayload (IotSerializerEncoderObject_t *pOutermostEncoder, uint8_t *pSerializationBuffer, size_t bufferSize) |
| Performs serialization operations on the passed buffer for creating the MQTT request payload for the CreateKeysAndCertification operation. More... | |
| static AwsIotProvisioningError_t | _serializeCertFromCsrPayload (const char *pCertificateSigningRequest, size_t csrLength, IotSerializerEncoderObject_t *pEncoder, bool isDrySerialization) |
| Common utility for serializing CreateCertificateFromCsr service API request payload used by _AwsIotProvisioning_CalculateCertFromCsrPayloadSize and _AwsIotProvisioning_SerializeCreateCertFromCsrRequestPayload functions. More... | |
| static AwsIotProvisioningError_t | _serializeRegisterThingRequestPayload (const AwsIotProvisioningRegisterThingRequestInfo_t *pRequestData, IotSerializerEncoderObject_t *pOutermostEncoder, uint8_t *pSerializationBuffer, size_t bufferSize) |
| Performs serializes operations on the passed buffer for creating the MQTT request payload for the RegisterThing operation. More... | |
| AwsIotProvisioningError_t | _AwsIotProvisioning_SerializeCreateKeysAndCertificateRequestPayload (uint8_t **pSerializationBuffer, size_t *pBufferSize) |
| Serializes payload data for MQTT request to the Fleet Provisioning CreateKeysAndCertificate API on AWS IoT Core. More... | |
| AwsIotProvisioningError_t | _AwsIotProvisioning_CalculateCertFromCsrPayloadSize (const char *pCertificateSigningRequest, size_t csrLength, size_t *pPayloadSize) |
| Calculates the payload size of serializing the passed Certificate-Signing Request data for the MQTT CreateCertificateFromCsr service API. More... | |
| AwsIotProvisioningError_t | _AwsIotProvisioning_SerializeCreateCertFromCsrRequestPayload (const char *pCertificateSigningRequest, size_t csrLength, uint8_t *pSerializationBuffer, size_t bufferSize) |
| Serializes payload data for the request to the MQTT CreateCertificateFromCsr service API, in the passed buffer. More... | |
| AwsIotProvisioningError_t | _AwsIotProvisioning_SerializeRegisterThingRequestPayload (const AwsIotProvisioningRegisterThingRequestInfo_t *pRequestData, uint8_t **pSerializationBuffer, size_t *pBufferSize) |
| Serializes payload data for MQTT request to the Provisioning RegisterThing service API. More... | |
| size_t | _AwsIotProvisioning_GenerateRegisterThingTopicFilter (const char *pTemplateName, size_t templateNameLength, char *pTopicFilterBuffer) |
| Utility for generating the request/response MQTT topic filter string for the ProvisioningDevice service API. More... | |
Variables | |
| static const size_t | _numKeysAndCertMapEntries = 0u |
| Represents the number of map entries in the request payload of the MQTT CreateKeysAndCertificate service API. | |
| static const size_t | _numCertFromCsrMapEntries = 1u |
| Represents the number of map entries in the request payload of the MQTT CreateCertificateFromCsr service API. The ONLY payload entry is for the Certificate-Signing Request string. | |
Implements the internal serializer functions of the Provisioning library.
|
static |
Wrapper for assert checking the passed serializer error code for IOT_SERIALIZER_SUCCESS value.
This should be used for asserting serializer status codes when performing actual serialization into a buffer.
| [in] | error | The serializer error code to assert check. |
|
static |
Wrapper for assert checking the passed serializer error code for either IOT_SERIALIZER_SUCCESS or IOT_SERIALIZER_BUFFER_TOO_SMALL values.
This should be used for asserting serializer status codes when performing a serialization dry-run (i.e. serializing without a buffer) to calculate the total size of data that serialization will generate.
| [in] | error | The serializer error code to assert check. |
|
static |
Performs serialization operations on the passed buffer for creating the MQTT request payload for the CreateKeysAndCertification operation.
| [in] | pOutermostEncoder | The outermost encoder object to use for serialization. |
| [out] | pSerializationBuffer | The buffer to store the serialized payload data. |
| [in] | bufferSize | The size of the serialization buffer. |
|
static |
Common utility for serializing CreateCertificateFromCsr service API request payload used by _AwsIotProvisioning_CalculateCertFromCsrPayloadSize and _AwsIotProvisioning_SerializeCreateCertFromCsrRequestPayload functions.
| [in] | pCertificateSigningRequest | The Certificate-Signing Request string to serialize for the request. |
| [in] | csrLength | The length of the Certificate-Signing Request string. |
| [in] | pEncoder | The encoder object representing the buffer to serialize the payload in. |
| [in] | isDrySerialization | A dry-run serialization flag to represent whether the serialization operation will occur without a buffer. |
|
static |
Performs serializes operations on the passed buffer for creating the MQTT request payload for the RegisterThing operation.
| [in] | pRequestData | The data that will be serialized for sending with the request. |
| [in] | pOutermostEncoder | The outermost encoder object to use for serialization. |
| [out] | pSerializationBuffer | The buffer to store the serialized payload data. |
| [in] | bufferSize | The size of the serialization buffer. |
| AwsIotProvisioningError_t _AwsIotProvisioning_SerializeCreateKeysAndCertificateRequestPayload | ( | uint8_t ** | pSerializationBuffer, |
| size_t * | pBufferSize | ||
| ) |
Serializes payload data for MQTT request to the Fleet Provisioning CreateKeysAndCertificate API on AWS IoT Core.
| [out] | pSerializationBuffer | This will be assigned to a buffer that will be allocated and populated with the serialized payload data. |
| [out] | pBufferSize | This will be populated with the size of the allocated payload data buffer. |
| AwsIotProvisioningError_t _AwsIotProvisioning_CalculateCertFromCsrPayloadSize | ( | const char * | pCertificateSigningRequest, |
| size_t | csrLength, | ||
| size_t * | pPayloadSize | ||
| ) |
Calculates the payload size of serializing the passed Certificate-Signing Request data for the MQTT CreateCertificateFromCsr service API.
| [in] | pCertificateSigningRequest | The Certificate-Signing Request string which represents the data to be serialized in the payload. |
| [in] | csrLength | The length of the Certificate-Signing Request string. |
| [in] | pPayloadSize | This will be populated with the size of the serialized data. |
| AwsIotProvisioningError_t _AwsIotProvisioning_SerializeCreateCertFromCsrRequestPayload | ( | const char * | pCertificateSigningRequest, |
| size_t | csrLength, | ||
| uint8_t * | pSerializationBuffer, | ||
| size_t | pBufferSize | ||
| ) |
Serializes payload data for the request to the MQTT CreateCertificateFromCsr service API, in the passed buffer.
| [in] | pCertificateSigningRequest | The Certificate-Signing Request string to serialize for the request. |
| [in] | csrLength | The length of the Certificate-Signing Request string. |
| [in,out] | pSerializationBuffer | The buffer for storing the serialized payload data. |
| [in] | pBufferSize | THe size of the serialization buffer. |
| AwsIotProvisioningError_t _AwsIotProvisioning_SerializeRegisterThingRequestPayload | ( | const AwsIotProvisioningRegisterThingRequestInfo_t * | pRequestData, |
| uint8_t ** | pSerializationBuffer, | ||
| size_t * | pBufferSize | ||
| ) |
Serializes payload data for MQTT request to the Provisioning RegisterThing service API.
| [in] | pRequestData | The data that will be serialized for sending with the request. |
| [out] | pSerializationBuffer | This will be assigned to a buffer that will be allocated and populated with the serialized payload data. |
| [out] | pBufferSize | This will be populated with the size of the allocated payload data buffer. |
| size_t _AwsIotProvisioning_GenerateRegisterThingTopicFilter | ( | const char * | pTemplateName, |
| size_t | templateNameLength, | ||
| char * | pTopicFilterBuffer | ||
| ) |
Utility for generating the request/response MQTT topic filter string for the ProvisioningDevice service API.
| [in] | pTemplateName | The template ID string for inserting in the topic filter string. |
| [in] | templateNameLength | The length of the template ID string. |
| [out] | pTopicFilterBuffer | The pre-allocated buffer for storing the generated topic filter. The buffer should have the required minimum size for storing the MQTT topic filter for the Provisioning RegisterThing API. |