- Mais recentes
- Mais votos
- Mais comentários
I added a new demo https://github.com/giuspen/aws-iot-device-sdk-embedded-C/tree/GP_fleet_provisioning_keys_cert_demo/demos/fleet_provisioning/fleet_provisioning_keys_cert based on the CreateKeysAndCertificate API where it is possible to save the new private key and certificate defining DOWNLOADED_CERT_WRITE_PATH and DOWNLOADED_PRIVATE_KEY_WRITE_PATH
Hi Giuseppe. Since that demo uses a CSR for fleet provisioning, only a certificate will be generated. No new private key is created.
More information here: https://docs.aws.amazon.com/iot/latest/developerguide/fleet-provision-api.html
The demo uses the corePKCS11 library: https://github.com/FreeRTOS/corePKCS11. This is a mock implementation. A soft hardware security module. The certificate created by fleet provisioning is saved as an object within this. That is what this message refers to:
[INFO] [PKCS11] [core_pkcs11_mbedtls.c:2918] Creating a 0x1 type object.
This comes from here: https://github.com/FreeRTOS/corePKCS11/blob/db05642c6c1f97055128f17c7962d7daf725d3c5/source/portable/mbedtls/core_pkcs11_mbedtls.c#L2918
Which I believe works its way down to here: https://github.com/FreeRTOS/corePKCS11/blob/db05642c6c1f97055128f17c7962d7daf725d3c5/source/portable/os/core_pkcs11_pal_utils.c#L67
And if so, the file created by the mock PKCS11 is named as shown here: https://github.com/FreeRTOS/corePKCS11/blob/db05642c6c1f97055128f17c7962d7daf725d3c5/source/portable/os/core_pkcs11_pal_utils.c#L47
However, this is not a PEM file because PKCS11 is being simulated. It's a DER file. So you may be best advised to use the ID returned here:
[INFO] [FLEET_PROVISIONING_DEMO] [fleet_provisioning_with_csr_demo.c:621] Received certificate with Id: XXXX
And get the certificate using the CLI or console.
Conteúdo relevante
- AWS OFICIALAtualizada há 9 meses
- AWS OFICIALAtualizada há 2 anos
- AWS OFICIALAtualizada há 6 meses
Many thanks for your answer, unfortunately on the embedded device I don't have the CLI but merely the lightweight embedded C SDK. I'm trying for example to run the other demo https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/main/demos/mqtt/mqtt_demo_mutual_auth using credentials generated from https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/main/demos/fleet_provisioning/fleet_provisioning_with_csr now that would have been a practical demo for the provisioning by claim.
Although the C SDK libraries are intended for constrained MCUs, the C SDK demos are not. Per the README: