Skip to content

Conversation

@estolfo
Copy link
Contributor

@estolfo estolfo commented Sep 7, 2016

No description provided.

@jyemin
Copy link

jyemin commented Sep 7, 2016

Seems reasonable, but having run into issues in Java you should do some manual testing for the following cases:

  1. An IPv4 literal
  2. An IPv6 literal

for both MRI and JRuby.

@durran
Copy link
Member

durran commented Sep 8, 2016

LGTM

@estolfo
Copy link
Contributor Author

estolfo commented Sep 8, 2016

This doesn't seem to work for JRuby.

I'm setting the hostname as indicated here

but the server logs show:
new ssl connection, SNI server name []

for MRI, it shows:
new ssl connection, SNI server name [server]

@behackett
Copy link
Member

If JRuby doesn't support it (it's undocumented in MRI, so no surprise) then oh well. Open a ticket against MRI to get it documented, and against JRuby to get it implemented. I couldn't implement it for all the versions of python we support either.

@estolfo
Copy link
Contributor Author

estolfo commented Sep 8, 2016

So in the Python driver, you only set the hostname for certain versions of Python?

@behackett
Copy link
Member

Yep, only versions of python that support SNI.

https://docs.python.org/2/library/ssl.html#ssl.HAS_SNI

@jyemin
Copy link

jyemin commented Sep 8, 2016

There's a claim that it's implemented here: jruby/jruby#349. But the comment saying that SNI is supported starting with Java 7 doesn't jibe with my experience. The Java driver's SNI support relies on a Java 8 feature: https://docs.oracle.com/javase/8/docs/api/javax/net/ssl/SSLParameters.html#setServerNames-java.util.List-

@estolfo
Copy link
Contributor Author

estolfo commented Sep 8, 2016

I opened a ticket with the openssl library for JRuby. Hopefully I'll get some more info soon from the JRuby team directly...
jruby/jruby-openssl#103

@estolfo
Copy link
Contributor Author

estolfo commented Sep 9, 2016

fyi, the Ruby team updated their docs: https://bugs.ruby-lang.org/issues/12740

@estolfo
Copy link
Contributor Author

estolfo commented Sep 13, 2016

Cannot support this for JRuby until they resolve the bug in openssl:
https://twitter.com/EmStolfo/status/775615814737231872

@estolfo estolfo merged commit 226a7f2 into mongodb:master Sep 13, 2016
@estolfo estolfo deleted the RUBY-1140-sni branch May 29, 2017 12:54
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.

4 participants