This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients alex, christian.heimes, dstufft, janssen, martin.panter, njs
Date 2017-09-06.14:11:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504707098.91.0.284235705526.issue30437@psf.upfronthosting.co.za>
In-reply-to
Content
If I understand the man page of SSL_shutdown correctly, than SSL_shutdown() must be called a second time when the first time returned 0. But it does not say how an application shall behave if the second call to SSL_shutdown() also returns 0.

OpenSSL does not contain an example for bidirectional shutdown. s_client.c only does unidirectional shutdown.

cURL just ignores the result:

/*
 * This function is called when an SSL connection is closed.
 */
void Curl_ossl_close(struct connectdata *conn, int sockindex)
{
  struct ssl_connect_data *connssl = &conn->ssl[sockindex];

  if(connssl->handle) {
    (void)SSL_shutdown(connssl->handle);
    SSL_set_connect_state(connssl->handle);

    SSL_free (connssl->handle);
    connssl->handle = NULL;
  }
  if(connssl->ctx) {
    SSL_CTX_free (connssl->ctx);
    connssl->ctx = NULL;
  }
}
History
Date User Action Args
2017-09-06 14:11:38christian.heimessetrecipients: + christian.heimes, janssen, alex, njs, martin.panter, dstufft
2017-09-06 14:11:38christian.heimessetmessageid: <1504707098.91.0.284235705526.issue30437@psf.upfronthosting.co.za>
2017-09-06 14:11:38christian.heimeslinkissue30437 messages
2017-09-06 14:11:38christian.heimescreate