mirror of
https://github.com/pocoproject/poco.git
synced 2026-01-02 10:43:22 +01:00
#3465: NetSSL_Win: bad error handling when decodeMessage() fails
This commit is contained in:
@@ -657,16 +657,16 @@ SECURITY_STATUS SecureSocketImpl::decodeBufferFull(BYTE* pBuffer, DWORD bufSize,
|
||||
}
|
||||
else
|
||||
{
|
||||
// everything decoded
|
||||
if (securityStatus != SEC_E_OK && securityStatus != SEC_E_INCOMPLETE_MESSAGE && securityStatus != SEC_I_RENEGOTIATE && securityStatus != SEC_I_CONTEXT_EXPIRED)
|
||||
{
|
||||
throw SSLException("Failed to decode data", Utility::formatError(securityStatus));
|
||||
}
|
||||
else if (securityStatus == SEC_E_OK)
|
||||
if (securityStatus == SEC_E_OK)
|
||||
{
|
||||
// everything decoded
|
||||
pBuffer = 0;
|
||||
bufSize = 0;
|
||||
}
|
||||
else if (securityStatus != SEC_E_INCOMPLETE_MESSAGE && securityStatus != SEC_I_RENEGOTIATE && securityStatus != SEC_I_CONTEXT_EXPIRED)
|
||||
{
|
||||
return securityStatus;
|
||||
}
|
||||
}
|
||||
|
||||
if (securityStatus == SEC_I_RENEGOTIATE)
|
||||
|
||||
Reference in New Issue
Block a user