/// <summary> /// Performs basic initialization of a new instance of the ServerContext class. The ServerContext /// is not ready for message manipulation until a security context has been established with a client. /// </summary> /// <param name="cred"></param> /// <param name="requestedAttribs"></param> public CServerContext(CServerCredential cred, CContextAttrib requestedAttribs) : base(cred) { this.requestedAttribs = requestedAttribs; this.finalAttribs = CContextAttrib.Zero; this.impersonating = false; this.SupportsImpersonate = this.Credential.PackageInfo.Capabilities.HasFlag(CSecPkgCapability.Impersonation); }
internal static extern CSecurityStatus AcceptSecurityContext_2( ref CRawSspiHandle credHandle, ref CRawSspiHandle oldContextHandle, IntPtr inputBuffer, CContextAttrib requestedAttribs, CSecureBufferDataRep dataRep, ref CRawSspiHandle newContextHandle, IntPtr outputBuffer, ref CContextAttrib outputAttribs, ref CTimeStamp expiry );
internal static extern CSecurityStatus InitializeSecurityContext_2( ref CRawSspiHandle credentialHandle, ref CRawSspiHandle previousHandle, string serverPrincipleName, CContextAttrib requiredAttribs, int reserved1, CSecureBufferDataRep dataRep, IntPtr inputBuffer, int reserved2, ref CRawSspiHandle newContextHandle, IntPtr outputBuffer, ref CContextAttrib contextAttribs, ref CTimeStamp expiry );
/// <summary> /// Initializes a new instance of the ClientContext class. The context is not fully initialized and usable /// until the authentication cycle has been completed. /// </summary> /// <param name="cred">The security credential to authenticate as.</param> /// <param name="serverPrinc">The principle name of the server to connect to, or null for any.</param> /// <param name="requestedAttribs">Requested attributes that describe the desired properties of the /// context once it is established. If a context cannot be established that satisfies the indicated /// properties, the context initialization is aborted.</param> public CClientContext(CClientCredential cred, string serverPrinc, CContextAttrib requestedAttribs) : base(cred) { this.serverPrinc = serverPrinc; this.requestedAttribs = requestedAttribs; }