public unsafe static SecurityStatus SafeQueryContextAttributes( ref SafeCtxtHandle context, out SecPkgContextStreamSizes streamSizes) { fixed(void *buffer = &streamSizes) return(SafeQueryContextAttributes(ref context, UlAttribute.SecpkgAttrStreamSizes, buffer)); }
public unsafe static void QueryContextAttributes( ref SafeCtxtHandle context, out SecPkgContextStreamSizes streamSizes) { fixed(void *buffer = &streamSizes) QueryContextAttributes(ref context, UlAttribute.SecpkgAttrStreamSizes, buffer); }
public unsafe static void EncryptMessage( ref SafeCtxtHandle context, ref SecBufferDescEx message, uint messageSeqNo, void *pfQop) { try { message.Pin(); int error = Secur32Dll.EncryptMessage( ref context._Handle, pfQop, ref message._SecBufferDesc, messageSeqNo); if (error != 0) { throw new SspiException(error, @"EncryptMessage"); } } finally { message.Free(); } }
public unsafe static SecurityStatus SafeDecryptMessage( ref SafeCtxtHandle context, ref SecBufferDescEx message, uint messageSeqNo, void *pfQop) { try { message.Pin(); int error = Secur32Dll.DecryptMessage( ref context._Handle, ref message._SecBufferDesc, messageSeqNo, pfQop); return(Convert(error)); } catch { return(SecurityStatus.SecEUnknowError); } finally { message.Free(); } }
public unsafe static void QueryContextAttributes( ref SafeCtxtHandle context, UlAttribute attribute, void *buffer) { int error = Secur32Dll.QueryContextAttributesA( ref context._Handle, (uint)attribute, buffer); if (error != 0) { throw new SspiException(error, @"QueryContextAttributesA"); } }
public static unsafe SecurityStatus SafeAcceptSecurityContext( ref SafeCredHandle credential, ref SafeCtxtHandle context, ref SecBufferDescEx input, int contextReq, TargetDataRep targetDataRep, ref SafeCtxtHandle newContext, ref SecBufferDescEx output, out int contextAttr, out long timeStamp) { try { input.Pin(); output.Pin(); fixed(void *fixedContext = &context._Handle) { int error = Secur32Dll.AcceptSecurityContext( ref credential._Handle, (context.IsInvalid) ? null : fixedContext, ref input._SecBufferDesc, contextReq, (int)targetDataRep, ref newContext._Handle, ref output._SecBufferDesc, out contextAttr, out timeStamp); return(Convert(error)); } } catch { contextAttr = 0; timeStamp = 0; return(SecurityStatus.SecEUnknowError); } finally { input.Free(); output.Free(); } }
public unsafe static SecurityStatus SafeQueryContextAttributes( ref SafeCtxtHandle context, UlAttribute attribute, void *buffer) { try { int error = Secur32Dll.QueryContextAttributesA( ref context._Handle, (uint)attribute, buffer); return(Convert(error)); } catch { return(SecurityStatus.SecEUnknowError); } }