Skip to content

Commit a24ec97

Browse files
tbartelmesstanner0101
authored andcommitted
Renamed NIOOpenSSL->NIOSSL (vapor#12)
apple/swift-nio-ssl#75 changed the name name of the NIOOpenSSL package to NIOSSL, as well as a changing the name of a bunch of classes and structs. This PR updates NIOPostgres to it can build against the master branch of swift-nio-ssl.
1 parent 43883ef commit a24ec97

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let package = Package(
1313
],
1414
targets: [
1515
.target(name: "CMD5", dependencies: []),
16-
.target(name: "NIOPostgres", dependencies: ["CMD5", "NIO", "NIOOpenSSL"]),
16+
.target(name: "NIOPostgres", dependencies: ["CMD5", "NIO", "NIOSSL"]),
1717
.target(name: "NIOPostgresBenchmark", dependencies: ["NIOPostgres"]),
1818
.testTarget(name: "NIOPostgresTests", dependencies: ["NIOPostgres"]),
1919
]

Sources/NIOPostgres/Connection/PostgresConnection+RequestTLS.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
import NIOSSL
2+
13
extension PostgresConnection {
24
public func requestTLS(using tlsConfig: TLSConfiguration) -> EventLoopFuture<Bool> {
35
let tls = RequestTLSQuery()
46
return self.send(tls).flatMapThrowing { _ in
57
if tls.isSupported {
6-
let sslContext = try SSLContext(configuration: tlsConfig)
7-
let handler = try OpenSSLClientHandler(context: sslContext)
8+
let sslContext = try NIOSSLContext(configuration: tlsConfig)
9+
let handler = try NIOSSLClientHandler(context: sslContext)
810
_ = self.channel.pipeline.addHandler(handler, position: .first)
911
}
1012
return tls.isSupported
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
@_exported import NIO
2-
@_exported import NIOOpenSSL
2+
@_exported import NIOSSL

0 commit comments

Comments
 (0)