mixcommandline helpers. If you don't already have an Elixir Project that has
nerves_keyas a dependency, create one now, and run
mix deps.getto pull down the helpers. Then run the following commands:
openssl x509 -in nerveskey_prod_signer1.cert -text.
NervesKey.default_info/1will create this default for you:
sftpto copy the Device CA certificate and private key to your device. We'll put them
/tmpso that they disappear on reboot:
:okafter about 2 seconds, then celebrate. You successfully programmed a NervesKey. You can't program it again. If you try, you'll get an error.
NervesKey.clear_aux_certificates/1function for erasing the auxiliary certificate.
NervesKey.get_settings/1APIs let you store and retrieve a map. Since the storage is limited and relatively slow, this is intended for settings that rarely change or may be tightly coupled with certificates already being stored in the NervesKey.
:erlang.term_to_binaryto convert the map to raw bytes and then writes it to the ATECC508A/608A's persistent storage. Not that the keys in the map take up space as well.