nerves-hub / nerves_hub_cli

NervesHub Mix command line interface
Apache License 2.0
36 stars 17 forks source link

Allow using issuer CA cert and key locally #140

Closed jjcarstens closed 4 years ago

jjcarstens commented 4 years ago

Some cases may require someone to create a cert/key with their own issuer which is quite an involved process right now. (and dealing with user error around SSL is a nightmare to troubleshoot..)

So this just adds a convenience nerves_hub.device cert create task to allow specifying your own --issuer and --issuer-key to be used for creating the device cert and key according to the structure and template NervesHub expects.

The NervesHub.Certificate module is pretty much ripped straight from NervesHubCA.CertificateTemplate. There is probably a better way to do this, but I think its pretty niche use-case and wanted to get something working...cause I need it 😆

jjcarstens commented 4 years ago

I also tested this locally and was able to connect with cert/key created from my issuer. Normal way still worked fine as well 🎉