castore.ex (699B)
1 defmodule CAStore do 2 @moduledoc """ 3 Functionality to retrieve the up-to-date CA certificate store. 4 5 The only purpose of this library is to keep an up-to-date CA certificate store file. 6 This is why this module only provides one function, `file_path/0`, to access the path of 7 the CA certificate store file. You can then read this file and use its contents for your 8 own purposes. 9 """ 10 11 @doc """ 12 Returns the path to the CA certificate store PEM file. 13 14 ## Examples 15 16 CAStore.file_path() 17 #=> /Users/me/castore/_build/dev/lib/castore/priv/cacerts.pem" 18 19 """ 20 @spec file_path() :: Path.t() 21 def file_path() do 22 Application.app_dir(:castore, "priv/cacerts.pem") 23 end 24 end