Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
elixir 1.11.3
erlang 25.3.2.5
elixir 1.14.5-otp-25
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## v0.6.1

- Added handle_info for :ssl_error

## v0.6.0

**Security**
Expand Down
2 changes: 1 addition & 1 deletion lib/frame/continuation.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Kadabra.Frame.Continuation do

defstruct [:header_block_fragment, :stream_id, end_headers: false]

use Bitwise
import Bitwise

@type t :: %__MODULE__{
end_headers: boolean,
Expand Down
2 changes: 1 addition & 1 deletion lib/frame/data.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Kadabra.Frame.Data do

defstruct [:stream_id, :data, end_stream: false]

use Bitwise
import Bitwise

alias Kadabra.Frame

Expand Down
2 changes: 1 addition & 1 deletion lib/frame/headers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defmodule Kadabra.Frame.Headers do
weight: non_neg_integer
}

use Bitwise
import Bitwise

alias Kadabra.Frame

Expand Down
2 changes: 1 addition & 1 deletion lib/frame/ping.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Kadabra.Frame.Ping do

defstruct [:data, stream_id: 0, ack: false]

use Bitwise
import Bitwise

alias Kadabra.Frame

Expand Down
2 changes: 1 addition & 1 deletion lib/frame/push_promise.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Kadabra.Frame.PushPromise do
header_block_fragment: nil,
stream_id: nil

use Bitwise
import Bitwise

alias Kadabra.Frame

Expand Down
2 changes: 1 addition & 1 deletion lib/frame/settings.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ defmodule Kadabra.Frame.Settings do

defstruct [:settings, ack: false]

use Bitwise
import Bitwise

alias Kadabra.Connection

Expand Down
7 changes: 7 additions & 0 deletions lib/socket.ex
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ defmodule Kadabra.Socket do
{:verify, :verify_peer},
{:depth, 99},
{:cacerts, :certifi.cacerts()},
{:customize_hostname_check,
[{:match_fun, :public_key.pkix_verify_hostname_match_fun(:https)}]},
{:alpn_advertised_protocols, [<<"h2">>]},
:binary
]
Expand Down Expand Up @@ -192,4 +194,9 @@ defmodule Kadabra.Socket do
Kernel.send(state.active_user, {:closed, self()})
{:noreply, %{state | socket: nil}}
end

def handle_info({:ssl_error, _socket, _reason}, state) do
Kernel.send(state.active_user, {:closed, self()})
{:noreply, %{state | socket: nil}}
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 Kadabra.Mixfile do
use Mix.Project

@version "0.6.0"
@version "0.6.1"

def project do
[
Expand Down