本文整理汇总了C#中SecHandle类的典型用法代码示例。如果您正苦于以下问题:C# SecHandle类的具体用法?C# SecHandle怎么用?C# SecHandle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SecHandle类属于命名空间,在下文中一共展示了SecHandle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AcquireCredentialsHandle
private extern static int AcquireCredentialsHandle(
string pszPrincipal,
string pszPackage,
int fCredentialUse,
IntPtr pvLogonID,
IntPtr pAuthData,
IntPtr pGetKeyFn,
IntPtr pvGetKeyArgument,
ref SecHandle phCredential,
out SecHandle ptsExpiry
);
示例2: InitializeSecurityContext
static extern int InitializeSecurityContext(
ref SecHandle phCredential,
IntPtr phContext,
string pszTargetName,
int fContextReq,
int Reserved1,
int TargetDataRep,
IntPtr pInput,
int Reserved2,
out SecHandle phNewContext,
out SecBufferDesc pOutput,
out int pfContextAttr,
out SecHandle ptsExpiry);
示例3: ImpersonateSecurityContext__
private static extern int ImpersonateSecurityContext__(SecHandle phContext);
示例4: FreeCredentialsHandle
public static extern int FreeCredentialsHandle(ref SecHandle phCredential);
示例5: AcquireCredentialsHandle
public static extern int AcquireCredentialsHandle(string pszPrincipal, string pszPackage, uint fCredentialUse,
IntPtr pvLogonID, IntPtr pAuthData, IntPtr pGetKeyFn,
IntPtr pvGetKeyArgument, ref SecHandle phCredential,
ref long ptsExpiry);
示例6: CloseClientCredentials
private void CloseClientCredentials()
{
if (!_clientCredentials.IsInvalid)
{
FreeCredentialsHandle(ref _clientCredentials);
_clientCredentials = new SecHandle();
}
}
示例7: DeleteSecurityContext
static extern int DeleteSecurityContext(ref SecHandle phContext); //PCtxtHandle
示例8: InitializeSecurityContext
static extern int InitializeSecurityContext(
ref SecHandle phCredential,//PCredHandle
ref SecHandle phContext, //PCtxtHandle
string pszTargetName,
int fContextReq,
int Reserved1,
int TargetDataRep,
ref SecBufferDesc SecBufferDesc, //PSecBufferDesc SecBufferDesc
int Reserved2,
out SecHandle phNewContext, //PCtxtHandle
ref SecBufferDesc pOutput, //PSecBufferDesc SecBufferDesc
out uint pfContextAttr, //managed ulong == 64 bits!!!
out SecInteger ptsExpiry //PTimeStamp
);
示例9: FreeCredentialsHandle
private static extern int FreeCredentialsHandle(
ref SecHandle phCredential
);
示例10: DeleteSecurityContext
/// <summary>
/// Calls DeleteSecurityContext SSPI API function.
/// Ignores all possible returned errors.
/// </summary>
/// <param name="phContext">Security context being deleted.</param>
public static void DeleteSecurityContext(SecHandle phContext)
{
if (_isNT)
DeleteSecurityContext_NT(phContext);
else
DeleteSecurityContext__(phContext);
phContext.dwLower = 0;
phContext.dwUpper = 0;
}
示例11: VerifySignature__
private static extern int VerifySignature__(SecHandle phContext,
ref SecBufferDescNative pMessage, int MessageSeqNo,
ref int pfQOP);
示例12: RevertSecurityContext__
private static extern int RevertSecurityContext__(SecHandle phContext);
示例13: QuerySecurityContextToken__
private static extern int QuerySecurityContextToken__(SecHandle phContext, out IntPtr phToken);
示例14: QueryContextAttributes__
private static extern int QueryContextAttributes__(SecHandle phContext,
int ulAttribute, ref SecPkgContext_Sizes pBuffer);
示例15: MakeSignature__
private static extern int MakeSignature__(SecHandle phContext, int fQOP,
ref SecBufferDescNative pMessage, int MessageSeqNo);