diff --git a/Sources/SimpleHTTPServer/HTTPServer.swift b/Sources/SimpleHTTPServer/HTTPServer.swift index cb5b029..1369e36 100644 --- a/Sources/SimpleHTTPServer/HTTPServer.swift +++ b/Sources/SimpleHTTPServer/HTTPServer.swift @@ -6,6 +6,7 @@ // import Foundation +import CoreFoundation import PracticeTLS import Socket diff --git a/Sources/SimpleHTTPServer/main.swift b/Sources/SimpleHTTPServer/main.swift index 151445b..bf80a19 100644 --- a/Sources/SimpleHTTPServer/main.swift +++ b/Sources/SimpleHTTPServer/main.swift @@ -12,7 +12,11 @@ class A { } +#if os(Linux) +let bundle = Bundle(path: "\(Bundle(for: A.self).resourcePath!)/PracticeTLS_SimpleHTTPServer.resources")! +#else let bundle = Bundle(path: "\(Bundle(for: A.self).resourcePath!)/PracticeTLS_SimpleHTTPServer.bundle")! +#endif let identity = PEMFileIdentity(certificateFile: bundle.path(forResource: "Cert/localhost.crt", ofType: nil)!, privateKeyFile: bundle.path(forResource: "Cert/private.pem", ofType: nil)!)!