{"action":"created","issue":{"url":"https://api.github.com/repos/syncany/syncany/issues/483","labels_url":"https://api.github.com/repos/syncany/syncany/issues/483/labels{/name}","comments_url":"https://api.github.com/repos/syncany/syncany/issues/483/comments","events_url":"https://api.github.com/repos/syncany/syncany/issues/483/events","html_url":"https://github.com/syncany/syncany/issues/483","id":84725370,"number":483,"title":"Could not generate DH keypair","user":{"login":"oparoz","id":323220,"avatar_url":"https://avatars.githubusercontent.com/u/323220?v=3","gravatar_id":"","url":"https://api.github.com/users/oparoz","html_url":"https://github.com/oparoz","followers_url":"https://api.github.com/users/oparoz/followers","following_url":"https://api.github.com/users/oparoz/following{/other_user}","gists_url":"https://api.github.com/users/oparoz/gists{/gist_id}","starred_url":"https://api.github.com/users/oparoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oparoz/subscriptions","organizations_url":"https://api.github.com/users/oparoz/orgs","repos_url":"https://api.github.com/users/oparoz/repos","events_url":"https://api.github.com/users/oparoz/events{/privacy}","received_events_url":"https://api.github.com/users/oparoz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/syncany/syncany/labels/status:help-needed","name":"status:help-needed","color":"009800"},{"url":"https://api.github.com/repos/syncany/syncany/labels/type:bug","name":"type:bug","color":"eb6420"},{"url":"https://api.github.com/repos/syncany/syncany/labels/what:plugin","name":"what:plugin","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-03T19:07:59Z","updated_at":"2015-06-03T20:26:56Z","closed_at":null,"body":"While trying to connect to my ownCloud server, I only get this in the logs.\r\n\r\n```\r\n3-6-15 20:52:26.256 | WebdavTransferM | IntRq/Sample p | INFO : WebDAV: isTrusted([Ljava.security.cert.X509Certificate;@3ae1b9ca, DHE_RSA)\r\n3-6-15 20:52:26.258 | WebdavTransferM | IntRq/Sample p | WARN : testRepoFileExists: Exception thrown while testing if repo file exists.\r\njavax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair\r\n\tat sun.security.ssl.Alerts.getSSLException(Unknown Source)\r\n\tat sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)\r\n\tat sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)\r\n\tat sun.security.ssl.SSLSocketImpl.handleException(Unknown Source)\r\n\tat sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)\r\n\tat sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)\r\n\tat org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:275)\r\n\tat org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:254)\r\n\tat org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:123)\r\n\tat org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318)\r\n\tat org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)\r\n\tat org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)\r\n\tat org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)\r\n\tat org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)\r\n\tat org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)\r\n\tat org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)\r\n\tat org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)\r\n\tat org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:214)\r\n\tat org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:160)\r\n\tat com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:823)\r\n\tat com.github.sardine.impl.SardineImpl.exists(SardineImpl.java:804)\r\n\tat org.syncany.plugins.webdav.WebdavTransferManager.testRepoFileExists(WebdavTransferManager.java:384)\r\n\tat org.syncany.plugins.transfer.AbstractTransferManager.test(AbstractTransferManager.java:84)\r\n\tat org.syncany.operations.init.InitOperation.performRepoTest(InitOperation.java:194)\r\n\tat org.syncany.operations.init.InitOperation.execute(InitOperation.java:92)\r\n\tat org.syncany.operations.daemon.messages.InitManagementRequestHandler$1.run(InitManagementRequestHandler.java:44)\r\n\tat java.lang.Thread.run(Unknown Source)\r\nCaused by: java.lang.RuntimeException: Could not generate DH keypair\r\n\tat sun.security.ssl.DHCrypt.<init>(Unknown Source)\r\n\tat sun.security.ssl.ClientHandshaker.serverKeyExchange(Unknown Source)\r\n\tat sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)\r\n\tat sun.security.ssl.Handshaker.processLoop(Unknown Source)\r\n\tat sun.security.ssl.Handshaker.process_record(Unknown Source)\r\n\tat sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)\r\n\tat sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)\r\n\t... 23 more\r\nCaused by: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 2048 (inclusive)\r\n\tat com.sun.crypto.provider.DHKeyPairGenerator.initialize(DHKeyPairGenerator.java:120)\r\n\tat java.security.KeyPairGenerator$Delegate.initialize(Unknown Source)\r\n\t... 30 more\r\n```\r\n\r\nThe ownCloud client can connect, no problem.\r\n\r\nHere is the list of supported ciphers\r\n```\r\nprio  ciphersuite                  protocols              pfs_keysize\r\n1     DHE-RSA-AES256-GCM-SHA384    TLSv1.2                DH,4096bits\r\n2     DHE-RSA-AES256-SHA256        TLSv1.2                DH,4096bits\r\n3     ECDHE-RSA-AES256-GCM-SHA384  TLSv1.2                ECDH,B-571,570bits\r\n4     ECDHE-RSA-AES256-SHA384      TLSv1.2                ECDH,B-571,570bits\r\n5     DHE-RSA-AES128-GCM-SHA256    TLSv1.2                DH,4096bits\r\n6     DHE-RSA-AES128-SHA256        TLSv1.2                DH,4096bits\r\n7     ECDHE-RSA-AES128-GCM-SHA256  TLSv1.2                ECDH,B-571,570bits\r\n8     ECDHE-RSA-AES128-SHA256      TLSv1.2                ECDH,B-571,570bits\r\n9     ECDHE-RSA-RC4-SHA            TLSv1,TLSv1.1,TLSv1.2  ECDH,B-571,570bits\r\n10    DHE-RSA-CAMELLIA256-SHA      TLSv1,TLSv1.1,TLSv1.2  DH,4096bits\r\n11    DHE-RSA-AES256-SHA           TLSv1,TLSv1.1,TLSv1.2  DH,4096bits\r\n12    ECDHE-RSA-AES256-SHA         TLSv1,TLSv1.1,TLSv1.2  ECDH,B-571,570bits\r\n13    DHE-RSA-CAMELLIA128-SHA      TLSv1,TLSv1.1,TLSv1.2  DH,4096bits\r\n14    DHE-RSA-AES128-SHA           TLSv1,TLSv1.1,TLSv1.2  DH,4096bits\r\n15    ECDHE-RSA-AES128-SHA         TLSv1,TLSv1.1,TLSv1.2  ECDH,B-571,570bits\r\n```"},"comment":{"url":"https://api.github.com/repos/syncany/syncany/issues/comments/108605690","html_url":"https://github.com/syncany/syncany/issues/483#issuecomment-108605690","issue_url":"https://api.github.com/repos/syncany/syncany/issues/483","id":108605690,"user":{"login":"oparoz","id":323220,"avatar_url":"https://avatars.githubusercontent.com/u/323220?v=3","gravatar_id":"","url":"https://api.github.com/users/oparoz","html_url":"https://github.com/oparoz","followers_url":"https://api.github.com/users/oparoz/followers","following_url":"https://api.github.com/users/oparoz/following{/other_user}","gists_url":"https://api.github.com/users/oparoz/gists{/gist_id}","starred_url":"https://api.github.com/users/oparoz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oparoz/subscriptions","organizations_url":"https://api.github.com/users/oparoz/orgs","repos_url":"https://api.github.com/users/oparoz/repos","events_url":"https://api.github.com/users/oparoz/events{/privacy}","received_events_url":"https://api.github.com/users/oparoz/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T20:26:56Z","updated_at":"2015-06-03T20:26:56Z","body":"It seems like the only solution is to downgrade to 2048bit as Java is not capable of trying the next key length. It just throws an exception.\r\n\r\nI think there are 2 things which can be done from your side:\r\n1. Print an error message in the client, so that users know what's going on. Without looking at the logs, I was about to open a totally different issue about missing auth headers\r\n2. Add something to the FAQ so that users know what to do in case of failure\r\n\r\n"}}