Skip to content

Commit

Permalink
Use only TLS 1.2 on OTP vesions < 25
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed Aug 23, 2022
1 parent 4a05096 commit 309ceab
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## Cldr Utils version 2.19.1

This is the changelog for Cldr Utils v2.19.1 released on August 23rd, 2022. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr_utils/tags)

**Cldr Utils now requires Elixir 1.11 or later**

### Bug Fixes

* Use only TLS 1.2 on OTP versions less than 25.

## Cldr Utils version 2.19.0

This is the changelog for Cldr Utils v2.19.0 released on August 22nd, 2022. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr_utils/tags)
Expand Down
10 changes: 8 additions & 2 deletions lib/cldr/http/http.ex
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,11 @@ defmodule Cldr.Http do
end

def protocol_versions do
# Protocols: TLS 1.2, TLS 1.3
[:"tlsv1.2", :"tlsv1.3"]
if otp_version() < 25 do
[:"tlsv1.2"]
else
[:"tlsv1.2", :"tlsv1.3"]
end
end

def preferred_eccs do
Expand All @@ -277,4 +280,7 @@ defmodule Cldr.Http do
end
end

def otp_version do
:erlang.system_info(:otp_release) |> List.to_integer
end
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Cldr.Utils.MixProject do
use Mix.Project

@version "2.19.0"
@version "2.19.1"
@source_url "https://github.com/elixir-cldr/cldr_utils"

def project do
Expand Down

0 comments on commit 309ceab

Please sign in to comment.