コード例 #1
0
ファイル: Secur32.cs プロジェクト: vf1/serversockets
        public unsafe static SecurityStatus SafeVerifySignature(
            SafeCtxtHandle context,
            ref SecBufferDescEx message,
            int sequence)
        {
            try
            {
                message.Pin();

                int qop;

                var error = Secur32Dll.VerifySignature(
                    ref context.Handle,
                    ref message.SecBufferDesc,
                    sequence,
                    out qop);

                return(Convert(error));
            }
            catch
            {
                return(SecurityStatus.SEC_E_UNKNOW_ERROR);
            }
            finally
            {
                message.Free();
            }
        }
コード例 #2
0
        public static SecurityStatus SafeVerifySignature(SafeCtxtHandle context, ref SecBufferDescEx message, int sequence)
        {
            SecurityStatus result;

            try
            {
                message.Pin();
                int num;
                int error = Secur32Dll.VerifySignature(ref context.Handle, ref message.SecBufferDesc, sequence, out num);
                result = Sspi.Convert(error);
            }
            catch
            {
                result = (SecurityStatus)4294967295u;
            }
            finally
            {
                message.Free();
            }
            return(result);
        }