Skip to content

Commit 6a9eb6f

Browse files
Fix NIOSSL deprecation warnings
- Package.swift had the `NIOSSL` package raised to 2.14.1 from the previous 2.12.0. - All instances of `TLSConfiguration.forClient` have been replaced with `TLSConfiguration.makeClientConfiguration` Co-authored-by: Fabian Fett <fabianfett@apple.com>
1 parent 08c0dc5 commit 6a9eb6f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Diff for: Package.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ let package = Package(
1414
],
1515
dependencies: [
1616
.package(url: "https://github.com/apple/swift-nio.git", from: "2.32.0"),
17-
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.12.0"),
17+
.package(url: "https://github.com/apple/swift-nio-ssl.git", from: "2.14.1"),
1818
.package(url: "https://github.com/apple/swift-crypto.git", from: "1.0.0"),
1919
.package(url: "https://github.com/apple/swift-metrics.git", from: "2.0.0"),
2020
.package(url: "https://github.com/apple/swift-log.git", from: "1.4.0"),

Diff for: Tests/IntegrationTests/PostgresNIOTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ final class PostgresNIOTests: XCTestCase {
680680
var conn: PostgresConnection?
681681
XCTAssertNoThrow(conn = try PostgresConnection.connect(
682682
to: SocketAddress.makeAddressResolvingHost("elmer.db.elephantsql.com", port: 5432),
683-
tlsConfiguration: .forClient(certificateVerification: .none),
683+
tlsConfiguration: .makeClientConfiguration(),
684684
serverHostname: "elmer.db.elephantsql.com",
685685
on: eventLoop
686686
).wait())
@@ -709,7 +709,7 @@ final class PostgresNIOTests: XCTestCase {
709709
XCTAssertThrowsError(
710710
try PostgresConnection.connect(
711711
to: SocketAddress.makeAddressResolvingHost("elmer.db.elephantsql.com", port: 5432),
712-
tlsConfiguration: .forClient(certificateVerification: .fullVerification),
712+
tlsConfiguration: .makeClientConfiguration(),
713713
serverHostname: "34.228.73.168",
714714
on: eventLoop
715715
).wait()

Diff for: Tests/PostgresNIOTests/New/PSQLChannelHandlerTests.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class PSQLChannelHandlerTests: XCTestCase {
3434

3535
func testEstablishSSLCallbackIsCalledIfSSLIsSupported() {
3636
var config = self.testConnectionConfiguration()
37-
config.tlsConfiguration = .forClient(certificateVerification: .none)
37+
config.tlsConfiguration = .makeClientConfiguration()
3838
var addSSLCallbackIsHit = false
3939
let handler = PSQLChannelHandler(authentification: config.authentication) { channel in
4040
addSSLCallbackIsHit = true
@@ -72,7 +72,7 @@ class PSQLChannelHandlerTests: XCTestCase {
7272

7373
func testSSLUnsupportedClosesConnection() {
7474
var config = self.testConnectionConfiguration()
75-
config.tlsConfiguration = .forClient()
75+
config.tlsConfiguration = .makeClientConfiguration()
7676

7777
let handler = PSQLChannelHandler(authentification: config.authentication) { channel in
7878
XCTFail("This callback should never be exectuded")

0 commit comments

Comments
 (0)