Created
March 10, 2015 14:42
-
-
Save andreionut/03a20fb52e8666136f93 to your computer and use it in GitHub Desktop.
Revisions
-
andreionut created this gist
Mar 10, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ Elixir 1.0.2 Code: iex(1)> :inets.start :ok iex(2)> :ssl.start :ok iex(3)> :ssl.connect("gateway.sandbox.push.apple.com", 2195, [{:mode, :binary}, {:certfile, "/path_to_cert.pem"}], 30000) {:error, {:options, {:socket_options, [mode: :binary]}}} iex(5)> :ssl.connect("api.github.com", 443, [], 30000) {:error, {:options, {:socket_options, []}}} iex(7)> :ssl.connect("api.github.com", 443, [mode: :binary], 30000) {:error, {:options, {:socket_options, [mode: :binary]}}} Erlang 17.4 (same on 17.0 and 17.1) 1> application:start(crypto), application:start(asn1), application:start(public_key), application:start(ssl). ok 2> ssl:connect("gateway.sandbox.push.apple.com", 2195, [{mode, binary}, {certfile, "/path_to_cert.pem"}], 30000). {ok,{sslsocket,{gen_tcp,#Port<0.1215>,tls_connection, undefined}, <0.51.0>}} 3> ssl:connect("api.github.com", 443, [{mode, binary}], 30000). {ok,{sslsocket,{gen_tcp,#Port<0.903>,tls_connection, undefined}, <0.48.0>}}