[gnutls-help] Asynchronous transport

Yury Shvedov yshvedov at wimarksystems.com
Thu Apr 30 17:04:24 CEST 2015


Yes... I mean.. partly. Gnutls stopped using pull_timeout as synchronous 
timeout, but I still have problems:
I used
     gnutls_dtls_set_timeouts(m_session, 1000, 60*1000);
it helped, but from man pages:
     If the retransmission timeout is zero then the handshake will 
operate in a non-blocking way, i.e., return GNUTLS_E_AGAIN.
If I set retrnasmission timeout to zero, the gnutls_dtls_get_timeout 
returns me zero every time. But according to man pages:
     This function is useful when DTLS is used in non-blocking mode.
And gnutls_handshake() doesn't perform any sending after receiving 
server_hello. The problem is then I set retrnasmission timeout to zero, 
it returns me 0 again after 3 timeouts. What I have to do, when 
gnutls_dtls_get_timeout  returns zero?

P.S. I have another several question.

 1. What I have to do when gnutls pass me to pull function the buffer of
    smaller size than one, I have the first in queue (in DTLS mode!)?
    Divide buffer? If not, return the size of requested buffer or size
    of full buffer?
 2. Does gnutls supports the exchange without encryption? What if I want
    only fragmentation and authentication feature from this library?
 3. The valgrind tells me that the buffer, gnutls_dtls_cookie_send
    passes to my push function (44 bytes), have an uninitialized values
    after first 0xa bytes. The buffer allocated on the stack.


С уважением,
Юрий Шведов
WiMark Systems

On 04/30/2015 05:27 PM, Nikos Mavrogiannopoulos wrote:
> On Thu, Apr 30, 2015 at 4:20 PM, Yury Shvedov
> <yshvedov at wimarksystems.com> wrote:
>> Unfortunately, it is still not correct. For the first time, my client
>>
>>          gnutls_init(&m_session, GNUTLS_CLIENT | GNUTLS_DATAGRAM |
>>                                  GNUTLS_NONBLOCK);
>>          /* .... */
>>          gnutls_dtls_set_mtu(m_session, 1000);
>>          gnutls_handshake_set_timeout(m_session,
>> GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT);
> In DTLS you have to use gnutls_dtls_set_timeouts(). Does that solve the issue?
>
> regards,
> Nikos

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20150430/b4972b32/attachment.html>


More information about the Gnutls-help mailing list