Skip to content

Commit

Permalink
fix: guard SecIdentityCreateWithCertificate with #if os(macOS) (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Lees11 authored and ianpartridge committed Aug 17, 2018
1 parent d169d86 commit ba36fab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/SwiftyRequest/RestRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ extension RestRequest: URLSessionDelegate {

switch (method, host) {
case (NSURLAuthenticationMethodClientCertificate, baseHost):
#if !os(Linux)
#if os(macOS)
guard let certificateName = self.clientCertificate?.name, let certificatePath = self.clientCertificate?.path else {
Log.warning(warning)
fallthrough
Expand Down
2 changes: 1 addition & 1 deletion Tests/SwiftyRequestTests/SwiftyRequestTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ class SwiftyRequestTests: XCTestCase {
}

func testGetClientCert() {
#if !os(Linux)
#if os(macOS)
let expectation = self.expectation(description: "Data Echoed Back")
let testClientCertificate = ClientCertificate(name: "server.csr", path: "Tests/SwiftyRequestTests/Certificates")

Expand Down

0 comments on commit ba36fab

Please sign in to comment.