internal static SecurityStatusPal CompleteAuthToken(
     ref SafeDeleteContext securityContext,
     SecurityBuffer[] inSecurityBufferArray)
 {
     Interop.SECURITY_STATUS winStatus = (Interop.SECURITY_STATUS)SSPIWrapper.CompleteAuthToken(
         GlobalSSPI.SSPIAuth,
         ref securityContext,
         inSecurityBufferArray);
     return(SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(winStatus));
 }
        internal static SecurityStatusPal CompleteAuthToken(
            ref SafeDeleteContext securityContext,
            byte[] incomingBlob)
        {
            var inSecurityBuffer = new SecurityBuffer(incomingBlob, SecurityBufferType.SECBUFFER_TOKEN);

            Interop.SECURITY_STATUS winStatus = (Interop.SECURITY_STATUS)SSPIWrapper.CompleteAuthToken(
                GlobalSSPI.SSPIAuth,
                ref securityContext,
                in inSecurityBuffer);
            return(SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(winStatus));
        }
Пример #3
0
        internal static SecurityStatusPal CompleteAuthToken(
            ref SafeDeleteContext?securityContext,
            byte[]?incomingBlob)
        {
            // There is only one SafeDeleteContext type on Windows which is SafeDeleteSslContext so this cast is safe.
            SafeDeleteSslContext?sslContext = (SafeDeleteSslContext?)securityContext;
            var inSecurityBuffer            = new SecurityBuffer(incomingBlob, SecurityBufferType.SECBUFFER_TOKEN);

            Interop.SECURITY_STATUS winStatus = (Interop.SECURITY_STATUS)SSPIWrapper.CompleteAuthToken(
                GlobalSSPI.SSPIAuth,
                ref sslContext,
                in inSecurityBuffer);
            securityContext = sslContext;
            return(SecurityStatusAdapterPal.GetSecurityStatusPalFromInterop(winStatus));
        }