You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The OSX client used to connect but I don't know when it stopped working. It now fails to connect to an owncloud install on my web hosting site (bluehost.com). I get error "SSL handshake failed".
The client log shows:
06-19 11:08:54:414 ownCloudInfo Network Error: 6
06-19 11:08:54:414 status.php returns: "" 6 Reply: QNetworkReplyImpl(0x1015b3be0)
06-19 11:08:54:414 No proper answer on "https://box282.bluehost.com/~m/owncloud/status.php/status.php"
The spurious "SSL handshake failed" error messages I have been seeing were due to putting the Mac to sleep. When waking up, the network connection would be gone. Could this be your problem as well? If so, it might be "good enough" for the client to just retry.
Thanks for the input. However, I get this error from the setup wizard. I did some digging in the code but with little insight. The best I can tell is that the error is coming from the QT network manager. I goggled and found someone else complaining about QT network manager giving the same error when curl worked fine. A suggestion that poster to use wireshark to see what is different btw the QT app and curl sounds like a good next step me.
An update to this issue. I installed the owncloud iPhone app and it was fine. Between this app and the linux client working fine, I'm assuming it's not a server setup issue but an OSX client issue.
I used wireshark to capture the packets. The curl connection produces more traffic and the connection succeeds. The OS X client's traffic seems to be truncated. I don't understand all of the negotiations in the packets. I can provide my wireshark packet traces if someone working on this bug wants them. I don't want to post them publicly so PM me to get them.
I updated the iOS app this morning and it still works.
I installed OC on a testbed server. This server that does not have https capability. The OC client connects to it fine. With the previous client version I could not connect to this server.
I hope all this info helps someone with this bug. I'd love to help with a patch but it's way over my head. Maybe if someone can point me in the right direction I could take a stab at it.
Having the same issue on OSX. (Windows/iPhone client works fine). Running owncloud via SSL on a non standard port, everything works fine across ALL clients if I utilize IP address:Port, however if I utilize domain name:port, works on all clients EXCEPT OSX where it throws an SSL handshake error. Very strange. All clients except OSX client prompt to accept the self signed cert, maybe this is the issue?
Ok guys, let's investigate this. First off a few of my observations:
"But it works on XY" is not a sufficient indication that it works elsewhere. To ensure your SSL setup is correct, use http://ssllabs.com to check your host (usually the problem is a missing intermediate certificate (which makes it fail on all platforms, but works on browsers because they will fetch the intermediate), or sending the root certificate, which should be in your browser (it's best practice not to do that, it's a hard requirement for the ownCloud client on Mac OS).
Qt on Mac has a few gotchas that we cannot workaround easily
So far, I've gotten OS X to connect eventually (with modifications to the setup if required), I am interested why it fails for you.
I need your feedback on the following issues:
SNI: Are you using SNI (Server Name Indication, aka SSL vhost)?
Is this one certificate with several hosts ("Subject Alternative Name", or SAN), or one host per certificate?
Are you using a reverse proxy?
Which Server are you using (Apache, nginx, etc), for Reverse-Proxy users: which reverse proxy software are you using?
I have done some checks with SSLLabs and mitigated a certificate chain issue, that in the end didn't solve the issue. The results of my check are included here in this screenshot:
Pertaining to your questions:
AFAIK, I am not using SNI
The certificate is only issued for one CN: owncloud.loomion.com, no alternate subject name defined
Nope
Apache on my QNAP 259+
Thank you for your precious time. I offer you to connect to my system in order to obtain a live view. Just let me know whether this is of interest for you.
@boschma1 I already tried to check the setup on your system, and it seems the server is sending three certificates:
Server cert.
Intermediate cert.
Root cert.
Please remove the root cert from your certificate bundle. There is no point in doing so (after all the client can only trust the root if its in its own root-cert-store) and it's causing issues with the client.
@danimo : if I remove the Root CA, then the Windows client shows the same symptoms as the Mac client. Currently the server certificate seems to have 2 intermediate certificates involved (see screen shot):
@boschma1 Oh, well, then I was wrong and what I thought was the root cert was in fact another intermediate. Oh my... Will continue investigation later then, if it's ok for you.
@boschma1 Can you try to disable SSLv2 (and possibly v3)? v2 seems to provide no cipher suites. It's possible that the rather old openssl on mac os cockes on this.
If the client requests a host name, the server responds with a TLS Alert (Level Warning, Description: Unrecognized Name). Some implementations choose to ignore this (e.g. most browsers), others decide to make the handshake fail as a precaution or because they don't handle the error as a warning (Java 7, Qt).
You had mentioned that people are putting in server info with redacted information. I am having the issue noted above and if youd like, I can provide you with a login into my server as well as the detailed info from ssl labs.
@danimo Sort of. I am getting an A- on SSL labs. The command you provided returns an error for me. says unknow option where you have yourhost.com the second time .
@danimo Add me to the list too. Qualys SSL's test gives me an A+, no errors.
Your openssl s_client command only gives one warning, but that's just related to closing the session:
SSL3 alert write:warning:close notify
Clients for Windows and IOS devices work flawlessly.
Certificate is purchased, not self-signed.
Apache doesn't log the mac client connection attempt (ssl_connect_log, ssl_request_log, ssl_error_log all remain silent), but I do see some tcp back and forth with tcpdump (from the server).
I can only assume that that "Unrecognized Name" error is because the server is set up to host multiple domains. (The SSL cert is a UCC type that has other alternate names)
Otherwise, the only other thing I can think of that is causing the client to drop the connection is the piggybacking of the intermediate cert that gets sent along with the server public cert?
and correctly specifies the FQDN of the server in the HTTP request.
Server HELLO replies with an Alert warning: Unrecognized Name, and then specifies this supported Cipher Suite, which is the first one the client asks for:
The server then sends the certificate contents which include both the server's public key, and the intermediate certificate owned by the signing cert company (Starfieldtech). This second cert is needed to complete the chain back to the trusted certs that the client would have on file on the local workstation. Note that the common name in the server's cert matches the FQDN the client asked the server for.
The client then responds with a TCP FIN thus starting the breakdown of the communication.
I got the client to work when I specified the server name in the Apache ssl configuration file:
ServerName xxxx.xxxx.xxx:443
This breaks the server's ability to serve other domains securely with the UCC cert, so I had to disable it, but I think this is your smoking gun: The mac client software is incorrectly honoring that "Unrecognized Name" warning as being an error instead.
@zestysoft 's advice is right on the money. Setting the ServerName in /etc/apache2/sites-available/000-default.conf fixed it for me. (I should learn to read threads backwards.)
Same here: I had ServerName myServer in /etc/apache2/apache2.conf already, but Mac OS added the .local suffix to host names, so adding ServerName myServer.local and running service apache2 reload did the trick.
Activity
MarcelWaldvogel commentedon Jun 26, 2013
The spurious "SSL handshake failed" error messages I have been seeing were due to putting the Mac to sleep. When waking up, the network connection would be gone. Could this be your problem as well? If so, it might be "good enough" for the client to just retry.
clayton256 commentedon Jun 27, 2013
Thanks for the input. However, I get this error from the setup wizard. I did some digging in the code but with little insight. The best I can tell is that the error is coming from the QT network manager. I goggled and found someone else complaining about QT network manager giving the same error when curl worked fine. A suggestion that poster to use wireshark to see what is different btw the QT app and curl sounds like a good next step me.
clayton256 commentedon Jun 29, 2013
An update to this issue. I installed the owncloud iPhone app and it was fine. Between this app and the linux client working fine, I'm assuming it's not a server setup issue but an OSX client issue.
I used wireshark to capture the packets. The curl connection produces more traffic and the connection succeeds. The OS X client's traffic seems to be truncated. I don't understand all of the negotiations in the packets. I can provide my wireshark packet traces if someone working on this bug wants them. I don't want to post them publicly so PM me to get them.
Thanks,
Mark
clayton256 commentedon Jul 11, 2013
A couple of updates to this issue.
I updated the iOS app this morning and it still works.
I installed OC on a testbed server. This server that does not have https capability. The OC client connects to it fine. With the previous client version I could not connect to this server.
I hope all this info helps someone with this bug. I'd love to help with a patch but it's way over my head. Maybe if someone can point me in the right direction I could take a stab at it.
Thanks,
Mark
tracerrx commentedon Sep 13, 2013
Having the same issue on OSX. (Windows/iPhone client works fine). Running owncloud via SSL on a non standard port, everything works fine across ALL clients if I utilize IP address:Port, however if I utilize domain name:port, works on all clients EXCEPT OSX where it throws an SSL handshake error. Very strange. All clients except OSX client prompt to accept the self signed cert, maybe this is the issue?
tomscat commentedon Sep 17, 2013
same here,
did work fine until ~21 days ago
Mac OS X Lion
owncloud client 1.4.0
danimo commentedon Sep 29, 2013
Ok guys, let's investigate this. First off a few of my observations:
I need your feedback on the following issues:
boschma1 commentedon Sep 29, 2013
I have done some checks with SSLLabs and mitigated a certificate chain issue, that in the end didn't solve the issue. The results of my check are included here in this screenshot:

