Re: [BUG] more problems with SSL
Stipe Tolj <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Organization | Wapme Systems AG |
| Message-ID | <[email protected]> |
Oded Arbel wrote:
>
> another problem with an SSL connection, is that if the socket connection
> in conn_open_tcp() called from conn_open_sll() fails, it returns NULL,
> but conn_open_ssl() immidietly tries to refer to it as initialized
> structure - which of course causes Kannel to crash.
> conn_open_ssl() should check whether the socket was successfuly opened,
> returning NULL if not, so adding this -
>
> if (!ret)
> return NULL;
>
> immidietly after conn_open_tcp() will solve the problem.
you're right.
BTW, I'm wondering if the part:
/*
* make the socket is non-blocking while we do SSL_connect
*/
if (socket_set_blocking(ret->fd, 0) < 0) {
goto error;
}
is necessary in conn_open_ssl() because the socket is already set to
non-blocking mode in conn_wrap_fd()?
I'll fix the issue you were raising here Oded.
Stipe
[email protected]
-------------------------------------------------------------------
Wapme Systems AG
Münsterstr. 248
40470 Düsseldorf
Tel: +49-211-74845-0
Fax: +49-211-74845-299
E-Mail: [email protected]
Internet: http://www.wapme-systems.de
-------------------------------------------------------------------
wapme.net - wherever you are