don't return G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep
authorDan Winship <danw@src.gnome.org>
Thu, 8 Mar 2007 21:11:00 +0000 (21:11 +0000)
committerDan Winship <danw@src.gnome.org>
Thu, 8 Mar 2007 21:11:00 +0000 (21:11 +0000)
commit22ae7a1e8f61e652e379615a052030390ada4270
treee812ba9c627f2b1e2f56c44b9f47f4aec0f01dfa
parentb9585a06ccdf8d0229d2d4967fe8189ac1d83566
don't return G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep

* libsoup/soup-gnutls.c (do_handshake): don't return
G_IO_STATUS_AGAIN if we're doing blocking I/O; just keep retrying
until the handshake is complete.
(soup_gnutls_read, soup_gnutls_write): if we get
GNUTLS_E_REHANDSHAKE, call do_handshake() immediately rather than
returning G_IO_STATUS_AGAIN; if the socket is blocking then
G_IO_STATUS_AGAIN is wrong, and if the socket is non-blocking, we
might already need to return SOUP_SSL_ERROR_HANDSHAKE_NEEDS_WRITE
or SOUP_SSL_ERROR_HANDSHAKE_NEEDS_READ.

#415402, based on a patch from Jacob Berkman.

* tests/ssl-test.c: basic ssl test. In particular, tests that
rehandshake requests are handled correctly during both synchronous
and asynchronous I/O. Might eventually test other stuff too...

* configure.in:
* tests/Makefile.am: updates for ssl-test

svn path=/trunk/; revision=914
ChangeLog
configure.in
libsoup/soup-gnutls.c
tests/Makefile.am
tests/ssl-test.c [new file with mode: 0644]