Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSL Support #111

Open
satishmaha opened this issue Feb 29, 2016 · 23 comments · May be fixed by #427
Open

SSL Support #111

satishmaha opened this issue Feb 29, 2016 · 23 comments · May be fixed by #427

Comments

@satishmaha
Copy link

https://github.com/PerfectlySoft/Perfect allows the ability to start the server with a cert+key. Since HTTPS is now recommended everywhere, along with initiatives like https://letsencrypt.org, what do you think?

@damian-kolakowski
Copy link
Member

👍 thanks for this report !

I am going to add OpenSSL soon.

Best

@satishmaha
Copy link
Author

Super! Please let me know if you need QA/Testing

Thank you for all your hard work into this lib :)

@bizz84
Copy link

bizz84 commented Apr 9, 2016

Any update on this? This library is very easy to use, but I need to run my local server in https in production.

@Laban1
Copy link

Laban1 commented Apr 14, 2016

I love the library, but I need to use https in production (and we are moving to production very soon).

Please give an ETA on this.

Thanks!

@JBlitter
Copy link

We really want to use this in production but can't yet because https isn't there. Any update on when it might be ready?
Thanks!

@julien-c
Copy link
Member

Hi all, any reason why you could not stick nginx in front of your swifter servers?

@Laban1
Copy link

Laban1 commented Apr 18, 2016

@julien-c: I have never used nginx, but adding proxies to the mix adds additional points of failure & maintenance, especially when you are dealing with ~100 tablets spread out over several locations with no IT staff on-site. Further, would not the traffic between the nginx server and the tablets still be over HTTP?

@julien-c
Copy link
Member

If you use nginx as a reverse proxy just for SSL termination, the maintenance overhead will be minimal. This is literally 4 lines of nginx configuration.

@Laban1
Copy link

Laban1 commented Apr 19, 2016

@julien-c: we would still need to install an nginx server at each location and then keep it updated and secure (sensitive data) and if it breaks it affects all tablets at the location. Further, the connection between the proxy and each tablet would still not be secure. In our scenario we are required to use SSL all the way to each tablet.

@Laban1
Copy link

Laban1 commented May 10, 2016

Hi all,

I was not able to find another Swift iOS web server and need only part of the traffic encrypted, so I used this this library: https://github.com/TakeScoop/SwiftyRSA to accomplish this. In brief, here is what I did:

  1. Created a key pair (RSA 2048 bit) on the Linux server that is interacting with the iPads
  2. Created a web service method to send the public key to the iPads and store it in the key chain.
  3. When sensitive data needs to be sent from the iPads to the server, I use the public key to encrypt it (so that it gets sent as a Base64 encoded encrypted data)
  4. The server decodes the Base64 and then uses the private key to decrypt the data

This seems to work very well and was easy to implement, so I figured I share it here in case somebody else is in a similar situation.

Note: RSA 2048 can only encrypt up to 245 bytes, so if you need to encrypt more data you can use the RSA keys to exchange a symmetric key to do the encryption of larger amount of data with (the same as TLS does).

@yvbeek
Copy link

yvbeek commented Sep 30, 2016

SSL support would be great. Apple is making it harder and harder to do regular HTTP requests.

In my case I would like a few iPads to securely communicate with each other. Unfortunately iOS, nor any third party project that I could find, offers a server with HTTPS support.

@krzyzanowskim
Copy link

krzyzanowskim commented Dec 5, 2016

No SSL support? what is this @glock45 1999? #justkidding

@damian-kolakowski
Copy link
Member

@krzyzanowskim There is some work here https://github.com/httpswift/swifter/tree/master/Sources/TLS 👍

@voynovia
Copy link
Contributor

really need

@mgfeldman
Copy link

Any plans to resume work on SSL support?

@Daij-Djan
Copy link

I'd also love this - the library looks and feels great but not having SSL is an issue :/

@yvbeek
Copy link

yvbeek commented Apr 23, 2017

Yesterday I've open-sourced our web server Telegraph:
https://github.com/Building42/Telegraph

It has SSL support if you guys are still looking for it.

@Daij-Djan
Copy link

very nice. thanks

@mgfeldman
Copy link

@Zyphrax Thanks, I'll give it a shot!

@yvbeek
Copy link

yvbeek commented Apr 25, 2017

No problem, if you have any feedback, let me know.

@jeff-h
Copy link

jeff-h commented Mar 19, 2018

I should also mention https://github.com/BiAtoms/Http.swift which has SSL/TLS support.

@Laban1
Copy link

Laban1 commented May 1, 2018

@glock45 Any plans to resume the SSL work?

@viktorasl viktorasl linked a pull request Aug 2, 2019 that will close this issue
@linhaosunny
Copy link

@krzyzanowskim There is some work here https://github.com/httpswift/swifter/tree/master/Sources/TLS 👍

how to use this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.