Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Failure with key generation on gcp #10

Open
@netskink

Description

@netskink

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.

Source: https://cloud.google.com/iot/docs/how-tos/credentials/verifying-credentials?_ga=2.210511058.-678179568.1582224038

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.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions