コード例 #1
0
        public static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SSPIInterface secModule, SafeDeleteContext securityContext, Interop.SspiCli.ContextAttribute contextAttribute)
        {
            if (NetEventSource.IsEnabled)
            {
                NetEventSource.Enter(null, contextAttribute);
            }

            SafeFreeContextBufferChannelBinding result;
            int errorCode = secModule.QueryContextChannelBinding(securityContext, contextAttribute, out result);

            if (errorCode != 0)
            {
                if (NetEventSource.IsEnabled)
                {
                    NetEventSource.Exit(null, $"ERROR = {ErrorDescription(errorCode)}");
                }
                return(null);
            }

            if (NetEventSource.IsEnabled)
            {
                NetEventSource.Exit(null, result);
            }
            return(result);
        }
コード例 #2
0
ファイル: SSPIWrapper.cs プロジェクト: yetanotherchris/corefx
        public static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SSPIInterface secModule, SafeDeleteContext securityContext, Interop.SspiCli.ContextAttribute contextAttribute)
        {
            if (GlobalLog.IsEnabled)
            {
                GlobalLog.Enter(nameof(QueryContextChannelBinding), contextAttribute.ToString());
            }

            SafeFreeContextBufferChannelBinding result;
            int errorCode = secModule.QueryContextChannelBinding(securityContext, contextAttribute, out result);

            if (errorCode != 0)
            {
                if (GlobalLog.IsEnabled)
                {
                    GlobalLog.Leave(nameof(QueryContextChannelBinding), "ERROR = " + ErrorDescription(errorCode));
                }
                return(null);
            }

            if (GlobalLog.IsEnabled)
            {
                GlobalLog.Leave(nameof(QueryContextChannelBinding), LoggingHash.HashString(result));
            }
            return(result);
        }
コード例 #3
0
        public static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SSPIInterface SecModule, SafeDeleteContext securityContext, ContextAttribute contextAttribute)
        {
            SafeFreeContextBufferChannelBinding binding;

            if (SecModule.QueryContextChannelBinding(securityContext, contextAttribute, out binding) != 0)
            {
                return(null);
            }
            return(binding);
        }
コード例 #4
0
ファイル: _SSPIWrapper.cs プロジェクト: talha020/corefx
        internal static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SSPIInterface SecModule, SafeDeleteContext securityContext, ChannelBindingKind contextAttribute)
        {
            GlobalLog.Enter("QueryContextChannelBinding", contextAttribute.ToString());

            SafeFreeContextBufferChannelBinding result;

            int errorCode = SecModule.QueryContextChannelBinding(securityContext, contextAttribute, out result);

            if (result != null)
            {
                GlobalLog.Leave("QueryContextChannelBinding", Logging.HashString(result));
            }

            return(result);
        }
コード例 #5
0
        public static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SSPIInterface SecModule, SafeDeleteContext securityContext, ContextAttribute contextAttribute)
        {
            GlobalLog.Enter("QueryContextChannelBinding", contextAttribute.ToString());

            SafeFreeContextBufferChannelBinding result;
            int errorCode = SecModule.QueryContextChannelBinding(securityContext, contextAttribute, out result);

            if (errorCode != 0)
            {
                GlobalLog.Leave("QueryContextChannelBinding", "ERROR = " + ErrorDescription(errorCode));
                return(null);
            }

            GlobalLog.Leave("QueryContextChannelBinding", ValidationHelper.HashString(result));
            return(result);
        }
コード例 #6
0
 public static SafeFreeContextBufferChannelBinding QueryContextChannelBinding(SSPIInterface SecModule, SafeDeleteContext securityContext, ContextAttribute contextAttribute)
 {
     SafeFreeContextBufferChannelBinding binding;
     if (SecModule.QueryContextChannelBinding(securityContext, contextAttribute, out binding) != 0)
     {
         return null;
     }
     return binding;
 }