diff --git a/dll/Sspi.cpp b/dll/Sspi.cpp index e03afa8..525288a 100644 --- a/dll/Sspi.cpp +++ b/dll/Sspi.cpp @@ -364,6 +364,8 @@ static SECURITY_STATUS SEC_ENTRY sspi_InitializeSecurityContextW( } } + ptsExpiry = NULL; // force passing null expiration + status = Real_InitializeSecurityContextW( phCredential, phContext, pszTargetName, fContextReq, Reserved1, TargetDataRep, pInput, Reserved2, phNewContext, pOutput, pfContextAttr, ptsExpiry); @@ -371,6 +373,22 @@ static SECURITY_STATUS SEC_ENTRY sspi_InitializeSecurityContextW( MsRdpEx_LogPrint(DEBUG, "sspi_InitializeSecurityContextW(pszTargetName: %s fContextReq: 0x%08X phCredential=%p,%p), status: 0x%08X", pszTargetNameA ? pszTargetNameA : "", fContextReq, (void*)phCredential->dwLower, (void*)phCredential->dwUpper, status); + if (ptsExpiry) { + FILETIME fileTime; + SYSTEMTIME systemTime; + fileTime.dwLowDateTime = ptsExpiry->LowPart; + fileTime.dwHighDateTime = ptsExpiry->HighPart; + + MsRdpEx_LogPrint(DEBUG, "ptsExpiry: lo: 0x%08X hi: 0x%08X", + ptsExpiry->LowPart, ptsExpiry->HighPart); + + if (FileTimeToSystemTime(&fileTime, &systemTime)) { + MsRdpEx_LogPrint(DEBUG, "ptsExpiry: %04d-%02d-%02d %02d:%02d:%02d", + systemTime.wYear, systemTime.wMonth, systemTime.wDay, + systemTime.wHour, systemTime.wMinute, systemTime.wSecond); + } + } + if (pOutput) { for (iBuffer = 0; iBuffer < pOutput->cBuffers; iBuffer++) { pSecBuffer = &pOutput->pBuffers[iBuffer];