Skip to content

Commit

Permalink
Fix recent OTP issues (#18)
Browse files Browse the repository at this point in the history
* fix: add public_key

* fix: fix Protocol.UndefinedError
  • Loading branch information
ninoseki authored Dec 14, 2023
1 parent c432b63 commit 87ece60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lib/easy_ssl.ex
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,14 @@ defmodule EasySSL do

end

defp parse_crl_distribution_points(crl_distribution_points)
when is_binary(crl_distribution_points) do
:public_key.der_decode(:CRLDistributionPoints, crl_distribution_points)
end
defp parse_crl_distribution_points(crl_distribution_points) do
crl_distribution_points
end

defp coerce_to_string(attribute_value) do
case attribute_value do
{:printableString, string} -> string
Expand Down Expand Up @@ -456,6 +464,7 @@ defmodule EasySSL do
extension_map,
:crlDistributionPoints,
crl_distribution_points
|> parse_crl_distribution_points
|> Enum.reduce([], fn distro_point, output ->
case distro_point do
{:DistributionPoint, {:fullName, crls}, :asn1_NOVALUE, :asn1_NOVALUE} ->
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ defmodule EasySSL.MixProject do

def application do
[
extra_applications: [:logger]
extra_applications: [:logger, :public_key]
]
end

Expand Down

0 comments on commit 87ece60

Please sign in to comment.