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:
parent
2a08250499
commit
2855ba5a57
2 changed files with 2 additions and 2 deletions
|
@ -161,7 +161,7 @@ init(Parent, Ref, Socket, Transport, ProxyHeader, Opts) ->
|
|||
Sock0 = Transport:sockname(Socket),
|
||||
Cert1 = case Transport:name() of
|
||||
ssl ->
|
||||
case ssl:peercert(Socket) of
|
||||
case Transport:peercert(Socket) of
|
||||
{error, no_peercert} ->
|
||||
{ok, undefined};
|
||||
Cert0 ->
|
||||
|
|
|
@ -133,7 +133,7 @@ init(Parent, Ref, Socket, Transport, ProxyHeader, Opts) ->
|
|||
Sock0 = Transport:sockname(Socket),
|
||||
Cert1 = case Transport:name() of
|
||||
ssl ->
|
||||
case ssl:peercert(Socket) of
|
||||
case Transport:peercert(Socket) of
|
||||
{error, no_peercert} ->
|
||||
{ok, undefined};
|
||||
Cert0 ->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue