Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gjcairo committed Nov 15, 2024
1 parent d0602c4 commit 37cc89f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ final class HTTP2TransportNIOTransportServicesTests: XCTestCase {
let certificateKeyPairs = try SelfSignedCertificateKeyPairs()
let password = "somepassword"
let bundle = NIOSSLPKCS12Bundle(
certificateChain: [try NIOSSLCertificate(bytes: certificateKeyPairs.server.certificate, format: .der)],
certificateChain: [
try NIOSSLCertificate(bytes: certificateKeyPairs.server.certificate, format: .der)
],
privateKey: try NIOSSLPrivateKey(bytes: certificateKeyPairs.server.key, format: .der)
)
let pkcs12Bytes = try bundle.serialize(passphrase: password.utf8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ struct HTTP2TransportTLSEnabledTests {
case .posix:
#expect(
rootError.message
== "The server accepted the TCP connection but closed the connection before completing the HTTP/2 connection preface."
== "The server accepted the TCP connection but closed the connection before completing the HTTP/2 connection preface."
)
let sslError = try #require(rootError.cause as? NIOSSLExtraError)
guard sslError == .failedToValidateHostname else {
Expand Down Expand Up @@ -290,7 +290,9 @@ struct HTTP2TransportTLSEnabledTests {
.mTLS {
let password = "somepassword"
let bundle = NIOSSLPKCS12Bundle(
certificateChain: [try NIOSSLCertificate(bytes: certificateKeyPairs.client.certificate, format: .der)],
certificateChain: [
try NIOSSLCertificate(bytes: certificateKeyPairs.client.certificate, format: .der)
],
privateKey: try NIOSSLPrivateKey(bytes: certificateKeyPairs.client.key, format: .der)
)
let pkcs12Bytes = try bundle.serialize(passphrase: password.utf8)
Expand All @@ -311,7 +313,9 @@ struct HTTP2TransportTLSEnabledTests {
return identity
} configure: {
$0.serverHostname = serverHostname
$0.trustRoots = .certificates([.bytes(certificateKeyPairs.server.certificate, format: .der)])
$0.trustRoots = .certificates([
.bytes(certificateKeyPairs.server.certificate, format: .der)
])
}
)
)
Expand Down Expand Up @@ -339,7 +343,9 @@ struct HTTP2TransportTLSEnabledTests {
.defaults {
let password = "somepassword"
let bundle = NIOSSLPKCS12Bundle(
certificateChain: [try NIOSSLCertificate(bytes: certificateKeyPairs.server.certificate, format: .der)],
certificateChain: [
try NIOSSLCertificate(bytes: certificateKeyPairs.server.certificate, format: .der)
],
privateKey: try NIOSSLPrivateKey(bytes: certificateKeyPairs.server.key, format: .der)
)
let pkcs12Bytes = try bundle.serialize(passphrase: password.utf8)
Expand Down Expand Up @@ -389,7 +395,9 @@ struct HTTP2TransportTLSEnabledTests {
.mTLS {
let password = "somepassword"
let bundle = NIOSSLPKCS12Bundle(
certificateChain: [try NIOSSLCertificate(bytes: certificateKeyPairs.server.certificate, format: .der)],
certificateChain: [
try NIOSSLCertificate(bytes: certificateKeyPairs.server.certificate, format: .der)
],
privateKey: try NIOSSLPrivateKey(bytes: certificateKeyPairs.server.key, format: .der)
)
let pkcs12Bytes = try bundle.serialize(passphrase: password.utf8)
Expand Down

0 comments on commit 37cc89f

Please sign in to comment.