Handshake has failed (Resource temporarily unavailable, try again.)

1,056 views
Skip to first unread message

Andrew

unread,
Jun 27, 2012, 5:33:02 PM6/27/12
to onion-dev
hi,

I'm seeing quite a few of these messages on the server:
Handshake has failed (Resource temporarily unavailable, try again.)

That seems to be caused by gnutls_handshake() returning
GNUTLS_E_AGAIN.

According to gnutls_handshake() man-page (http://www.manpagez.com/man/
3/gnutls_handshake/)
"The non-fatal errors such as GNUTLS_E_AGAIN and
GNUTLS_E_INTERRUPTED
interrupt the handshake procedure, which should be resumed later.
Call
this function again, until it returns 0".

And some other example code:
http://pits.googlecode.com/svn/trunk/ssl_gnutls.c
https://lists.exim.org/lurker/message/20120518.031702.88801b20.da.html
http://www.opensource.apple.com/source/curl/curl-57/curl/lib/gtls.c

So I think onion_prepare_gnutls_session() should be checking for
GNUTLS_E_AGAIN and just call gnutls_handshake() again.


Regards,
Andrew Victor

David Moreno Montero

unread,
Jun 29, 2012, 12:38:48 PM6/29/12
to Andrew, onion-dev
Hi,

sorry for the delay on response, I've been busy this week.

I saw many of those, specially when using Chrome, but finally it manages to connect. I added the control code to trunk, but still gives me the errors, although on Chrome, they are slightly different to what you reported. I get "Handshake has failed (A TLS packet with unexpected length was received.)". 


I'm working also on a refactoring of this part to allow several listen points (ports, with diferent protocols) on a separate branch (published at github as multiport). In this reimplementation of HTTPS support it already had this handshake retry.

Thanks for your reports,
David

2012/6/27 Andrew <avict...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "onion-dev" group.
To post to this group, send email to onio...@coralbits.com.
To unsubscribe from this group, send email to onion-dev+...@coralbits.com.
For more options, visit this group at http://groups.google.com/a/coralbits.com/group/onion-dev/?hl=en.




--
David Moreno Montero 

dmo...@coralbits.com
+34 658 18 77 17
+44 74 23 21 01 57

http://www.coralbits.com



Reply all
Reply to author
Forward
0 new messages