HELP: Client-Server code for anonymous authentication NOT working

Mihir Kulkarni mihirk.31 at
Mon Feb 6 03:06:12 CET 2012

I am part of a team at University of California, Irvine who are trying our
hand at GNUTLS. We installed the package and all its dependencies. But when
trying with the example code given in the documentation, it throws up an
error. The details are:
I tried running the server and client with anonymous authentication. The
exact error that it gives is:

mihir at GNU-Linux:~/GNUTLS/gnutls-2.8.6/client$ ./a.out
*** Handshake failed
GNUTLS ERROR: A TLS packet with unexpected length was received.

mihir at GNU-Linux:~/GNUTLS/gnutls-2.8.6/server$ ./a.out
Server ready. Listening to port '5556'.

- connection from, port 48108
*** Handshake has failed (A TLS packet with unexpected length was received.)

What is figured out so far is that the server goes into an infinite loop on
line 120 for the statements:
           ret = gnutls_handshake (session);
       while (gnutls_error_is_fatal (ret) == 0);

Can someone please tell me what might be going wrong?
Thank you for your help.

Mihir Kulkarni
Graduate Student
University of California, Irvine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20120205/64140178/attachment.htm>

More information about the Gnutls-help mailing list