Skip to content

Commit

Permalink
4 servers: CMP, CMC, TSP, OCSP
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT committed Jul 29, 2023
1 parent 663265d commit 855063f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/ca.ex
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ defmodule CA do
require Record
Enum.each(Record.extract_all(from_lib: "ca/include/PKIXCMP-2009.hrl"),
fn {name, definition} -> Record.defrecord(name, definition) end)
def init([]), do: {:ok, { {:one_for_one, 5, 10}, []} }

def init([]), do: {:ok, { {:one_for_one, 5, 10}, []} }
def start(_type, _args) do
:logger.add_handlers(:ldap)
CA.CMP.start
CA.CMC.start
CA.TSP.start
CA.OCSP.start
:supervisor.start_link({:local, __MODULE__}, __MODULE__, [])
end
end
2 changes: 1 addition & 1 deletion lib/ocsp.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule CA.OCSP do
require CA

def code(), do: :binary.encode_hex(:crypto.strong_rand_bytes(8))
def start(), do: :erlang.spawn(fn -> listen(1849) end)
def start(), do: :erlang.spawn(fn -> listen(1859) end)

def listen(port) do
{:ok, socket} = :gen_tcp.listen(port,
Expand Down

0 comments on commit 855063f

Please sign in to comment.