Skip to content

Commit

Permalink
Fixes regression in Integrated Security auth in Managed SNI
Browse files Browse the repository at this point in the history
  • Loading branch information
cheenamalhotra committed Oct 28, 2020
1 parent b48de5d commit c1b6fed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,14 @@ internal static int QueryMaxTokenSize(string package)
// This value is not used on Unix
return 0;
}


internal static SecurityStatusPal CompleteAuthToken(
ref SafeDeleteContext securityContext,
SecurityBuffer[] inSecurityBufferArray)
{
return new SecurityStatusPal(SecurityStatusPalErrorCode.OK);
}

internal static SafeFreeCredentials AcquireDefaultCredential(string package, bool isServer)
{
return AcquireCredentialsHandle(package, isServer, new NetworkCredential(string.Empty, string.Empty, string.Empty));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ internal void GenSspiClientContext(SspiClientContextStatus sspiClientContextStat
inSecurityBufferArray = Array.Empty<SecurityBuffer>();
}

int tokenSize = MaxTokenSize;
int tokenSize = NegotiateStreamPal.QueryMaxTokenSize(securityPackage);

SecurityBuffer outSecurityBuffer = new SecurityBuffer(tokenSize, SecurityBufferType.SECBUFFER_TOKEN);

ContextFlagsPal requestedContextFlags = ContextFlagsPal.Connection
Expand All @@ -119,7 +120,7 @@ internal void GenSspiClientContext(SspiClientContextStatus sspiClientContextStat
statusCode.ErrorCode == SecurityStatusPalErrorCode.CompAndContinue)
{
inSecurityBufferArray = new SecurityBuffer[] { outSecurityBuffer };
statusCode = new SecurityStatusPal(SecurityStatusPalErrorCode.OK);
statusCode = NegotiateStreamPal.CompleteAuthToken(ref securityContext, inSecurityBufferArray);
outSecurityBuffer.token = null;
}

Expand Down

0 comments on commit c1b6fed

Please sign in to comment.