Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upDoes not do any TLS hostname verification by default #472
Comments
seanmonstar
added
the
A-client
label
Apr 22, 2015
This comment has been minimized.
This comment has been minimized.
|
The issue here is that hyper needs to pick something by default. It's already possible to do it yourself with |
frewsxcv
changed the title
TLS does not do any hostname verification
Does not do any TLS hostname verification
Apr 23, 2015
This comment has been minimized.
This comment has been minimized.
tarcieri
commented
Apr 23, 2015
|
For what it's worth, I just implemented RFC 6125-compliant hostname verification for Ruby's OpenSSL extension (a.k.a. CVE-2015-1855): https://github.com/ruby/openssl/pull/12/files I'd be happy to do a Rust implementation. |
This comment has been minimized.
This comment has been minimized.
|
Worth noting this is also an issue in Servo: servo/servo#4954 |
This comment has been minimized.
This comment has been minimized.
tarcieri
commented
Apr 26, 2015
|
I just started an RFC6125 hostname verification library for Rust: |
This comment has been minimized.
This comment has been minimized.
tarcieri
commented
Apr 26, 2015
|
One thing I'm curious about... what type is used for representing presented identifiers? I think I'd like the internal implementation of this library to be done completely as |
This comment has been minimized.
This comment has been minimized.
veeti
commented
Apr 26, 2015
|
Hyper doesn't seem to do any TLS verification right now with the default client settings. Any untrusted certificate goes. |
This comment has been minimized.
This comment has been minimized.
|
@tarcieri I don't know what |
This comment has been minimized.
This comment has been minimized.
tarcieri
commented
Apr 26, 2015
|
@seanmonstar the subjectAlternativeNames (SANs) or Common Names (CNs) in X.509 certificates |
This comment has been minimized.
This comment has been minimized.
|
Ah, I have no idea. That would be in the openssl lib, no? On Sun, Apr 26, 2015, 2:21 PM Tony Arcieri notifications@github.com wrote:
|
This comment has been minimized.
This comment has been minimized.
tarcieri
commented
Apr 26, 2015
|
It's beginning to seem like |
seanmonstar
changed the title
Does not do any TLS hostname verification
Does not do any TLS hostname verification by default
Aug 19, 2015
This comment has been minimized.
This comment has been minimized.
|
Since it hasn't been explicitly stated in here, here's a relevant project: https://github.com/briansmith/webpki |
This comment has been minimized.
This comment has been minimized.
tarcieri
commented
Jan 23, 2016
|
@frewsxcv +1 for that |
frewsxcv
referenced this issue
Apr 6, 2016
Closed
Openssl::with_cert_and_key certificate verification #752
This comment has been minimized.
This comment has been minimized.
zmanian
commented
May 8, 2016
|
What is a good API for disabling TLS verification when the user desires it? Environment variable? Argument to the connection object? |
This comment has been minimized.
This comment has been minimized.
|
Disabling security based on environment variables sounds dangerous. |
This comment has been minimized.
This comment has been minimized.
Hopefully, this will not be possible. |
seanmonstar
added a commit
that referenced
this issue
May 8, 2016
seanmonstar
referenced this issue
May 8, 2016
Merged
feat(ssl): enable hostname verification by default for OpenSSL #784
seanmonstar
self-assigned this
May 8, 2016
This comment has been minimized.
This comment has been minimized.
MoSal
commented
May 8, 2016
seanmonstar
closed this
in
#784
May 8, 2016
This comment has been minimized.
This comment has been minimized.
|
An easy approach would be to make your own implementation of |
This comment has been minimized.
This comment has been minimized.
AGWA
commented
May 9, 2016
|
Although it should go without saying that disabling certificate verification is a terrible thing to do, there will be developers who will want to disable it and will find a way to do so whether or not Hyper provides an API for it. Rather than leaving developers to their own devices, I think Hyper should provide an API to disable verification for two reasons:
|
This comment has been minimized.
This comment has been minimized.
jimmycuadra
commented
May 9, 2016
|
I'm -1 on an option to disable verification. Rebuttal to AGWA's two points above: 1) An entire type that does nothing but circumvent verification has a bigger footprint than an environment variable. I don't think making it easy to grep for is a good thing to optimize for. 2) The kind of developer that would do what you're describing will still just copy/paste whatever they read on Stack Overflow, regardless of whether or not the the flag has "insecure" in the name. |
mbrubeck
referenced this issue
May 10, 2016
Merged
Use openssl-verify to check certificate + hostname #11115
bors-servo
added a commit
to servo/servo
that referenced
this issue
May 10, 2016
This comment has been minimized.
This comment has been minimized.
mhristache
commented
May 29, 2016
•
|
I have a bunch of use cases where disabling certificate validation is needed, mainly related to use on machines not connected to internet (the case at my company):
More than that, it should also be possible to enable old, insecure ciphers in a relatively easy way mainly to be able to talk to clients/servers not supporting TLS1.2 (everything using Java 1.7 or older). Hyper should be flexible enough to support these use cases. Defaults can be to enable most secure options but give the user the possibility to configure hyper according to his/her needs. I have opened #811 for this. Edit: fix a typo |
This comment has been minimized.
This comment has been minimized.
|
@maximih Hyper already allows all of the configuration you asked for by manually configuring the Openssl object: http://hyper.rs/hyper/v0.9.6/hyper/net/struct.Openssl.html |
This comment has been minimized.
This comment has been minimized.
tarcieri
commented
May 29, 2016
|
Note that running an X.509 PKI that broken only offers the illusion of security. Re: TLS 1.2 and Java 1.7, it's supported out-of-the-box by the Sun JSSE provider. |
This comment has been minimized.
This comment has been minimized.
Just noticed this, it seems like in this case it may be a waste to use TLS at all. If talking over a local network that you own and control, you can get performance improvements by not encrypting everything. Unless there are others on your local network that you want to protect yourself from, I guess?
This is exactly the current case. Default is to be secure. If one wants to alter away from the defaults, you can utilize the |
MoSal
referenced this issue
May 29, 2016
Closed
Enabling hostname verification by default was a breaking change #811
This comment has been minimized.
This comment has been minimized.
MoSal
commented
May 29, 2016
Not necessarily. There are other local use cases that benefit from skipping verification. For example:
Using curl/libcurl for those use-cases is trivial and just works. |
This comment has been minimized.
This comment has been minimized.
tarcieri
commented
May 29, 2016
|
@MoSal I buy @AGWA's argument that having a standard notation that's easy to grep for is desirable. That said, while I'm glad you think curl makes it super easy to shut off the security, I'm not sure that's actually a desirable property. I think the world would be a better place if there were no |
frewsxcv commentedApr 22, 2015
Currently, hyper does not provide any hostname verification when working with TLS. Ideally, Hyper would use a library similar to https://github.com/pyca/service_identity to prevent MITM attacks from happening.