Erlang/OTP Forums

Author Message

<  Yaws mailing list  ~  yaws-1.72: SSL accept failed: einval

Guest
Posted: Thu Sep 20, 2007 11:17 am Reply with quote
Guest
Today I tried upgrading from yaws-1.68 to a shiny new yaws-1.72. All
was fine except that I could no longer connect using SSL.

I believe the problem is that in yaws_server.erl, after a successful
return from ssl:transport_accept/1, the code calls the deprecated
ssl:accept/1 rather than ssl:ssl_accept/1

Replacing accept with ssl_accept fixed the problem for me (on cygwin
and ubuntu) without apparently breaking anything else... maybe
someone could confirm this?

Thanks,
John

================================================================
$ diff -c yaws-1.72/src/yaws_server.erl yaws/src/yaws_server.erl
*** yaws-1.72/src/yaws_server.erl Tue Sep 11 17:37:04 2007
--- yaws/src/yaws_server.erl Thu Sep 20 15:28:16 2007
***************
*** 716,722 ****
{ok, Client} ->
if
GS#gs.ssl == ssl ->
! case ssl:accept(Client) of
ok ->
ok;
{error, Reason} ->
--- 716,722 ----
{ok, Client} ->
if
GS#gs.ssl == ssl ->
! case ssl:ssl_accept(Client) of
ok ->
ok;
{error, Reason} ->
================================================================




-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Thu Sep 20, 2007 11:44 am Reply with quote
Guest
On 9/20/07, John Webb <jwebb@gol.com> wrote:
> Today I tried upgrading from yaws-1.68 to a shiny new yaws-1.72. All
> was fine except that I could no longer connect using SSL.
>
> I believe the problem is that in yaws_server.erl, after a successful
> return from ssl:transport_accept/1, the code calls the deprecated
> ssl:accept/1 rather than ssl:ssl_accept/1

In fact after your patch, yaws_server:acceptor0/2 calls (indirectly)
ssl:transport_accept/1 and ssl:ssl_accept/1, which is equivalent to a
single call to ssl:accept/1.

So, I think that the patch is correct.

--
Sergei Golovan

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Thu Sep 20, 2007 1:12 pm Reply with quote
Guest
Sergei Golovan wrote:
> On 9/20/07, John Webb <jwebb@gol.com> wrote:
>> Today I tried upgrading from yaws-1.68 to a shiny new yaws-1.72. All
>> was fine except that I could no longer connect using SSL.
>>
>> I believe the problem is that in yaws_server.erl, after a successful
>> return from ssl:transport_accept/1, the code calls the deprecated
>> ssl:accept/1 rather than ssl:ssl_accept/1
>


Sloppy - sorry,

1.73 uploaded.

/klacke

--
Claes Wikstrom -- Caps lock is nowhere and
http://www.tail-f.com -- everything is under control
cellphone: +46 70 2097763

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Erlyaws-list mailing list
Erlyaws-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlyaws-list
Post recived from mailinglist
Guest
Posted: Thu Sep 20, 2007 1:22 pm Reply with quote
Guest
Dizzying response rate!!!

Many Thanks,
John

On Sep 20, 2007, at 10:11 PM, Claes Wikstr

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum