Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

nerves-hub/nerves_hub_ca_store

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NervesHubCAStore

Hex version CircleCI

Important

With the public NervesHub instance offline, this package is no longer needed and is archived.


This package contains the Certificate Authority certs for the official public NervesHub instance. It should be used by any package that requires these certs including:

Installation

If available in Hex, the package can be installed by adding nerves_hub_ca_store to your list of dependencies in mix.exs:

def deps do
  [
    {:nerves_hub_ca_store, "~> 0.1.0"}
  ]
end

Usage

This provides 3 convenience functions to aid with SSL connections to public NervesHub instances:

NervesHubCAStore.file_path/0 path to generated cacerts.pem
NervesHubCAStore.certificates/0 Reads the cacerts.pem in as a list of OTP certificates
NervesHubCAStore.cacerts/0 Reads the cacerts.pem in as a list of DER encoded certificates

Note: Each function can also be supplied with the :prod or :staging env to dictate which set of certificates to read in and defaults to :prod. It is rare that anyone other than the maintainers will need to use the :staging certificates