Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import NIOHTTPServer
import X509

@main
@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
struct ConnectionHandlerExample {
static func main() async throws {
try await serve()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#if HTTP3
import HTTP3

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.HTTP3 {
/// HTTP/3 connection settings sent to the peer during connection establishment.
public struct ConnectionSettings: Sendable, Hashable {
Expand Down Expand Up @@ -53,7 +53,7 @@ extension NIOHTTPServerConfiguration.HTTP3 {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension HTTP3.HTTP3Settings {
init(_ connectionConfiguration: NIOHTTPServerConfiguration.HTTP3.ConnectionSettings) {
self.init(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//===----------------------------------------------------------------------===//

#if HTTP3 && UnstableHTTPDatagrams
@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.HTTP3 {
public struct DatagramConfiguration: Sendable, Hashable {
/// The maximum datagram frame size in bytes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#if HTTP3
import NIOQUIC

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.HTTP3 {
/// QUIC transport configuration for an HTTP/3 server.
public struct QUICConfiguration: Sendable, Hashable {
Expand Down Expand Up @@ -206,7 +206,7 @@ extension NIOHTTPServerConfiguration.HTTP3 {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOQUIC.QUICConfiguration.QLogConfiguration {
fileprivate init(_ configuration: NIOHTTPServerConfiguration.HTTP3.QUICConfiguration.QLogConfiguration) {
self.init(
Expand All @@ -217,7 +217,7 @@ extension NIOQUIC.QUICConfiguration.QLogConfiguration {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOQUIC.KeyExchangeGroup {
fileprivate init(_ configuration: NIOHTTPServerConfiguration.HTTP3.QUICConfiguration.KeyExchangeGroup) {
switch configuration.backing {
Expand All @@ -236,7 +236,7 @@ extension NIOQUIC.KeyExchangeGroup {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOQUIC.AuthenticationConfiguration {
init(_ tlsCredentials: NIOHTTPServerConfiguration.TransportSecurity.TLSCredentials) throws {
switch tlsCredentials.backing {
Expand All @@ -261,7 +261,7 @@ extension NIOQUIC.AuthenticationConfiguration {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOQUIC.QUICConfiguration {
/// Creates a `NIOQUIC.QUICConfiguration` from a `NIOHTTPServerConfiguration.HTTP3.QUICConfiguration` instance.
init(
Expand Down Expand Up @@ -302,7 +302,7 @@ extension NIOQUIC.QUICConfiguration {
#endif // UnstableHTTPDatagrams
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOQUIC.Authenticator {
/// Creates an `Authenticator` instance from X.509 TLS credentials.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import NIOCore
import NIOHTTP3

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration {
/// Configuration for HTTP/3.
public struct HTTP3: Sendable, Hashable {
Expand Down Expand Up @@ -105,7 +105,7 @@ extension NIOHTTPServerConfiguration {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTP3.HTTP3ServerConfiguration {
init(_ configuration: NIOHTTPServerConfiguration.HTTP3) {
self = .defaults
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import NIOSSL
import NIOQUIC
#endif

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration {
/// Validates the compatibility of the `supportedHTTPVersions` and `transportSecurity` configurations, and stores
/// the TLS resources required to set up the server channels.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import NIOQUIC
///
/// This structure contains all the necessary configuration options for setting up
/// and running ``NIOHTTPServer``, including network binding and TLS settings.
@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
public struct NIOHTTPServerConfiguration: Sendable {
/// Specifies where the server should bind and listen for incoming connections.
///
Expand Down Expand Up @@ -444,7 +444,7 @@ public struct NIOHTTPServerConfiguration: Sendable {
///
/// Indicates whether certificate verification succeeded or failed, and provides associated metadata when verification
/// is successful.
@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
public enum CertificateVerificationResult: Sendable, Hashable {
/// Metadata resulting from successful certificate verification.
public struct VerificationMetadata: Sendable, Hashable {
Expand Down Expand Up @@ -512,7 +512,7 @@ public struct CertificateVerificationMode: Sendable {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOSSL.CertificateVerification {
/// Maps ``CertificateVerificationMode`` to the NIOSSL representation.
init(_ verificationMode: CertificateVerificationMode) {
Expand All @@ -525,7 +525,7 @@ extension NIOSSL.CertificateVerification {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration {
/// Represents an HTTP version.
public struct HTTPVersion: Sendable, Hashable {
Expand Down Expand Up @@ -638,7 +638,7 @@ extension NIOHTTPServerConfiguration {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark {
init(_ backpressureStrategy: NIOHTTPServerConfiguration.BackPressureStrategy) {
switch backpressureStrategy.backing {
Expand All @@ -648,7 +648,7 @@ extension NIOAsyncSequenceProducerBackPressureStrategies.HighLowWatermark {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension Set where Element == NIOHTTPServerConfiguration.HTTPVersion {
/// The ALPN protocol identifiers to advertise during the TLS handshake, derived from the supported HTTP versions.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#if Configuration
public import Configuration

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.HTTP2 {
/// Initialize an HTTP/2 configuration from a config reader.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#if HTTP3 && Configuration
public import Configuration

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.HTTP3 {
/// Initialize an HTTP/3 configuration from a config reader.
///
Expand Down Expand Up @@ -53,7 +53,7 @@ extension NIOHTTPServerConfiguration.HTTP3 {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.HTTP3.QUICConfiguration {
/// Initialize a QUIC transport configuration from a config reader.
///
Expand Down Expand Up @@ -126,7 +126,7 @@ extension NIOHTTPServerConfiguration.HTTP3.QUICConfiguration {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.HTTP3.QUICConfiguration.QLogConfiguration {
/// Initialize an optional qlog configuration from a config reader.
///
Expand Down Expand Up @@ -166,7 +166,7 @@ private enum KeyExchangeGroupKind: String {
case x25519MLKEM768
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.HTTP3.QUICConfiguration.KeyExchangeGroup {
fileprivate init(_ kind: KeyExchangeGroupKind) {
switch kind {
Expand All @@ -182,7 +182,7 @@ extension NIOHTTPServerConfiguration.HTTP3.QUICConfiguration.KeyExchangeGroup {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.HTTP3.ConnectionSettings {
/// Initialize HTTP/3 connection settings from a config reader.
///
Expand Down Expand Up @@ -212,7 +212,7 @@ extension NIOHTTPServerConfiguration.HTTP3.ConnectionSettings {
}

#if UnstableHTTPDatagrams
@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.HTTP3.DatagramConfiguration {
/// Initialize HTTP/3 connection settings from a config reader.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import NIOHTTP2
import SwiftASN1
public import X509

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration {
/// Initialize the server configuration from a config reader.
///
Expand Down Expand Up @@ -124,7 +124,7 @@ extension NIOHTTPServerConfiguration {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.BindTarget {
/// Initialize a bind target configuration from a config reader.
///
Expand All @@ -143,7 +143,7 @@ extension NIOHTTPServerConfiguration.BindTarget {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension Set where Element == NIOHTTPServerConfiguration.HTTPVersion {
/// Initialize a supported HTTP versions configuration from a config reader.
///
Expand Down Expand Up @@ -189,7 +189,7 @@ extension Set where Element == NIOHTTPServerConfiguration.HTTPVersion {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.TransportSecurity {
/// Initialize a transport security configuration from a config reader.
///
Expand Down Expand Up @@ -264,7 +264,7 @@ extension NIOHTTPServerConfiguration.TransportSecurity {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.TransportSecurity.TLSCredentials {
/// Initialize TLS credentials (certificate chain and private key) from a config reader.
///
Expand Down Expand Up @@ -324,7 +324,7 @@ extension NIOHTTPServerConfiguration.TransportSecurity.TLSCredentials {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.TransportSecurity.MTLSTrustConfiguration {
/// Initialize an mTLS trust configuration from a config reader.
///
Expand Down Expand Up @@ -398,7 +398,7 @@ extension NIOHTTPServerConfiguration.TransportSecurity.MTLSTrustConfiguration {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.BackPressureStrategy {
/// Initialize the backpressure strategy configuration from a config reader.
///
Expand All @@ -425,7 +425,7 @@ extension NIOHTTPServerConfiguration.BackPressureStrategy {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension Set where Element == NIOHTTPServerConfiguration.HTTPVersion {
fileprivate enum HTTPVersionKind: String {
case http1_1
Expand All @@ -436,7 +436,7 @@ extension Set where Element == NIOHTTPServerConfiguration.HTTPVersion {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.TransportSecurity {
fileprivate enum TransportSecurityMode: String {
case plaintext
Expand All @@ -453,7 +453,7 @@ extension NIOHTTPServerConfiguration.TransportSecurity {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.TransportSecurity.MTLSTrustConfiguration {
/// The supported sources for trust roots.
fileprivate enum TrustRootsSource: String {
Expand All @@ -470,7 +470,7 @@ extension NIOHTTPServerConfiguration.TransportSecurity.MTLSTrustConfiguration {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension CertificateVerificationMode {
fileprivate init(_ mode: NIOHTTPServerConfiguration.TransportSecurity.MTLSTrustConfiguration.VerificationMode) {
switch mode {
Expand All @@ -482,7 +482,7 @@ extension CertificateVerificationMode {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.ConnectionTimeouts {
/// Initialize connection timeouts configuration from a config reader.
///
Expand All @@ -503,7 +503,7 @@ extension NIOHTTPServerConfiguration.ConnectionTimeouts {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.GracefulShutdownConfiguration {
/// Initialize a graceful shutdown configuration from a config reader.
///
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import NIOCore
import NIOSSL
public import X509

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.TransportSecurity {
/// Configures how the server verifies client certificates during mTLS.
public struct MTLSTrustConfiguration: Sendable {
Expand Down Expand Up @@ -45,7 +45,7 @@ extension NIOHTTPServerConfiguration.TransportSecurity {
}
}

@available(anyAppleOS 26.0, *)
@available(anyAppleOS 27.0, *)
extension NIOHTTPServerConfiguration.TransportSecurity.MTLSTrustConfiguration {
public struct TrustSource: Sendable {
enum Backing {
Expand Down
Loading
Loading