Failure with key generation on gcp #10
Description
Hello
I am trying to use your code with a pycom device running micropython and GCP IoTCore. During the create registry step the pem file generated using the instructions in the guide failed to work. Each time GCP said the pem file was invalid. I tried to manually copy as well as upload and the message was the same. I also tried to generate and upload the key reference by the gcp help page and it failed.
Here are the methods which failed to work and the source for the given method.
Source: https://github.com/GoogleCloudPlatform/iot-core-micropython
openssl genrsa -out rsa_private.pem 2048
openssl rsa -in rsa_private.pem -pubout -out rsa_pub.pem
Source: https://cloud.google.com/iot/docs/how-tos/credentials/keys
openssl genpkey -algorithm RSA -out rsa_private.pem -pkeyopt rsa_keygen_bits:2048
openssl rsa -in rsa_private.pem -pubout -out rsa_public.pem
This method worked for creating the key in IoTCore upload CA certificate for the Registry using the self-signed CA certificates method.
openssl genpkey -algorithm RSA -out ca_private.pem -pkeyopt rsa_keygen_bits:2048
openssl req -x509 -new -nodes -key ca_private.pem -sha256 -out ca_cert.pem -subj "/CN=unused"
I'm not sure if the code will work at this point. I'm just tryig to get the registry created with keys.