mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 13:19:04 +00:00
Ncat: Don't call SSL_shutdown if --no-shutdown
This commit is contained in:
@@ -286,7 +286,8 @@ int fdinfo_close(struct fdinfo *fdn)
|
||||
{
|
||||
#ifdef HAVE_OPENSSL
|
||||
if (o.ssl && fdn->ssl != NULL) {
|
||||
SSL_shutdown(fdn->ssl);
|
||||
if (!o.noshutdown)
|
||||
SSL_shutdown(fdn->ssl);
|
||||
SSL_free(fdn->ssl);
|
||||
fdn->ssl = NULL;
|
||||
}
|
||||
|
||||
@@ -294,8 +294,10 @@ static void subprocess_info_close(struct subprocess_info *info)
|
||||
{
|
||||
#ifdef HAVE_OPENSSL
|
||||
if (info->fdn.ssl != NULL) {
|
||||
SSL_shutdown(info->fdn.ssl);
|
||||
if (!o.noshutdown)
|
||||
SSL_shutdown(info->fdn.ssl);
|
||||
SSL_free(info->fdn.ssl);
|
||||
info->fdn.ssl = NULL;
|
||||
}
|
||||
#endif
|
||||
closesocket(info->fdn.fd);
|
||||
|
||||
@@ -629,7 +629,7 @@ static void close_fd(struct fdinfo *fdn, int eof) {
|
||||
logdebug("Closing connection.\n");
|
||||
#ifdef HAVE_OPENSSL
|
||||
if (o.ssl && fdn->ssl) {
|
||||
if (eof)
|
||||
if (eof && !o.noshutdown)
|
||||
SSL_shutdown(fdn->ssl);
|
||||
SSL_free(fdn->ssl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user