diff options
author | Loïc Hoguin <[email protected]> | 2013-06-20 15:38:25 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-06-20 16:01:58 +0200 |
commit | 11493a40f199719a1c05f2e300278e15e82331cb (patch) | |
tree | dd8ee48a4bb988776658b634563760098ea3c7f1 /src/cowboy_websocket.erl | |
parent | fdf2bc93f69a09af22eb32d063aea15e4b1146e1 (diff) | |
download | cowboy-11493a40f199719a1c05f2e300278e15e82331cb.tar.gz cowboy-11493a40f199719a1c05f2e300278e15e82331cb.tar.bz2 cowboy-11493a40f199719a1c05f2e300278e15e82331cb.zip |
Ignore deprecation warning for crypto:sha/1 for now
We can change this call when we start supporting only R16B+,
which may happen when R17B is released or some time before.
Diffstat (limited to 'src/cowboy_websocket.erl')
-rw-r--r-- | src/cowboy_websocket.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cowboy_websocket.erl b/src/cowboy_websocket.erl index 6b89686..1df32c9 100644 --- a/src/cowboy_websocket.erl +++ b/src/cowboy_websocket.erl @@ -19,6 +19,10 @@ -module(cowboy_websocket). -behaviour(cowboy_sub_protocol). +%% Ignore the deprecation warning for crypto:sha/1. +%% @todo Remove when we support only R16B+. +-compile({nowarn_deprecated_function, {crypto, sha, 1}}). + %% API. -export([upgrade/4]). @@ -176,6 +180,7 @@ upgrade_error(Req, Env) -> websocket_handshake(State=#state{ transport=Transport, key=Key, deflate_frame=DeflateFrame}, Req, HandlerState) -> + %% @todo Change into crypto:hash/2 for R17B+ or when supporting only R16B+. Challenge = base64:encode(crypto:sha( << Key/binary, "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" >>)), Extensions = case DeflateFrame of |