Skip to content

Commit

Permalink
fix(NetSSL_Win): client fails to complete handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
obiltschnig committed Nov 11, 2024
1 parent 7a7273f commit 1818baa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions NetSSL_Win/src/SecureSocketImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ void SecureSocketImpl::initCommon()
{
_contextFlags |= ISC_REQ_MANUAL_CRED_VALIDATION;
}

if (_mode == MODE_CLIENT)
{
// If we do not set this, in some cases the InitializeSecurityContext() will return SEC_I_INCOMPLETE_CREDENTIALS.
// That case is not handled in the handshake, it will try to continue reading, thus blocking until timeout.
// The handling of this case would be to repeat the InitializeSecurityContext once again, or as we do here,
// inform to use a client cert if available.
_contextFlags |= ISC_REQ_USE_SUPPLIED_CREDS;
}
}


Expand Down

0 comments on commit 1818baa

Please sign in to comment.