Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions Tests/WebSocketKitTests/SSLTestHelpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func generateRSAPrivateKey() -> OpaquePointer {
precondition(generateRC == 1)

let pkey = CNIOBoringSSL_EVP_PKEY_new()!
let assignRC = CNIOBoringSSL_EVP_PKEY_assign(pkey, EVP_PKEY_RSA, rsa)
let assignRC = CNIOBoringSSL_EVP_PKEY_assign_RSA(pkey, rsa)

precondition(assignRC == 1)
return pkey
Expand Down Expand Up @@ -125,7 +125,7 @@ func generateSelfSignedCert(keygenFunction: () -> OpaquePointer = generateRSAPri
NID_commonName,
MBSTRING_UTF8,
UnsafeMutablePointer(mutating: pointer),
CInt(commonName.lengthOfBytes(using: .utf8)),
ossl_ssize_t(commonName.lengthOfBytes(using: .utf8)),
-1,
0)
}
Expand Down
8 changes: 4 additions & 4 deletions Tests/WebSocketKitTests/WebSocketKitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,8 @@ final class WebSocketKitTests: XCTestCase {
return XCTFail("couldn't get port from \(String(reflecting: server.localAddress))")
}
WebSocket.connect(to: "ws://localhost:\(port)", on: self.elg) { ws in
ws.onPong {
$0.close(promise: closePromise)
ws.onPong { webSocket, _ in
webSocket.close(promise: closePromise)
promise.succeed()
}
ws.sendPing()
Expand All @@ -536,8 +536,8 @@ final class WebSocketKitTests: XCTestCase {
}
WebSocket.connect(to: "ws://localhost:\(port)", on: self.elg) { ws in
ws.pingInterval = .milliseconds(100)
ws.onPong {
$0.close(promise: closePromise)
ws.onPong { webSocket, _ in
webSocket.close(promise: closePromise)
promise.succeed()
}
}.cascadeFailure(to: closePromise)
Expand Down