[gnutls-dev] Non blocking I/O

Nikos Mavrogiannopoulos nmav at gnutls.org
Sat Mar 12 11:57:33 CET 2005


On Friday 11 March 2005 23:06, Torsten Landschoff wrote:
> Hi there,

Hello,
 (this reply is written in haste so it might not really address your problems,
please ask again in that case).

> As the Debian Maintainer of OpenLDAP I am trying to port that beast from
> OpenSSL to GnuTLS. Big problem: It is using non blocking I/O. It seems
> like OpenSSL deals with the resulting complication under the hood.
> From the GnuTLS documentation it seems like I have to redo an
> interrupted send/recv with exactly the same parameters. Which makes the
> application code quite complicated and really does not fit well into
> OpenLDAP.
You can also pass null pointers in that case. If it isn't in the documentation
i need to fix it.

> and know that GnuTLS has an internal copy of my data?
Yes, gnutls has already an internal copy (encrypted and authenticated).

> Also it seems like I have to maintain a "virtual state" or "wanted
> state" of the sockets storing the information that a handshake is
> pending and gnutls_handshake has to be invoked again!? Or will a
> handshake continue if I am trying to send or receive data?
No it will not. You will have to call gnutls_handshake() until it returns 
zero.

>
> Sorry for the dumb questions, I am quite new to GnuTLS and want to get
> it right the first time.
>
> Thanks
>  Torsten

-- 
Nikos Mavrogiannopoulos




More information about the Gnutls-devel mailing list