Kitura / SwiftyRequest

SwiftyRequest is an HTTP networking library built for Swift.
Apache License 2.0
110 stars 19 forks source link

[Feature request] self-signed client certificate authentication for HTTPS on Linux #57

Closed songhj closed 5 years ago

songhj commented 5 years ago

To support client certificate authentication for https communication, we need to provider cert file and key file to SwiftRequest. But looks like this function only work on macOS currently:

let warning = "Attempting to establish a secure connection; This is only supported by macOS 10.6 or higher. Resorting to default handling."

I understand that current swift SDK doesn't support such function on Linux. Could you suggest when SwiftRequest could support this function on Linux ?

djones6 commented 5 years ago

Hi @songhj - this is something that we want to provide, but it is not feasible with Linux Foundation currently.

There is a prototype in development for a new major version of SwiftyRequest, that will instead be based on swift-nio: issue #58. Note that this prototype currently does not have client certificate authentication either, however the NIO base ought to make implementing this straightforward, as well as consistent for macOS and Linux.

djones6 commented 5 years ago

@songhj Support for client certificates on Linux is now available in SwiftyRequest 3.0.0 - there are some API changes relating to the use of the NIO-based async-http-client but nothing too dramatic. Let me know how you get on with it.