Skip to content

Commit

Permalink
兼容问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeyang committed Oct 15, 2021
1 parent 82f7547 commit 23bbf41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Sources/SimpleHTTPServer/HTTPServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

import Foundation
import CoreFoundation
import PracticeTLS
import Socket

Expand Down
4 changes: 4 additions & 0 deletions Sources/SimpleHTTPServer/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)!)!

Expand Down

0 comments on commit 23bbf41

Please sign in to comment.