407 references to SslProtocols
Aspire.RabbitMQ.Client.Tests (2)
dotnet-svcutil-lib (19)
FrameworkFork\System.ServiceModel\System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (4)
34private SslProtocols _sslProtocols;
37private SslStreamSecurityUpgradeProvider(IDefaultCommunicationTimeouts timeouts, SecurityTokenManager clientSecurityTokenManager, bool requireClientCertificate, string scheme, IdentityVerifier identityVerifier, SslProtocols sslProtocols)
47private SslStreamSecurityUpgradeProvider(IDefaultCommunicationTimeouts timeouts, SecurityTokenProvider serverTokenProvider, bool requireClientCertificate, SecurityTokenAuthenticator clientCertificateAuthenticator, string scheme, IdentityVerifier identityVerifier, SslProtocols sslProtocols)
142public SslProtocols SslProtocols
http2cat (1)
IIS.FunctionalTests (1)
IIS.LongTests (1)
IIS.NewHandler.FunctionalTests (1)
IIS.NewShim.FunctionalTests (1)
IIS.Tests (3)
IISExpress.FunctionalTests (1)
InMemory.FunctionalTests (32)
HttpsConnectionMiddlewareTests.cs (13)
148Assert.True(tlsFeature.Protocol > SslProtocols.None, "Protocol");
185Assert.True(tlsFeature.Protocol > SslProtocols.None, "Protocol");
425stream.AuthenticateAsClientAsync("localhost", new X509CertificateCollection(), SslProtocols.Tls12 | SslProtocols.Tls11, false));
487stream.AuthenticateAsClientAsync("localhost", new X509CertificateCollection(), SslProtocols.Tls12 | SslProtocols.Tls11, false));
789EnabledSslProtocols = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12,
1133options.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls11;
1151async () => await stream.AuthenticateAsClientAsync("localhost", new X509CertificateCollection(), SslProtocols.Tls, false));
1395EnabledSslProtocols = SslProtocols.None,
Interop.FunctionalTests (3)
Kestrel.SampleApp (2)
Microsoft.AspNetCore.Connections.Abstractions (2)
Microsoft.AspNetCore.InternalTesting (1)
Microsoft.AspNetCore.Server.HttpSys (15)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (5)
Microsoft.AspNetCore.Server.IIS (15)
Microsoft.AspNetCore.Server.Kestrel.Core (26)
Internal\Infrastructure\KestrelMetrics.cs (9)
283public void TlsHandshakeStop(ConnectionMetricsContext metricsContext, long startTimestamp, long currentTimestamp, SslProtocols? protocol = null, Exception? exception = null)
292private void TlsHandshakeStopCore(ConnectionMetricsContext metricsContext, long startTimestamp, long currentTimestamp, SslProtocols? protocol = null, Exception? exception = null)
378public static bool TryGetHandshakeProtocol(SslProtocols protocols, [NotNullWhen(true)] out string? name, [NotNullWhen(true)] out string? version)
387case SslProtocols.Ssl2:
391case SslProtocols.Ssl3:
395case SslProtocols.Tls:
399case SslProtocols.Tls11:
403case SslProtocols.Tls12:
407case SslProtocols.Tls13:
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (11)
Microsoft.AspNetCore.Server.Kestrel.Tests (19)
KestrelConfigurationLoaderTests.cs (13)
799new KeyValuePair<string, string>("Endpoints:End1:SslProtocols:0", SslProtocols.Tls13.ToString()),
836new KeyValuePair<string, string>("EndpointDefaults:SslProtocols:0", SslProtocols.Tls13.ToString()),
1179Assert.Equal(SslProtocols.None, opt.SslProtocols);
1194Assert.Equal(SslProtocols.Tls11, opt.HttpsOptions.SslProtocols);
1204Assert.Equal(SslProtocols.None, httpsOptions.SslProtocols);
1222opt.SslProtocols = SslProtocols.Tls12;
1235Assert.Equal(SslProtocols.Tls11, opt.HttpsOptions.SslProtocols);
1264Assert.Equal(SslProtocols.Tls11, opt.HttpsOptions.SslProtocols);
1283Assert.Equal(SslProtocols.Tls11, opt.SslProtocols);
1285opt.SslProtocols = SslProtocols.Tls12;
1297Assert.Equal(SslProtocols.Tls12, opt.HttpsOptions.SslProtocols);
1360new KeyValuePair<string, string>("Endpoints:End1:Sni:*.example.org:SslProtocols:0", SslProtocols.Tls13.ToString()),
1372Assert.Equal(SslProtocols.Tls13, sniConfig.SslProtocols);
Microsoft.AspNetCore.Shared.Tests (12)
Microsoft.AspNetCore.WebSockets.ConformanceTests (3)
netstandard (1)
Sockets.FunctionalTests (1)
System (1)
System.Net.Http (10)
System.Net.Http.WinHttpHandler (1)
System.Net.HttpListener (1)
System.Net.Mail (9)
System.Net.Quic (6)
System.Net.Requests (17)
System.Net.Security (138)
System\Net\Security\NetSecurityTelemetry.cs (22)
144private void HandshakeStop(SslProtocols protocol)
148Debug.Assert(sizeof(SslProtocols) == 4);
171HandshakeStop(SslProtocols.None);
175public void HandshakeCompleted(SslProtocols protocol, long startingTimestamp, bool connectionOpen)
183Debug.Assert(Enum.GetValues<SslProtocols>()[^1] == SslProtocols.Tls13, "Make sure to add a counter for new SslProtocols");
188case SslProtocols.Tls:
193case SslProtocols.Tls11:
199case SslProtocols.Tls12:
204case SslProtocols.Tls13:
224public void ConnectionClosed(SslProtocols protocol)
231case SslProtocols.Tls:
235case SslProtocols.Tls11:
240case SslProtocols.Tls12:
244case SslProtocols.Tls13:
335SslProtocols protocol = stream.GetSslProtocolInternal();
351static (string?, string?) GetNameAndVersionString(SslProtocols protocol) => protocol switch
354SslProtocols.Ssl2 => ("ssl", "2"),
355SslProtocols.Ssl3 => ("ssl", "3"),
358SslProtocols.Tls => ("tls", "1"),
359SslProtocols.Tls12 => ("tls", "1.2"),
361SslProtocols.Tls13 => ("tls", "1.3"),
System\Net\Security\SslStream.cs (25)
242SslProtocols enabledSslProtocols, bool checkCertificateRevocation,
280SslProtocols enabledSslProtocols, bool checkCertificateRevocation,
318public virtual void AuthenticateAsClient(string targetHost, X509CertificateCollection? clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
352public virtual void AuthenticateAsServer(X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
380public virtual Task AuthenticateAsClientAsync(string targetHost, X509CertificateCollection? clientCertificates, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
419public virtual Task AuthenticateAsServerAsync(X509Certificate serverCertificate, bool clientCertificateRequired, SslProtocols enabledSslProtocols, bool checkCertificateRevocation)
481public virtual SslProtocols SslProtocol
491internal SslProtocols GetSslProtocolInternal()
495return SslProtocols.None;
498SslProtocols proto = (SslProtocols)_connectionInfo.Protocol;
499SslProtocols ret = SslProtocols.None;
503if ((proto & SslProtocols.Ssl2) != 0)
505ret |= SslProtocols.Ssl2;
508if ((proto & SslProtocols.Ssl3) != 0)
510ret |= SslProtocols.Ssl3;
515if ((proto & SslProtocols.Tls) != 0)
517ret |= SslProtocols.Tls;
520if ((proto & SslProtocols.Tls11) != 0)
522ret |= SslProtocols.Tls11;
526if ((proto & SslProtocols.Tls12) != 0)
528ret |= SslProtocols.Tls12;
531if ((proto & SslProtocols.Tls13) != 0)
533ret |= SslProtocols.Tls13;
System\Net\Security\TlsFrameHelper.cs (26)
89public SslProtocols Version;
122public SslProtocols SupportedVersions;
208header.Version = SslProtocols.Ssl2;
261if (info.Header.Version == SslProtocols.Ssl2)
277if (((int)info.Header.Version >= (int)SslProtocols.Tls) &&
317private static byte[] CreateProtocolVersionAlert(SslProtocols version) =>
320SslProtocols.Tls13 => s_protocolMismatch13,
321SslProtocols.Tls12 => s_protocolMismatch12,
323SslProtocols.Tls11 => s_protocolMismatch11,
324SslProtocols.Tls => s_protocolMismatch10,
327SslProtocols.Ssl3 => s_protocolMismatch30,
332public static byte[] CreateAlertFrame(SslProtocols version, TlsAlertDescription reason)
339else if ((int)version > (int)SslProtocols.Tls)
346case SslProtocols.Tls13:
350case SslProtocols.Tls11:
353case SslProtocols.Tls:
521if (!TryGetSupportedVersionsFromExtension(extensionData, out SslProtocols versions))
631private static bool TryGetSupportedVersionsFromExtension(ReadOnlySpan<byte> extensionData, out SslProtocols protocols)
646protocols = SslProtocols.None;
732private static SslProtocols TlsMinorVersionToProtocol(byte value)
7364 => SslProtocols.Tls13,
7373 => SslProtocols.Tls12,
7392 => SslProtocols.Tls11,
7401 => SslProtocols.Tls,
7430 => SslProtocols.Ssl3,
745_ => SslProtocols.None,
System.ServiceModel.NetFramingBase (16)
System\ServiceModel\Channels\SslStreamSecurityUpgradeProvider.cs (3)
29private SslStreamSecurityUpgradeProvider(IDefaultCommunicationTimeouts timeouts, SecurityTokenManager clientSecurityTokenManager, bool requireClientCertificate, string scheme, IdentityVerifier identityVerifier, SslProtocols sslProtocols)
39private SslStreamSecurityUpgradeProvider(IDefaultCommunicationTimeouts timeouts, SecurityTokenProvider serverTokenProvider, bool requireClientCertificate, SecurityTokenAuthenticator clientCertificateAuthenticator, string scheme, IdentityVerifier identityVerifier, SslProtocols sslProtocols)
93public SslProtocols SslProtocols { get; }
System.ServiceModel.NetTcp (13)
System.ServiceModel.Primitives (4)
System.ServiceModel.UnixDomainSocket (13)