mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 11:55:27 +00:00
Merge 707812db69 into db4aefddfa
This commit is contained in:
commit
005bde9bf6
3 changed files with 14 additions and 1 deletions
|
|
@ -479,8 +479,12 @@ nsock_event_id nsock_connect_ssl(nsock_pool nsp, nsock_iod nsiod, nsock_ev_handl
|
|||
|
||||
if (proto == IPPROTO_UDP)
|
||||
{
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
if (!ms->dtlsctx)
|
||||
nsock_pool_dtls_init(ms, 0);
|
||||
#else
|
||||
fatal("%s called with no OpenSSL DTLS support", __func__);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -364,7 +364,14 @@ void handle_connect_result(struct npool *ms, struct nevent *nse, enum nse_status
|
|||
if (nse->type == NSE_TYPE_CONNECT_SSL &&
|
||||
nse->status == NSE_STATUS_SUCCESS) {
|
||||
#if HAVE_OPENSSL
|
||||
sslctx = iod->lastproto == IPPROTO_UDP ? ms->dtlsctx : ms->sslctx;
|
||||
if (iod->lastproto == IPPROTO_UDP)
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
sslctx = ms->dtlsctx;
|
||||
#else
|
||||
fatal("%s called with no OpenSSL DTLS support", __func__);
|
||||
#endif
|
||||
else
|
||||
sslctx = ms->sslctx;
|
||||
assert(sslctx != NULL);
|
||||
/* Reuse iod->ssl if present. If set, this is the second try at connection
|
||||
without the SSL_OP_NO_SSLv2 option set. */
|
||||
|
|
|
|||
|
|
@ -173,7 +173,9 @@ nsock_pool nsock_pool_new(void *userdata) {
|
|||
|
||||
#if HAVE_OPENSSL
|
||||
nsp->sslctx = NULL;
|
||||
#ifndef OPENSSL_NO_DTLS
|
||||
nsp->dtlsctx = NULL;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
nsp->px_chain = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue