NervesKey.PKCS11 (nerves_key_pkcs11 v0.2.3) View Source
This module contains helper methods for loading and using the PKCS #11 module for NervesKey in Elixir. You don't need to use these methods to use the shared library.
Link to this section Summary
Types
The device/signer certificate pair to use
I2C bus
Option for which NervesKey and certificate to use.
Link to this section Types
Specs
certificate_pair() :: :primary | :aux
The device/signer certificate pair to use
Specs
i2c_bus() :: 0..15
I2C bus
Specs
option() :: {:i2c, i2c_bus()} | {:certificate, certificate_pair()}
Option for which NervesKey and certificate to use.
:i2c
- which I2C bus:certificate
- which NervesKey certificate to use (:primary
or:aux
)
Link to this section Functions
Specs
load_engine() :: {:ok, :crypto.engine_ref()} | {:error, any()}
Load the OpenSSL engine
Specs
private_key(:crypto.engine_ref(), [option()] | {:i2c, i2c_bus()}) :: map()
Return the key map for passing a private key to ssl_opts.
This method creates the key map that the :crypto
library can
use to properly route private key operations to the PKCS #11
shared library.
Options:
:i2c
- which I2C bus (defaults to I2C bus 0 (/dev/i2c-0
)):certificate
- which certificate on the NervesKey to use (defaults to:primary
)
Passing {:i2c, 1}
is still supported, but should be updated to use keyword
list form for the options.