PhantomJS 2.0 and TLS 1.1 and 1.2
So I've set my SSL protocol to be tlsv1.2 and yet when it tries to connect, the handshake fails.
2015-08-13T11:56:42 [DEBUG] 18 sslProtocol : "tlsv1.2" 2015-08-13T11:56:42 [DEBUG] 19 sslCiphers : "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-RC4-SHA:ECDHE-RSA-RC4-SHA:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:RC4-SHA:RC4-MD5"
Looking at the ciphers, there isn't a single TLS1.1 or TLS 1.2 cipher in there. Am i missing something or does it not support TLS (1.0 is disabled and isn't an option).
Any feedback would be greatly appreciated! Thank you.
Edit: when i do openssl ciphers in the command line, i have significantly more ciphers available to me to use. So how do i update the list of accessible ciphers for phantom?
Edit 2: Is phantom compiled with open ssl built in or does it used my systems current version of openssl?
PhantomJS uses the system OpenSSL, and is supposed to support TLS1.1 and 1.2 if requested on the command line. (Unfortunately, Qt currently doesn't give us a way to activate all of TLS 1.[012] simultaneously -- the default is QSsl::SecureProtocols which is mapped to "SSL3.0 and TLS1.0" which is kinda wrong these days, but we don't have a better alternative short of patching qtbase ourselves.)
The default cipher list is
// Default taken from Chromium 35.0.1916.153
m_sslCiphers = ("ECDHE-ECDSA-AES128-GCM-SHA256"
":ECDHE-RSA-AES128-GCM-SHA256"
":DHE-RSA-AES128-GCM-SHA256"
":ECDHE-ECDSA-AES256-SHA"
":ECDHE-ECDSA-AES128-SHA"
":ECDHE-RSA-AES128-SHA"
":ECDHE-RSA-AES256-SHA"
":ECDHE-ECDSA-RC4-SHA"
":ECDHE-RSA-RC4-SHA"
":DHE-RSA-AES128-SHA"
":DHE-DSS-AES128-SHA"
":DHE-RSA-AES256-SHA"
":AES128-GCM-SHA256"
":AES128-SHA"
":AES256-SHA"
":DES-CBC3-SHA"
":RC4-SHA"
":RC4-MD5");
All of the SHA256 and GCM options are from TLS 1.2. I don't remember what was in 1.1. We probably ought to update this list again, what with RC4 being even more deprecated than it was the last time, and various newer things (ChaCha, for instance) having been added; given that PhantomJS is a testing tool, though, I am not inclined to be super aggressive about client-side security hygiene.
If you want to specify your own ciphersuite list you can use the --ssl-ciphers command line option.
@zackw FYI - it looks like Qt 5.5 provides a way to specify that TLS >= 1.[012] should be used with the new QSsl::TlsV1_0OrLater, QSsl::TlsV1_1OrLater and QSsl::TlsV1_2OrLater protocol options: http://doc.qt.io/qt-5.5/qssl.html#SslProtocol-enum
+1
Looks like the new PCI compliance states that websites are required to use only TLS 1.2 no later than June 30th, 2016. It would be great if we could support TLS 1.[012] simultaneously.
Is any chances to access TLSv1.2 enabled website via PhantomJS 1.9.8 ?
Having just run into issues with the lack of TLSv1.2 support by default, I came across this thread.
In my case, specifying TLSv1.2 on the command line did the trick, but there doesn't seem to be any discussion or obvious reason for @hughns suggestion not being acted upon.
I've made a commit which I think will allow multiple versions of TLS to be support in line with Qt. Any feedback before I submit a Pull Request would be welcome.
PS: I didn't touch https://github.com/ariya/phantomjs/blob/ddaaa09785d453e41554fd6133a2054c659a317f/src/config.cpp as it doesn't already mention support for TLSv1.1 and TLSv1.2. Does anyone know if the omission of these values was an oversight of a previous commit or is intentional?
Due to our very limited maintenance capacity (see #14541 for more details), we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed. In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!