0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Get peer cert inderectly through ranch_transport:peercert/1

This commit is contained in:
Alexander Petrovsky 2022-01-07 17:58:15 +03:00
parent 2a08250499
commit 2855ba5a57
2 changed files with 2 additions and 2 deletions

View file

@ -161,7 +161,7 @@ init(Parent, Ref, Socket, Transport, ProxyHeader, Opts) ->
Sock0 = Transport:sockname(Socket), Sock0 = Transport:sockname(Socket),
Cert1 = case Transport:name() of Cert1 = case Transport:name() of
ssl -> ssl ->
case ssl:peercert(Socket) of case Transport:peercert(Socket) of
{error, no_peercert} -> {error, no_peercert} ->
{ok, undefined}; {ok, undefined};
Cert0 -> Cert0 ->

View file

@ -133,7 +133,7 @@ init(Parent, Ref, Socket, Transport, ProxyHeader, Opts) ->
Sock0 = Transport:sockname(Socket), Sock0 = Transport:sockname(Socket),
Cert1 = case Transport:name() of Cert1 = case Transport:name() of
ssl -> ssl ->
case ssl:peercert(Socket) of case Transport:peercert(Socket) of
{error, no_peercert} -> {error, no_peercert} ->
{ok, undefined}; {ok, undefined};
Cert0 -> Cert0 ->