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

include ServerName in TLS configuration #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mutantmonkey
Copy link

This is required for Go to establish a TLS connection unless InsecureSkipVerify is set.

I'm not sure if this was a recent change in Go or what; it doesn't appear to be, but perhaps I missed something. I wasn't able to get this running on my system without this change.

@mutantmonkey
Copy link
Author

I'm using Go 1.5.3.

@janimo
Copy link
Owner

janimo commented Jan 20, 2016

I see this change going in Go 1.3 but that is not a new one (and it implies that your change is needed)
golang/go@fca335e

What is the exact error message you get and what server are you connecting to?

The standard cmdline client connecting to the OWS server works for me when built against Go 1.5.3

@mutantmonkey
Copy link
Author

I have the server set to https://textsecure-service.whispersystems.org:443. This is the output I get when I run textsecure:

DEBU[2016/01/21 22:26:51] PUT /v1/directory/tokens 200

tls: either ServerName or InsecureSkipVerify must be specified in the tls.Config

@mutantmonkey mutantmonkey force-pushed the tls_add_servername branch 2 times, most recently from 50366b1 to be962bc Compare January 22, 2016 17:10
This is required for Go to establish a TLS connection unless
InsecureSkipVerify is set.
@timothymctim
Copy link

It seem a sensible thing to implement to me, as this is basically a (very) weak form of certificate pinning, if I understand this correctly: Does setting ServerName check the Common Name (CN) of the certificate? A better option would of course be to check the fingerprint of the TLS certificate.

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 this pull request may close these issues.

3 participants