Error Code -56
Simon Josefsson
simon at josefsson.org
Fri Mar 2 14:16:52 CET 2012
Karthik Ragunath <btechit.kragu at gmail.com> writes:
> Hi Simon,
> The error -56 is actually triggered as the return value in the following
> call
> ret =_gnutls_ext_get_session_data (session, GNUTLS_EXTENSION_FOOBAR,
> &epriv);
> at the client side before we try to set the relevant data in the set method
> of the extension.
Sounds like you mixed up the directionality, clients usually send
extension data before receiving it, so it is normal for there to be no
extension data in a client that is sending. Try skipping the above step
and just let the client send its data. Use wireshark to check that the
extension was sent. Then work on the server side...
/Simon
>
> We are trying to use the server name extension as a guide to build our own
> extension
>
> I guess we are missing something to register/enable the extension, but we
> followed the instructions as specified in the manual.
>
> Would be greatly helpful if you could help us troubleshoot the issue.
>
> Thanks,
> Karthik
>
>
>>
>> ---------- Forwarded message ----------
>> From: Simon Josefsson <simon at josefsson.org>
>> Date: Thu, Mar 1, 2012 at 3:22 AM
>> Subject: Re: Error Code -56
>> To: Mihir Kulkarni <mihirk.31 at gmail.com>
>> Cc: help-gnutls at gnu.org
>>
>>
>> Mihir Kulkarni <mihirk.31 at gmail.com> writes:
>>
>> > Hello,
>> > We are trying out with Gnutls. We have created a dummy extension Foobar
>> > following the steps given in the manual. We are using
>> > "_gnutls_ext_set_session_data" in the client and then using
>> > "_gnutls_ext_get_session_data" in the server to retrieve the data. The
>> > value gets set correctly in client but when we retrieve it in the server,
>> > the get function returns -56 as error code. Our implementation of Foobar
>> > extension is almost similar to server-name extension already present in
>> > Gnutls.
>> > Can someone give some clarification as to what might be going wrong? Do
>> let
>> > me know if more information is needed.
>>
>> The error -56 means GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE, see gnutls.h.
>> Try running the server with debug logging and enabled, and in
>> particular, try to find exactly where the -56 error is triggered.
>>
>> /Simon
>>
>>
More information about the Gnutls-help
mailing list