Skip to content

Commit 8e3a62a

Browse files
committed
minor changes
1 parent 32b517b commit 8e3a62a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Sources/WebSocketKit/Concurrency/Compression/Decompression.swift renamed to Sources/WebSocketKit/Compression/Decompression.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import CZlib
33
public enum Decompression {
44

55
public struct Configuration {
6-
/// `deflate` is the main compression algorithm for web-sockets (RFC 7692),
7-
/// so for now we only support `deflate`.
6+
/// For now we only support `deflate`, because it's the main compression
7+
/// algorithm for web-sockets (RFC 7692).
88
let algorithm: Compression.Algorithm = .deflate
99

1010
private init() { }
@@ -22,12 +22,12 @@ public enum Decompression {
2222

2323
private var base: Base
2424

25-
/// An error occurred when inflating. Error code is included to aid diagnosis.
25+
/// An error occurred when inflating. Error code is included to aid diagnosis.
2626
public static var inflationError: (Int) -> Self = {
2727
Self(base: .inflationError($0))
2828
}
2929

30-
/// Decoder could not be initialised. Error code is included to aid diagnosis.
30+
/// Decoder could not be initialized. Error code is included to aid diagnosis.
3131
public static var initializationError: (Int) -> Self = {
3232
Self(base: .initializationError($0))
3333
}

Tests/WebSocketKitTests/SSLTestHelpers.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import Foundation
1717
@_implementationOnly import CNIOBoringSSL
18+
1819
@testable import NIOSSL
1920

2021
// This function generates a random number suitable for use in an X509
@@ -61,7 +62,7 @@ func randomSerialNumber() -> ASN1_INTEGER {
6162
return asn1int
6263
}
6364

64-
func generateRSAPrivateKey() -> UnsafeMutablePointer<EVP_PKEY> {
65+
func generateRSAPrivateKey() -> OpaquePointer /*<EVP_PKEY>*/ {
6566
let exponent = CNIOBoringSSL_BN_new()
6667
defer {
6768
CNIOBoringSSL_BN_free(exponent)
@@ -91,7 +92,7 @@ func addExtension(x509: OpaquePointer, nid: CInt, value: String) {
9192
CNIOBoringSSL_X509_EXTENSION_free(ext)
9293
}
9394

94-
func generateSelfSignedCert(keygenFunction: () -> UnsafeMutablePointer<EVP_PKEY> = generateRSAPrivateKey) -> (NIOSSLCertificate, NIOSSLPrivateKey) {
95+
func generateSelfSignedCert(keygenFunction: () -> OpaquePointer /*<EVP_PKEY>*/ = generateRSAPrivateKey) -> (NIOSSLCertificate, NIOSSLPrivateKey) {
9596
let pkey = keygenFunction()
9697
let x = CNIOBoringSSL_X509_new()!
9798
CNIOBoringSSL_X509_set_version(x, 2)

0 commit comments

Comments
 (0)