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

Allow Connecting with a Client Certificate #33

Closed
ulutomaz opened this issue Jul 20, 2017 · 5 comments
Closed

Allow Connecting with a Client Certificate #33

ulutomaz opened this issue Jul 20, 2017 · 5 comments

Comments

@ulutomaz
Copy link

Hi,

I need to connect with Elixir to a remote Websocket using the client certificate. Would it be possible to put something about this into the documentation. How and where do you specify where is the TLS certificate that you would use at connection establishment?

I looked but can't really find anything on this in the docs.

Many thanks,

Tomaz

@Azolo Azolo changed the title TLS Allow Connecting with a Client Certificate Jul 20, 2017
@Azolo
Copy link
Owner

Azolo commented Jul 20, 2017

WebSockex isn't actually able to do that... yet.

I've been wanting to look at reworking the :ssl module options.

If you want to look at patching for yourself in the interim, take a look at where the ssl options are current being set. The options for the Erlang :ssl module are here. But beware, the :ssl module in Erlang is not very forgiving.

If you need to debug, then it would probably be easier to get a regular :ssl connection using :ssl.connect/4 then adding those options until I get something else more configurable built for the :ssl module.

@steffkes
Copy link
Contributor

@Azolo i did need handling for client certificates as well and just gave it a first try, the patch is rather small (about ten lines) and would allow passing ssl options to the WebSockex.Conn module - so it's up to the client to define the needed configuration. that's similar to what HTTPoison does

Would you be open to a PR for this? do you have anything else in mind - or probably already working elsewhere?

@steffkes
Copy link
Contributor

what i hand in mind - because you already mentioned that ssl options are hard to get right - is that i'd pass that responsibility to the client (=user). define a basic set of options that are normally needed for working web sockets + the ability to pass in everything that's needed in addition to that. that way we keep the library small and focused but still go for flexibility

@steffkes
Copy link
Contributor

since #61 is merged, i'd say we can close this issue @Azolo

@Azolo
Copy link
Owner

Azolo commented Jan 12, 2019

@steffkes Indeed

@Azolo Azolo closed this as completed Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants