소스 검색

Fix operator precedence;

Bitwise AND has lower precedence than equality.
bjorn 2 년 전
부모
커밋
5c60aea855
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/windows/SChannelConnection.cpp

+ 2 - 2
src/windows/SChannelConnection.cpp

@@ -248,12 +248,12 @@ bool SChannelConnection::connect(const std::string &hostname, uint16_t port)
 	{
 	{
 		SecPkgContext_Flags resultFlags;
 		SecPkgContext_Flags resultFlags;
 		QueryContextAttributes(context.get(), SECPKG_ATTR_FLAGS, &resultFlags);
 		QueryContextAttributes(context.get(), SECPKG_ATTR_FLAGS, &resultFlags);
-		if (resultFlags.Flags & ISC_REQ_CONFIDENTIALITY == 0)
+		if ((resultFlags.Flags & ISC_REQ_CONFIDENTIALITY) == 0)
 		{
 		{
 			debug << "Resulting context is not encrypted, marking as failed\n";
 			debug << "Resulting context is not encrypted, marking as failed\n";
 			success = false;
 			success = false;
 		}
 		}
-		if (resultFlags.Flags & ISC_REQ_INTEGRITY == 0)
+		if ((resultFlags.Flags & ISC_REQ_INTEGRITY) == 0)
 		{
 		{
 			debug << "Resulting context is not signed, marking as failed\n";
 			debug << "Resulting context is not signed, marking as failed\n";
 			success = false;
 			success = false;