Message301472
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;
}
} |
|
Date |
User |
Action |
Args |
2017-09-06 14:11:38 | christian.heimes | set | recipients:
+ christian.heimes, janssen, alex, njs, martin.panter, dstufft |
2017-09-06 14:11:38 | christian.heimes | set | messageid: <1504707098.91.0.284235705526.issue30437@psf.upfronthosting.co.za> |
2017-09-06 14:11:38 | christian.heimes | link | issue30437 messages |
2017-09-06 14:11:38 | christian.heimes | create | |
|