Skip to content

Commit

Permalink
wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
5HT committed Nov 18, 2024
1 parent 30b0a48 commit f1f3645
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import Config

config :ca,
issuer: 8107,
wallet: 8108,
verifier: 8109,
est: 8047,
cmp: 8829,
cmc: 5318,
Expand Down
6 changes: 4 additions & 2 deletions lib/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ defmodule CA do
{ CA.CMC, port: port(:cmc) },
{ CA.OCSP, port: port(:ocsp) },
{ CA.TSP, port: port(:tsp) },
{ CA.EST, port: port(:est), plug: CA.EST, scheme: :http,
thousand_island_options: [num_acceptors: 1] }
{ CA.EUDI.Issuer, port: port(:issuer), plug: CA.EUDI.Issuer, scheme: :http, thousand_island_options: [num_acceptors: 1] },
{ CA.EUDI.Verifier, port: port(:verifier), plug: CA.EUDI.Verifier, scheme: :http, thousand_island_options: [num_acceptors: 1] },
{ CA.EUDI.Wallet, port: port(:wallet), plug: CA.EUDI.Wallet, scheme: :http, thousand_island_options: [num_acceptors: 1] },
{ CA.EST, port: port(:est), plug: CA.EST, scheme: :http, thousand_island_options: [num_acceptors: 1] }
], strategy: :one_for_one, name: CA.Supervisor)
end

Expand Down
6 changes: 6 additions & 0 deletions lib/services/http/get.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ defmodule CA.EST.Get do
@profiles ["secp256k1","secp384r1","secp521r1"]
import Plug.Conn

def get(conn, _, _, _, _) do

Check warning on line 6 in lib/services/http/get.ex

View workflow job for this annotation

GitHub Actions / build

variable "conn" is unused (if the variable is not meant to be used, prefix it with an underscore)
end

def get(conn, "CA", profile, _, "CA") when profile in @profiles do

Check warning on line 9 in lib/services/http/get.ex

View workflow job for this annotation

GitHub Actions / build

this clause for get/5 cannot match because a previous clause at line 6 always matches
body = :base64.encode(CA.CSR.read_ca_public(profile))
conn |> put_resp_content_type("application/pkix-cert")
Expand Down Expand Up @@ -41,4 +44,7 @@ defmodule CA.EST.Get do
send_resp(conn, 200, CA.EST.encode([%{"template" => template, "curve" => curve, "operation" => operation}]))
end

def get(conn, _, _, _, _) do

Check warning on line 47 in lib/services/http/get.ex

View workflow job for this annotation

GitHub Actions / build

variable "conn" is unused (if the variable is not meant to be used, prefix it with an underscore)

Check warning on line 47 in lib/services/http/get.ex

View workflow job for this annotation

GitHub Actions / build

this clause for get/5 cannot match because a previous clause at line 6 always matches
end

end

0 comments on commit f1f3645

Please sign in to comment.