Pertaining to your questions:
Thank you for your precious time. I offer you to connect to my system in order to obtain a live view. Just let me know whether this is of interest for you.
Cheers
Markus
danimo commentedon Sep 29, 2013
@boschma1 I already tried to check the setup on your system, and it seems the server is sending three certificates:
Please remove the root cert from your certificate bundle. There is no point in doing so (after all the client can only trust the root if its in its own root-cert-store) and it's causing issues with the client.
boschma1 commentedon Sep 29, 2013
@danimo : if I remove the Root CA, then the Windows client shows the same symptoms as the Mac client. Currently the server certificate seems to have 2 intermediate certificates involved (see screen shot):

danimo commentedon Sep 29, 2013
@boschma1 Oh, well, then I was wrong and what I thought was the root cert was in fact another intermediate. Oh my... Will continue investigation later then, if it's ok for you.
danimo commentedon Sep 29, 2013
@boschma1 Can you try to disable SSLv2 (and possibly v3)? v2 seems to provide no cipher suites. It's possible that the rather old openssl on mac os cockes on this.
34 remaining items
danimo commentedon May 14, 2014
One more thing that I just saw in the wild. If
openssl s_client -tlsextdebug -state -connect yourhost.com:443 -CApath -servername yourhost.com 2>&1< /dev/null|grep read:warningyields
SSL3 alert read:warning:unrecognized namethen please fix your SNI setup.
If the client requests a host name, the server responds with a TLS Alert (Level Warning, Description: Unrecognized Name). Some implementations choose to ignore this (e.g. most browsers), others decide to make the handshake fail as a precaution or because they don't handle the error as a warning (Java 7, Qt).
Sometimes ensuring that
SSLStrictSNIVHostCheck offis set might help, but you really should take a look at the SNI reference setup at https://sni.velox.ch/ to fix your setup.If you are using a NAS, it is important to look at the effective settings (those generated by the web interface)
joubin commentedon May 28, 2014
@danimo
You had mentioned that people are putting in server info with redacted information. I am having the issue noted above and if youd like, I can provide you with a login into my server as well as the detailed info from ssl labs.
Please email me if interested!
[email protected]
ataraxus commentedon May 28, 2014
+1
danimo commentedon May 28, 2014
@joubin @ataraxus : have you verified that
SSL3 alert read:warning:unrecognized namedoes not happen to you?joubin commentedon May 28, 2014
@danimo Sort of. I am getting an A- on SSL labs. The command you provided returns an error for me. says unknow option where you have yourhost.com the second time .
EDIT:OpenSSL on Mac 10.9 and Ubuntu 12.04, 14.04
ataraxus commentedon May 28, 2014
@danimo same problem as @joubin using ubuntu openssl to test.
zestysoft commentedon Jun 3, 2014
@danimo Add me to the list too. Qualys SSL's test gives me an A+, no errors.
Your openssl s_client command only gives one warning, but that's just related to closing the session:
SSL3 alert write:warning:close notify
Clients for Windows and IOS devices work flawlessly.
Certificate is purchased, not self-signed.
Apache doesn't log the mac client connection attempt (ssl_connect_log, ssl_request_log, ssl_error_log all remain silent), but I do see some tcp back and forth with tcpdump (from the server).
Server: Apache/2.4.9 (Fedora) OpenSSL/1.0.1e-fips PHP/5.5.12 mod_perl/2.0.9-dev Perl/v5.18.2
Edit:
I cranked up the server logging to debug, here's what Apache is reporting:
zestysoft commentedon Jun 4, 2014
@danimo
Here is wireshark's capture of the communication:
I can only assume that that "Unrecognized Name" error is because the server is set up to host multiple domains. (The SSL cert is a UCC type that has other alternate names)
Otherwise, the only other thing I can think of that is causing the client to drop the connection is the piggybacking of the intermediate cert that gets sent along with the server public cert?
zestysoft commentedon Jun 4, 2014
Here's more detail:
Client HELLO asks for these Cipher Suites:
and correctly specifies the FQDN of the server in the HTTP request.
Server HELLO replies with an Alert warning: Unrecognized Name, and then specifies this supported Cipher Suite, which is the first one the client asks for:
The server then sends the certificate contents which include both the server's public key, and the intermediate certificate owned by the signing cert company (Starfieldtech). This second cert is needed to complete the chain back to the trusted certs that the client would have on file on the local workstation. Note that the common name in the server's cert matches the FQDN the client asked the server for.
The client then responds with a TCP FIN thus starting the breakdown of the communication.
zestysoft commentedon Jun 4, 2014
@danimo
I got the client to work when I specified the server name in the Apache ssl configuration file:
ServerName xxxx.xxxx.xxx:443
This breaks the server's ability to serve other domains securely with the UCC cert, so I had to disable it, but I think this is your smoking gun: The mac client software is incorrectly honoring that "Unrecognized Name" warning as being an error instead.
protist commentedon Jul 1, 2014
@zestysoft 's advice is right on the money. Setting the ServerName in
/etc/apache2/sites-available/000-default.conffixed it for me. (I should learn to read threads backwards.)robertwenner commentedon Aug 13, 2014
Same here: I had
ServerName myServerin/etc/apache2/apache2.confalready, but Mac OS added the .local suffix to host names, so addingServerName myServer.localand runningservice apache2 reloaddid the trick.timtelcik commentedon Jan 9, 2017
Hello All,
just in case it's helpful to another reader of this thread, I bumped into a similar issue, an SSL SNI handshake error.
My SSL handshake error manifested as follows:
{code}
$ git clone https://GIT-HOST/GIT-PROJECT.git
Cloning into 'GIT-PROJECT'...
fatal: unable to access 'https://GIT-HOST/GIT-PROJECT.git/': SSL peer handshake failed, the server most likely requires a client certificate to connect
{code}
My local Mac development environment:
I resolved the SSL SNI handshake error as follows:
1/ Upgraded openssl resources for Mac Port
{code}
sudo pip install ndg-httpsclient pyasn1
sudo pip install ndg-httpsclient pyasn1 --upgrade
{code}
2/ Upgraded Apple XCode developers tools
e.g.
{code}
xcode-select --install
{code}
3/ Update Git client configuration
Edit file $HOME/.gitconfig and change "sslvertify" from "false" to "true"
From ...
{code}
...
[http]
postBuffer = 209715200
sslverify = false
....
{code}
To ...
{code}
...
[http]
postBuffer = 209715200
sslverify = true
....
{code}
Some helpful references:
How to upgrade OpenSSL in OS X?
** http://apple.stackexchange.com/questions/126830/how-to-upgrade-openssl-in-os-x
Command Line Tools bash (git) not working - macOS Sierra final release candidate
** http://stackoverflow.com/questions/39484218/command-line-tools-bash-git-not-working-macos-sierra-final-release-candidate
kennethreitz requests - https GET request fails with "handshake failure" Windows Desktop Client and Option --confdir #2022
** https://github.com/kennethreitz/requests/issues/2022#issuecomment-133204955
Regards,
Tim
email: [email protected]
chscorpio commentedon Nov 10, 2017
Instead of wireshark, here is a simpler way to reveal this issue if you have openssl...