gnutls-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnutls-dev] gnutls_bye always return -50?


From: Simon Josefsson
Subject: [gnutls-dev] gnutls_bye always return -50?
Date: Fri, 19 Dec 2003 04:28:06 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

In my client code I use:


  do
    ret = gnutls_bye(session, GNUTLS_SHUT_RDWR);
  while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);

  if (ret != GNUTLS_E_SUCCESS)
    shishi_error_printf (handle, "TLS Disconnected failed (%d): %s",
                         ret, gnutls_strerror (ret));

and in my server code I use:

      do
        rc = gnutls_bye (ls->session, GNUTLS_SHUT_RDWR);
      while (rc == GNUTLS_E_AGAIN || rc == GNUTLS_E_INTERRUPTED);

      if (rc != GNUTLS_E_SUCCESS)
        syslog (LOG_ERR, "TLS terminate failed to %s on socket %d (%d): %s",
                ls->str, ls->sockfd, rc, gnutls_strerror (rc));

both of these return errors, from the client:

TLS Disconnected failed (-50): The request is invalid.

and the server:

shishi: TLS terminate failed to *:4711/tcp peer 127.0.0.1 on socket 6 (-50): 
The request is invalid.

Everything else works, but I wonder if the error code indicate a real
error (so I should abort everything) or just a bug somewhere (so I
should fix it).

The example applications in GNUTLS seem to ignore the return value.

Any ideas?

Thanks,
Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]