101    {
  103        global::Interop.SspiCli.CredentialUse 
credUsage;
 
  104        global::Interop.SspiCli.SCHANNEL_CRED.Flags flags;
  106        {
  107            credUsage = global::Interop.SspiCli.CredentialUse.SECPKG_CRED_OUTBOUND;
 
  108            flags = global::Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_CRED_MANUAL_CRED_VALIDATION | global::Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_CRED_NO_DEFAULT_CREDS | global::Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_SEND_AUX_RECORD;
  110            {
  111                flags |= global::Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_USE_STRONG_CRYPTO;
  112            }
  113        }
  114        else
  115        {
  116            credUsage = global::Interop.SspiCli.CredentialUse.SECPKG_CRED_INBOUND;
 
  117            flags = global::Interop.SspiCli.SCHANNEL_CRED.Flags.SCH_SEND_AUX_RECORD;
  118        }
  120        {
  121            System.
Net.
NetEventSource.
Info(
$"flags=({flags}), ProtocolFlags=({protocolFlagsFromSslProtocols}), EncryptionPolicy={policy}", 
null, 
"AcquireCredentialsHandleSchannelCred");
 
  122        }
  124        global::Interop.Crypt32.CERT_CONTEXT* 
ptr = 
null;
 
  126        {
  127            sCHANNEL_CRED.cCreds = 1;
  128            ptr = (global::Interop.Crypt32.CERT_CONTEXT*)(
void*)
certificate.Handle;
 
  129            sCHANNEL_CRED.paCred = &
ptr;
 
  130        }
  132    }
static readonly System.Net.NetEventSource Log
 
static void Info(object thisOrContextObject, FormattableString formattableString=null, [CallerMemberName] string memberName=null)
 
static SafeFreeCredentials AcquireCredentialsHandle(SslStreamCertificateContext certificateContext, SslProtocols protocols, EncryptionPolicy policy, bool isServer)
 
static int GetProtocolFlagsFromSslProtocols(SslProtocols protocols, bool isServer)
 
static unsafe global::Interop.SspiCli.SCHANNEL_CRED CreateSecureCredential(global::Interop.SspiCli.SCHANNEL_CRED.Flags flags, int protocols, EncryptionPolicy policy)