5 instantiations of SslApplicationProtocol
System.Net.Quic (1)
System\Net\Quic\QuicConnection.cs (1)
630_negotiatedApplicationProtocol = new SslApplicationProtocol(new Span<byte>(data.NegotiatedAlpn, data.NegotiatedAlpnLength).ToArray());
System.Net.Security (4)
System\Net\Security\SslApplicationProtocol.cs (3)
19public static readonly SslApplicationProtocol Http3 = new SslApplicationProtocol(s_http3Utf8, copy: false); 21public static readonly SslApplicationProtocol Http2 = new SslApplicationProtocol(s_http2Utf8, copy: false); 23public static readonly SslApplicationProtocol Http11 = new SslApplicationProtocol(s_http11Utf8, copy: false);
System\Net\Security\SslStream.cs (1)
569return _connectionInfo.ApplicationProtocol != null ? new SslApplicationProtocol(_connectionInfo.ApplicationProtocol, false) : default;
126 references to SslApplicationProtocol
http2cat (2)
src\Shared\Http2cat\Http2CatHostedService.cs (2)
100ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http2 },
IIS.FunctionalTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (2)
100ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http2 },
IIS.LongTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (2)
100ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http2 },
IIS.NewHandler.FunctionalTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (2)
100ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http2 },
IIS.NewShim.FunctionalTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (2)
100ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http2 },
IISExpress.FunctionalTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (2)
100ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http2 },
InMemory.FunctionalTests (19)
Http2\TlsTests.cs (4)
45Assert.Equal(tlsFeature.ApplicationProtocol, SslApplicationProtocol.Http2.Protocol); 68ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http2, SslApplicationProtocol.Http11 },
HttpsConnectionMiddlewareTests.cs (13)
941ApplicationProtocols = new() { SslApplicationProtocol.Http2, SslApplicationProtocol.Http11, }, 943Assert.Equal(SslApplicationProtocol.Http2, stream.NegotiatedApplicationProtocol); 974ApplicationProtocols = new() { SslApplicationProtocol.Http2, SslApplicationProtocol.Http11, }, 976Assert.Equal(SslApplicationProtocol.Http2, stream.NegotiatedApplicationProtocol); 1007ApplicationProtocols = new() { SslApplicationProtocol.Http2, SslApplicationProtocol.Http11, }, 1400ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http11, SslApplicationProtocol.Http2 }, 1408SslApplicationProtocol.Http2 : 1409SslApplicationProtocol.Http11,
HttpsTests.cs (2)
622Assert.Collection(tlsOptions.ApplicationProtocols, p => Assert.Equal(SslApplicationProtocol.Http3, p)); 670Assert.Collection(tlsOptions.ApplicationProtocols, p => Assert.Equal(SslApplicationProtocol.Http3, p));
Interop.FunctionalTests (2)
Http3\Http3TlsTests.cs (2)
309ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http3 }
Microsoft.AspNetCore.Connections.Abstractions (1)
TlsConnectionCallbackOptions.cs (1)
31public List<SslApplicationProtocol> ApplicationProtocols { get; set; } = default!;
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
src\Shared\Http2cat\Http2CatHostedService.cs (2)
100ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http2 },
Microsoft.AspNetCore.Server.Kestrel.Core (10)
HttpsConfigurationService.cs (4)
153ApplicationProtocols = sslServerAuthenticationOptions.ApplicationProtocols ?? new List<SslApplicationProtocol> { SslApplicationProtocol.Http3 }, 162ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http3 },
Internal\TlsConnectionFeature.cs (1)
87|| _sslStream.NegotiatedApplicationProtocol == SslApplicationProtocol.Http2)
Middleware\HttpsConnectionMiddleware.cs (5)
359serverOptions.ApplicationProtocols = new List<SslApplicationProtocol>(); 364serverOptions.ApplicationProtocols.Add(SslApplicationProtocol.Http2); 371serverOptions.ApplicationProtocols.Add(SslApplicationProtocol.Http11); 545ApplicationProtocols = new List<SslApplicationProtocol>() { SslApplicationProtocol.Http3 },
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
SniOptionsSelectorTests.cs (4)
637var protocol = Assert.Single(alpnList); 638Assert.Equal(SslApplicationProtocol.Http11, protocol); 834ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http2 },
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (20)
QuicConnectionListenerTests.cs (14)
169ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http3 }, 173options.ApplicationProtocols = new List<SslApplicationProtocol>(); 236ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http3 }, 306ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http3 }, 325Assert.Equal(SslApplicationProtocol.Http3, clientConnection.NegotiatedApplicationProtocol); 339ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http3 }, 382ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http3 }, 434ApplicationProtocols = new List<SslApplicationProtocol> { SslApplicationProtocol.Http3 },
QuicTestHelpers.cs (4)
85sslServerAuthenticationOptions.ApplicationProtocols = new List<SslApplicationProtocol>() { SslApplicationProtocol.Http3 }; 128ApplicationProtocols = new List<SslApplicationProtocol> 130SslApplicationProtocol.Http3
QuicTransportFactoryTests.cs (2)
65ApplicationProtocols = new List<SslApplicationProtocol> 67SslApplicationProtocol.Http3
netstandard (1)
netstandard.cs (1)
1247[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Net.Security.SslApplicationProtocol))]
Sockets.FunctionalTests (2)
src\Servers\Kestrel\test\FunctionalTests\Http2\HandshakeTests.cs (2)
73Assert.True(SslApplicationProtocol.Http2.Protocol.Span.SequenceEqual(tlsFeature.ApplicationProtocol.Span), 101Assert.True(SslApplicationProtocol.Http2.Protocol.Span.SequenceEqual(tlsFeature.ApplicationProtocol.Span),
System.Net.Http (13)
src\libraries\Common\src\System\Net\Security\SslClientAuthenticationOptionsExtensions.cs (1)
22ApplicationProtocols = options.ApplicationProtocols != null ? new List<SslApplicationProtocol>(options.ApplicationProtocols) : null,
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (10)
32private static readonly List<SslApplicationProtocol> s_http3ApplicationProtocols = new List<SslApplicationProtocol>() { SslApplicationProtocol.Http3 }; 33private static readonly List<SslApplicationProtocol> s_http2ApplicationProtocols = new List<SslApplicationProtocol>() { SslApplicationProtocol.Http2, SslApplicationProtocol.Http11 }; 34private static readonly List<SslApplicationProtocol> s_http2OnlyApplicationProtocols = new List<SslApplicationProtocol>() { SslApplicationProtocol.Http2 };
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http2.cs (1)
193if (sslStream.NegotiatedApplicationProtocol == SslApplicationProtocol.Http2)
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.Http3.cs (1)
274if (quicConnection.NegotiatedApplicationProtocol != SslApplicationProtocol.Http3)
System.Net.Quic (11)
System\Net\Quic\Internal\MsQuicConfiguration.Cache.cs (5)
51public readonly List<SslApplicationProtocol> ApplicationProtocols; 54public CacheKey(QUIC_SETTINGS settings, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol> alpnProtocols, QUIC_ALLOWED_CIPHER_SUITE_FLAGS allowedCipherSuites) 69ApplicationProtocols = new List<SslApplicationProtocol>(alpnProtocols); 121foreach (var protocol in ApplicationProtocols) 132private static MsQuicConfigurationSafeHandle GetCachedCredentialOrCreate(QUIC_SETTINGS settings, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol> alpnProtocols, QUIC_ALLOWED_CIPHER_SUITE_FLAGS allowedCipherSuites)
System\Net\Quic\Internal\MsQuicConfiguration.cs (3)
124private static MsQuicConfigurationSafeHandle Create(QuicConnectionOptions options, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol>? alpnProtocols, CipherSuitesPolicy? cipherSuitesPolicy, EncryptionPolicy encryptionPolicy) 129throw new ArgumentException(SR.Format(SR.net_quic_not_null_not_empty_connection, nameof(SslApplicationProtocol)), nameof(options)); 204private static unsafe MsQuicConfigurationSafeHandle CreateInternal(QUIC_SETTINGS settings, QUIC_CREDENTIAL_FLAGS flags, X509Certificate? certificate, ReadOnlyCollection<X509Certificate2>? intermediates, List<SslApplicationProtocol> alpnProtocols, QUIC_ALLOWED_CIPHER_SUITE_FLAGS allowedCipherSuites)
System\Net\Quic\QuicConnection.cs (2)
216private SslApplicationProtocol _negotiatedApplicationProtocol; 297public SslApplicationProtocol NegotiatedApplicationProtocol => _negotiatedApplicationProtocol;
System\Net\Quic\QuicListenerOptions.cs (1)
27public List<SslApplicationProtocol> ApplicationProtocols { get; set; } = null!;
System.Net.Security (29)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (1)
726if (!(protocolHandle.Target is List<SslApplicationProtocol> protocolList))
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (5)
206internal static int GetAlpnProtocolListSerializedLength(List<SslApplicationProtocol> applicationProtocols) 209foreach (SslApplicationProtocol protocol in applicationProtocols) 222internal static void SerializeAlpnProtocolList(List<SslApplicationProtocol> applicationProtocols, Span<byte> buffer) 228foreach (SslApplicationProtocol protocol in applicationProtocols) 236internal static unsafe int SslSetAlpnProtos(SafeSslHandle ssl, List<SslApplicationProtocol> applicationProtocols)
System\Net\Security\SslApplicationProtocol.cs (13)
10public readonly struct SslApplicationProtocol : IEquatable<SslApplicationProtocol> 18/// <summary>Defines a <see cref="SslApplicationProtocol"/> instance for HTTP 3.0.</summary> 19public static readonly SslApplicationProtocol Http3 = new SslApplicationProtocol(s_http3Utf8, copy: false); 20/// <summary>Defines a <see cref="SslApplicationProtocol"/> instance for HTTP 2.0.</summary> 21public static readonly SslApplicationProtocol Http2 = new SslApplicationProtocol(s_http2Utf8, copy: false); 22/// <summary>Defines a <see cref="SslApplicationProtocol"/> instance for HTTP 1.1.</summary> 23public static readonly SslApplicationProtocol Http11 = new SslApplicationProtocol(s_http11Utf8, copy: false); 54public bool Equals(SslApplicationProtocol other) => 57public override bool Equals([NotNullWhen(true)] object? obj) => obj is SslApplicationProtocol protocol && Equals(protocol); 108public static bool operator ==(SslApplicationProtocol left, SslApplicationProtocol right) => 111public static bool operator !=(SslApplicationProtocol left, SslApplicationProtocol right) =>
System\Net\Security\SslAuthenticationOptions.cs (1)
171internal List<SslApplicationProtocol>? ApplicationProtocols { get; set; }
System\Net\Security\SslClientAuthenticationOptions.cs (1)
38public List<SslApplicationProtocol>? ApplicationProtocols { get; set; }
System\Net\Security\SslConnectionInfo.cs (3)
9private static readonly byte[] s_http1 = SslApplicationProtocol.Http11.Protocol.ToArray(); 10private static readonly byte[] s_http2 = SslApplicationProtocol.Http2.Protocol.ToArray(); 11private static readonly byte[] s_http3 = SslApplicationProtocol.Http3.Protocol.ToArray();
System\Net\Security\SslServerAuthenticationOptions.cs (1)
35public List<SslApplicationProtocol>? ApplicationProtocols { get; set; }
System\Net\Security\SslStream.cs (1)
564public SslApplicationProtocol NegotiatedApplicationProtocol
System\Net\Security\TlsFrameHelper.cs (3)
707if (protocol.SequenceEqual(SslApplicationProtocol.Http2.Protocol.Span)) 716else if (protocolLength == SslApplicationProtocol.Http11.Protocol.Length && 717protocol.SequenceEqual(SslApplicationProtocol.Http11.Protocol.Span))