111 references to _sslAuthenticationOptions
System.Net.Security (111)
System\Net\Security\SslStream.cs (18)
215
_sslAuthenticationOptions
.EncryptionPolicy = encryptionPolicy;
216
_sslAuthenticationOptions
.CertValidationDelegate = userCertificateValidationCallback;
217
_sslAuthenticationOptions
.CertSelectionDelegate = userCertificateSelectionCallback;
251
EncryptionPolicy =
_sslAuthenticationOptions
.EncryptionPolicy,
290
EncryptionPolicy =
_sslAuthenticationOptions
.EncryptionPolicy,
326
EncryptionPolicy =
_sslAuthenticationOptions
.EncryptionPolicy,
338
_sslAuthenticationOptions
.UpdateOptions(sslClientAuthenticationOptions);
360
EncryptionPolicy =
_sslAuthenticationOptions
.EncryptionPolicy,
370
_sslAuthenticationOptions
.UpdateOptions(sslServerAuthenticationOptions);
388
EncryptionPolicy =
_sslAuthenticationOptions
.EncryptionPolicy,
399
_sslAuthenticationOptions
.UpdateOptions(sslClientAuthenticationOptions);
413
EncryptionPolicy =
_sslAuthenticationOptions
.EncryptionPolicy,
427
EncryptionPolicy =
_sslAuthenticationOptions
.EncryptionPolicy,
436
_sslAuthenticationOptions
.UpdateOptions(sslServerAuthenticationOptions);
442
_sslAuthenticationOptions
.UpdateOptions(optionsCallback, state);
479
public override bool IsServer =>
_sslAuthenticationOptions
.IsServer;
539
public virtual bool CheckCertRevocationStatus =>
_sslAuthenticationOptions
.CertificateRevocationCheckMode != X509RevocationMode.NoCheck;
647
return
_sslAuthenticationOptions
.TargetHost;
System\Net\Security\SslStream.IO.cs (16)
24
private object _handshakeLock =>
_sslAuthenticationOptions
;
130
NetSecurityTelemetry.Log.HandshakeStart(IsServer,
_sslAuthenticationOptions
.TargetHost);
222
_sslAuthenticationOptions
.RemoteCertRequired = true;
261
CompleteHandshake(
_sslAuthenticationOptions
);
379
CompleteHandshake(
_sslAuthenticationOptions
);
432
_sslAuthenticationOptions
!.IsServer) // guard against malicious endpoints. We should not see ClientHello on client.
438
if (OperatingSystem.IsMacOS() &&
_sslAuthenticationOptions
.IsServer)
456
_sslAuthenticationOptions
.TargetHost = _lastFrame.TargetName;
459
if (
_sslAuthenticationOptions
.ServerOptionDelegate != null)
462
await
_sslAuthenticationOptions
.ServerOptionDelegate(this, new SslClientHelloInfo(
_sslAuthenticationOptions
.TargetHost, _lastFrame.SupportedVersions),
463
_sslAuthenticationOptions
.UserState, cancellationToken).ConfigureAwait(false);
464
_sslAuthenticationOptions
.UpdateOptions(userOptions);
579
if (!VerifyRemoteCertificate(
_sslAuthenticationOptions
.CertValidationDelegate,
_sslAuthenticationOptions
.CertificateContext?.Trust, ref alertToken, out sslPolicyErrors, out chainStatus))
805
if (
_sslAuthenticationOptions
.AllowRenegotiation || SslProtocol == SslProtocols.Tls13 || _nestedAuth != NestedState.StreamNotInUse)
System\Net\Security\SslStream.Protocol.cs (77)
84
return
_sslAuthenticationOptions
.CertificateContext?.TargetCertificate;
158
return
_sslAuthenticationOptions
.RemoteCertRequired;
323
if (
_sslAuthenticationOptions
.CertificateContext != null)
333
_selectedClientCertificate =
_sslAuthenticationOptions
.CertificateContext.TargetCertificate;
335
return
_sslAuthenticationOptions
.CertificateContext.TargetCertificate;
337
else if (
_sslAuthenticationOptions
.CertSelectionDelegate != null)
347
_sslAuthenticationOptions
.ClientCertificates ??= new X509CertificateCollection();
348
clientCertificate =
_sslAuthenticationOptions
.CertSelectionDelegate(this,
_sslAuthenticationOptions
.TargetHost,
_sslAuthenticationOptions
.ClientCertificates, remoteCert, issuers);
363
if (
_sslAuthenticationOptions
.ClientCertificates == null ||
_sslAuthenticationOptions
.ClientCertificates.Count == 0)
375
else if (_credentialsHandle == null &&
_sslAuthenticationOptions
.ClientCertificates != null &&
_sslAuthenticationOptions
.ClientCertificates.Count > 0)
379
clientCertificate =
_sslAuthenticationOptions
.ClientCertificates[0];
388
else if (
_sslAuthenticationOptions
.ClientCertificates != null &&
_sslAuthenticationOptions
.ClientCertificates.Count > 0)
407
for (int i = 0; i <
_sslAuthenticationOptions
.ClientCertificates.Count; ++i)
419
certificateEx = MakeEx(
_sslAuthenticationOptions
.ClientCertificates[i]);
474
if (certificateEx != null && (object)certificateEx != (object)
_sslAuthenticationOptions
.ClientCertificates[i])
482
NetEventSource.Log.SelectedCert(
_sslAuthenticationOptions
.ClientCertificates[i], this);
484
EnsureInitialized(ref filteredCerts).Add(
_sslAuthenticationOptions
.ClientCertificates[i]);
516
if ((selectedCert = FindCertificateWithPrivateKey(this,
_sslAuthenticationOptions
.IsServer, clientCertificate)) != null)
584
_sslAuthenticationOptions
.CertificateContext ??= SslStreamCertificateContext.Create(selectedCert);
587
if (SslStreamPal.TryUpdateClintCertificate(_credentialsHandle, _securityContext,
_sslAuthenticationOptions
))
603
_sslAuthenticationOptions
.EnabledSslProtocols,
604
_sslAuthenticationOptions
.IsServer,
605
_sslAuthenticationOptions
.EncryptionPolicy,
606
_sslAuthenticationOptions
.CertificateRevocationCheckMode != X509RevocationMode.NoCheck,
607
_sslAuthenticationOptions
.AllowTlsResume,
643
_sslAuthenticationOptions
.CertificateContext ??= SslStreamCertificateContext.Create(selectedCert!);
650
_sslAuthenticationOptions
.CertificateContext ??= SslStreamCertificateContext.Create(selectedCert!);
653
_credentialsHandle = AcquireCredentialsHandle(
_sslAuthenticationOptions
, newCredentialsRequested);
661
_sslAuthenticationOptions
.CertificateContext ??= SslStreamCertificateContext.Create(selectedCert);
683
if (
_sslAuthenticationOptions
.ServerCertSelectionDelegate != null)
685
localCertificate =
_sslAuthenticationOptions
.ServerCertSelectionDelegate(this,
_sslAuthenticationOptions
.TargetHost);
689
NetEventSource.Error(this, $"ServerCertSelectionDelegate returned no certificate for '{
_sslAuthenticationOptions
.TargetHost}'.");
696
else if (
_sslAuthenticationOptions
.CertSelectionDelegate != null)
699
tempCollection.Add(
_sslAuthenticationOptions
.CertificateContext!.TargetCertificate!);
701
localCertificate =
_sslAuthenticationOptions
.CertSelectionDelegate(this, string.Empty, tempCollection, null, Array.Empty<string>());
705
NetEventSource.Error(this, $"CertSelectionDelegate returned no certificaete for '{
_sslAuthenticationOptions
.TargetHost}'.");
712
else if (
_sslAuthenticationOptions
.CertificateContext != null)
714
selectedCert =
_sslAuthenticationOptions
.CertificateContext.TargetCertificate;
731
selectedCert = FindCertificateWithPrivateKey(this,
_sslAuthenticationOptions
.IsServer, localCertificate);
739
_sslAuthenticationOptions
.CertificateContext = SslStreamCertificateContext.Create(selectedCert);
742
Debug.Assert(
_sslAuthenticationOptions
.CertificateContext != null);
747
bool sendTrustedList =
_sslAuthenticationOptions
.CertificateContext!.Trust?._sendTrustInHandshake ?? false;
749
_sslAuthenticationOptions
.EnabledSslProtocols,
750
_sslAuthenticationOptions
.IsServer,
751
_sslAuthenticationOptions
.EncryptionPolicy,
752
_sslAuthenticationOptions
.CertificateRevocationCheckMode != X509RevocationMode.NoCheck,
753
_sslAuthenticationOptions
.AllowTlsResume,
762
_credentialsHandle = AcquireCredentialsHandle(
_sslAuthenticationOptions
);
868
cachedCreds =
_sslAuthenticationOptions
.IsServer
873
if (
_sslAuthenticationOptions
.IsServer)
875
sendTrustList =
_sslAuthenticationOptions
.CertificateContext?.Trust?._sendTrustInHandshake ?? false;
882
_sslAuthenticationOptions
);
888
_sslAuthenticationOptions
,
898
_sslAuthenticationOptions
);
904
string hostName = TargetHostNameHelper.NormalizeHostName(
_sslAuthenticationOptions
.TargetHost);
911
_sslAuthenticationOptions
);
927
_sslAuthenticationOptions
);
951
_sslAuthenticationOptions
.EnabledSslProtocols,
952
_sslAuthenticationOptions
.IsServer,
953
_sslAuthenticationOptions
.EncryptionPolicy,
954
_sslAuthenticationOptions
.CertificateRevocationCheckMode != X509RevocationMode.NoCheck,
955
_sslAuthenticationOptions
.AllowTlsResume,
971
_sslAuthenticationOptions
);
1049
X509Certificate2? certificate = CertificateValidationPal.GetRemoteCertificate(_securityContext, ref chain,
_sslAuthenticationOptions
.CertificateChainPolicy);
1070
if (
_sslAuthenticationOptions
.CertificateChainPolicy != null)
1072
chain.ChainPolicy =
_sslAuthenticationOptions
.CertificateChainPolicy;
1076
chain.ChainPolicy.RevocationMode =
_sslAuthenticationOptions
.CertificateRevocationCheckMode;
1097
chain.ChainPolicy.ApplicationPolicy.Add(
_sslAuthenticationOptions
.IsServer ? s_clientAuthOid : s_serverAuthOid);
1104
_sslAuthenticationOptions
.CheckCertName,
1105
_sslAuthenticationOptions
.IsServer,
1106
TargetHostNameHelper.NormalizeHostName(
_sslAuthenticationOptions
.TargetHost));