nerves-hub / nerves_hub_cli

NervesHub Mix command line interface
Apache License 2.0
35 stars 17 forks source link

if a ca store isn't defined, use `:public_key` as a sane default #205

Closed joshk closed 4 months ago

joshk commented 4 months ago

if https://github.com/nerves-hub/nerves_hub_link/pull/166 is accepted then I'll update this PR to match

joshk commented 4 months ago

although, upon thinking about it, since CAStore is a dep, maybe just using that as the fallback is a fine default.

jjcarstens commented 4 months ago

I think that would be fine. The CLI is a local host tool. CAStore will probably satisfy most every setup, but also host systems typically have some large CAstore in /etc/ssl automagically which would be found with :public_key.cacerts_get(). We could make CAStore and optional dependency and if its not there, look at the system

joshk commented 4 months ago

I tend to agree with your approach. This would mean also updating nerves_hub_link so that CAStore is an optional dep there too, are you happy with me making that change? Is marking the dep as :optional enough?

jjcarstens commented 4 months ago

Yep. Any user of nerves_hub_link would need to have the castore dep in the mix.exs explicitly. This is a better approach anyway for any users who are trying to save bytes and storage space