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

Documentation example showing a TLS client needed #70

Open
ianpartridge opened this issue Jan 10, 2019 · 4 comments
Open

Documentation example showing a TLS client needed #70

ianpartridge opened this issue Jan 10, 2019 · 4 comments

Comments

@ianpartridge
Copy link
Contributor

It's possible to use BlueSSLService and BlueSocket to write a client socket that talks over TLS.

To do this you create a BlueSSLService.Configuration() passing no parameters, then create an SSLService from that, then set your socket's delegate and call connect().

It would be good to have an example in the README showing this. Currently, although it's mentioned, all the code samples involve using BlueSSLService.Configuration to load a certificate from disk.

It would be nice to have a simple example showing how BlueSSLService can be used to create a TLS client socket.

@billabt
Copy link
Collaborator

billabt commented Jan 10, 2019

Sure, I’ll see what I can come up with.

@sglushchenko
Copy link

Hello, I tried to use this code

let configuration = SSLService.Configuration()
socket.delegate = try SSLService(usingConfiguration: configuration)

And I have error 'init(withCipherSuite:clientAllowsSelfSignedCertificates:)' is unavailable: This API not supported on Apple platforms.

Can I use BlueSocket like a socket client on the Mac?
How I understand without SSLService the socket will connect and send messages without encryption.

@ianpartridge
Copy link
Contributor Author

Interesting. @billabt this should be possible right?

@sglushchenko
Copy link

sglushchenko commented Jan 11, 2019

@ianpartridge @billabt I think "should", I think the Kitura should work same on Mac and Linux. Maybe just need an example

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

No branches or pull requests

3 participants