17 internal struct UNICODE_STRING
26 internal static class Crypt32
111 internal struct CERT_CHAIN_POLICY_PARA
121 internal struct CERT_CHAIN_POLICY_STATUS
284 value.ProtocolListsSize = (uint)(
num2 + num);
286 value.ProtocolListSize = (
short)num;
303 internal static class SspiCli
306 internal struct CredHandle
602 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
605 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
608 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
611 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
614 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
617 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
620 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
623 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
626 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
641 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
642 internal unsafe
static extern int InitializeSecurityContextW(
ref CredHandle credentialHandle, [In]
void*
inContextPtr, [In]
byte*
targetName, [In]
ContextFlags inFlags, [In]
int reservedI, [In]
Endianness endianness, [In]
SecBufferDesc* inputBuffer, [In]
int reservedII,
ref CredHandle outContextPtr, [In][Out]
ref SecBufferDesc outputBuffer, [In][Out]
ref ContextFlags attributes,
out long timeStamp);
644 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
647 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
650 [
DllImport(
"sspicli.dll", ExactSpelling =
true, SetLastError =
true)]
static unsafe CERT_CONTEXT * CertEnumCertificatesInStore(IntPtr hCertStore, CERT_CONTEXT *pPrevCertContext)
static bool CertFreeCertificateContext(IntPtr pCertContext)
static bool CertVerifyCertificateChainPolicy(IntPtr pszPolicyOID, SafeX509ChainHandle pChainContext, [In] ref CERT_CHAIN_POLICY_PARA pPolicyPara, [In][Out] ref CERT_CHAIN_POLICY_STATUS pPolicyStatus)
static void SetLastError(int errorCode)
static bool CloseHandle(IntPtr handle)
static int QuerySecurityContextToken(ref CredHandle phContext, out SecurityContextTokenHandle handle)
static unsafe int AcquireCredentialsHandleW([In] string principal, [In] string moduleName, [In] int usage, [In] void *logonID, [In] SafeSspiAuthDataHandle authdata, [In] void *keyCallback, [In] void *keyArgument, ref CredHandle handlePtr, out long timeStamp)
static unsafe int AcceptSecurityContext(ref CredHandle credentialHandle, [In] void *inContextPtr, [In] SecBufferDesc *inputBuffer, [In] ContextFlags inFlags, [In] Endianness endianness, ref CredHandle outContextPtr, [In][Out] ref SecBufferDesc outputBuffer, [In][Out] ref ContextFlags attributes, out long timeStamp)
static SECURITY_STATUS SetCredentialsAttributesW([In] ref CredHandle handlePtr, [In] long ulAttribute, [In] ref SecPkgCred_ClientCertPolicy pBuffer, [In] long cbBuffer)
static int EnumerateSecurityPackagesW(out int pkgnum, out SafeFreeContextBuffer_SECURITY handle)
static int FreeContextBuffer([In] IntPtr contextBuffer)
static unsafe int QueryContextAttributesW(ref CredHandle contextHandle, [In] ContextAttribute attribute, [In] void *buffer)
static unsafe int AcquireCredentialsHandleW([In] string principal, [In] string moduleName, [In] int usage, [In] void *logonID, [In] IntPtr zero, [In] void *keyCallback, [In] void *keyArgument, ref CredHandle handlePtr, out long timeStamp)
static SECURITY_STATUS SspiFreeAuthIdentity([In] IntPtr authData)
static unsafe int CompleteAuthToken([In] void *inContextPtr, [In][Out] ref SecBufferDesc inputBuffers)
static unsafe int DecryptMessage([In] ref CredHandle contextHandle, [In][Out] ref SecBufferDesc inputOutput, [In] uint sequenceNumber, uint *qualityOfProtection)
static SECURITY_STATUS SspiEncodeStringsAsAuthIdentity([In] string userName, [In] string domainName, [In] string password, out SafeSspiAuthDataHandle authData)
static unsafe int AcquireCredentialsHandleW([In] string principal, [In] string moduleName, [In] int usage, [In] void *logonID, [In] SCHANNEL_CRED *authData, [In] void *keyCallback, [In] void *keyArgument, ref CredHandle handlePtr, out long timeStamp)
static int DeleteSecurityContext(ref CredHandle handlePtr)
static int EncryptMessage(ref CredHandle contextHandle, [In] uint qualityOfProtection, [In][Out] ref SecBufferDesc inputOutput, [In] uint sequenceNumber)
@ InitManualCredValidation
static unsafe int InitializeSecurityContextW(ref CredHandle credentialHandle, [In] void *inContextPtr, [In] byte *targetName, [In] ContextFlags inFlags, [In] int reservedI, [In] Endianness endianness, [In] SecBufferDesc *inputBuffer, [In] int reservedII, ref CredHandle outContextPtr, [In][Out] ref SecBufferDesc outputBuffer, [In][Out] ref ContextFlags attributes, out long timeStamp)
@ SECPKG_ATTR_APPLICATION_PROTOCOL
@ SECPKG_ATTR_CONNECTION_INFO
@ SECPKG_ATTR_CLIENT_CERT_POLICY
@ SECPKG_ATTR_CIPHER_INFO
@ SECPKG_ATTR_CLIENT_SPECIFIED_TARGET
@ SECPKG_ATTR_PACKAGE_INFO
@ SECPKG_ATTR_ISSUER_LIST_EX
@ SECPKG_ATTR_REMOTE_CERT_CONTEXT
@ SECPKG_ATTR_STREAM_SIZES
@ SECPKG_ATTR_UNIQUE_BINDINGS
@ SECPKG_ATTR_ENDPOINT_BINDINGS
@ SECPKG_ATTR_NEGOTIATION_INFO
@ SECPKG_ATTR_LOCAL_CERT_CONTEXT
static unsafe int ApplyControlToken([In] void *inContextPtr, [In][Out] ref SecBufferDesc inputBuffers)
static unsafe int AcquireCredentialsHandleW([In] string principal, [In] string moduleName, [In] int usage, [In] void *logonID, [In] SCH_CREDENTIALS *authData, [In] void *keyCallback, [In] void *keyArgument, ref CredHandle handlePtr, out long timeStamp)
static int FreeCredentialsHandle(ref CredHandle handlePtr)
@ ApplicationProtocolMismatch
@ NoAuthenticatingAuthority
ApplicationProtocolNegotiationExt
ApplicationProtocolNegotiationStatus
void CopyTo(KeyValuePair< TKey, TValue >[] array, int index)
static string net_ssl_app_protocols_invalid
unsafe SSL_EXTRA_CERT_CHAIN_POLICY_PARA * pvExtraPolicyPara
unsafe void * pvExtraPolicyStatus
unsafe byte * pbCertEncoded
MsgEncodingType dwCertEncodingType
unsafe CERT_INFO * pCertInfo
CRYPT_ALGORITHM_IDENTIFIER SignatureAlgorithm
CERT_PUBLIC_KEY_INFO SubjectPublicKeyInfo
CRYPT_BIT_BLOB IssuerUniqueId
CRYPT_BIT_BLOB SubjectUniqueId
CRYPT_ALGORITHM_IDENTIFIER Algorithm
unsafe fixed byte ProtocolId[255]
ApplicationProtocolNegotiationStatus ProtoNegoStatus
ApplicationProtocolNegotiationExt ProtoNegoExt
ApplicationProtocolNegotiationExt ProtocolExtensionType
static unsafe byte[] ToByteArray(List< SslApplicationProtocol > applicationProtocols)
@ TlsParametersCngAlgUsageCipher
@ TlsParametersCngAlgUsageCertSig
@ TlsParametersCngAlgUsageSignature
@ TlsParametersCngAlgUsageDigest
@ TlsParametersCngAlgUsageKeyExchange
unsafe UNICODE_STRING * rgstrChainingModes
unsafe UNICODE_STRING * strCngAlgId
TlsAlgorithmUsage eAlgorithmUsage
override string ToString()
int grbitEnabledProtocols
int dwMaximumCipherStrength
unsafe Crypt32.CERT_CONTEXT ** paCred
@ SCH_CRED_NO_DEFAULT_CREDS
@ SCH_CRED_NO_SYSTEM_MAPPER
@ SCH_CRED_NO_SERVERNAME_CHECK
@ SCH_CRED_MANUAL_CRED_VALIDATION
@ SCH_CRED_AUTO_CRED_VALIDATION
int dwMinimumCipherStrength
unsafe TLS_PARAMETERS * pTlsParameters
unsafe Crypt32.CERT_CONTEXT ** paCred
@ SCH_CRED_IGNORE_REVOCATION_OFFLINE
@ SCH_CRED_NO_DEFAULT_CREDS
@ SCH_ALLOW_NULL_ENCRYPTION
@ SCH_CRED_REVOCATION_CHECK_CHAIN
@ SCH_CRED_USE_DEFAULT_CREDS
@ SCH_CRED_CACHE_ONLY_URL_RETRIEVAL_ON_CREATE
@ SCH_CRED_NO_SYSTEM_MAPPER
@ SCH_CRED_REVOCATION_CHECK_END_CERT
@ SCH_CRED_NO_SERVERNAME_CHECK
@ SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT
@ SCH_USE_PRESHAREDKEY_ONLY
@ SCH_CRED_MANUAL_CRED_VALIDATION
@ SCH_CRED_AUTO_CRED_VALIDATION
@ SCH_CRED_IGNORE_NO_REVOCATION_CHECK
unsafe SecBufferDesc(int count)
static unsafe readonly int Size
SecurityBufferType BufferType
unsafe char * pwszSslCtlStoreName
uint dwUrlRetrievalTimeout
uint dwRevocationFreshnessTime
unsafe char * pwszSslCtlIdentifier
BOOL fCheckRevocationFreshnessTime
uint grbitDisabledProtocols
unsafe CRYPTO_SETTINGS * pDisabledCrypto
unsafe override string ToString()
static readonly IntPtr Zero