mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 16:57:06 +00:00
Ncat: Don't call SSL_shutdown if --no-shutdown
This commit is contained in:
parent
4c52894f25
commit
53d2a7587d
3 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue