[gnutls-dev] gnutls_bye always return -50?

Simon Josefsson jas at extundo.com
Fri Dec 19 04:28:06 CET 2003


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




More information about the Gnutls-dev mailing list