From: Johan Bevemyr <jb@be...> - 2005-05-19 16:06:10
While on the subject of SSL. I don't know if this has been mentioned
here recently but there is a bug in the esock library which causes
Erlang to hang if a browser posts something larger than 4K. It is
easily fixed (I've submitted the same patch several times to OTP but
they've not managed to get it in yet), by increasing the RWBUFLEN in
esock.c. I'm using
#define RWBUFLEN (1024*32)
row 141 in lib/ssl/c_src/esock.c.
The problem is that the SSL library has to read a full SSL record
before decrypting it, ie it may have to read up to 32K. It will buffer
the data internally until all is received. If the application only
submits a 4K buffer when calling the SSL_read() function it can only
get 4K of the 32K in the buffer. This means that there is an
additional 28K to be read wihout there being another socket event
since the data has already been read from the socket by the SSL
library. There are callbacks in the SSL library to deted this
situation but they are not used by esock so the simples solution is to
increase the read buffer and avoid the whole thing altogether.
Without this fix you will get hanging sessions and replies going
into the void, and suspect Yaws or your own application.
"Sebastian Bello" <sebastian@...> wrote:
> Hi list,
> I'm trying to setup SSL on a Windows machine.
> I needed to copy two dlls. Now yaws starts successfully (using yaws .=
pem files) but when I try to access a page I get =
> <hostname> has received an incorrect or unexpected message. Error=
> Is this maybe a Windows setup problem? Is there a doc where to read a=
> Prepaid Expertise - Programmable Switches =
> Powered by Ericsson Licensed Technology
> Sebasti=E1n Bello - Engineer - Development Center - IN Switch S=
> Headquarters - Miami-U.S.A. Tel: 1305-3578076 Fax: 1305-7686260=
> Development Center - Montevideo - Uruguay Tel/Fax: 5982-7104457=
> IN SWITCH EMEA Phone: +33 0 6 0335 9427 - Fax: +33 0 4 93655773=
> IN SWITCH ASIA Phone: +92 51 2800397/8- Fax: +92 51 2800399/ in=
> e-mail: sebastian@...