HTTP (no SSL) sync crashes with javax.net.ssl.SSLPeerUnverifiedException



  • Hello,
    I am using the current fdroid version (0.6.2). I am connecting to my server without https, using only http. When I try to sync from server to phone, it works fine. Sync from phone to server throws this exception in logcat:

    	
    
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681): I/O error (Android will try again later)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681): javax.net.ssl.SSLPeerUnverifiedException: Cannot verify hostname: XXX.XXX.XX
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at at.bitfire.davdroid.webdav.TlsSniSocketFactory.connectWithSNI(TlsSniSocketFactory.java:117)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at at.bitfire.davdroid.webdav.TlsSniSocketFactory.connectSocket(TlsSniSocketFactory.java:74)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at ch.boye.httpclientandroidlib.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:118)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at ch.boye.httpclientandroidlib.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at ch.boye.httpclientandroidlib.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at ch.boye.httpclientandroidlib.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at ch.boye.httpclientandroidlib.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at ch.boye.httpclientandroidlib.impl.execchain.RetryExec.execute(RetryExec.java:85)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at ch.boye.httpclientandroidlib.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at ch.boye.httpclientandroidlib.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at ch.boye.httpclientandroidlib.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at at.bitfire.davdroid.webdav.WebDavResource.put(WebDavResource.java:365)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at at.bitfire.davdroid.resource.RemoteCollection.add(RemoteCollection.java:144)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at at.bitfire.davdroid.syncadapter.SyncManager.pushNew(SyncManager.java:140)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at at.bitfire.davdroid.syncadapter.SyncManager.synchronize(SyncManager.java:46)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at at.bitfire.davdroid.syncadapter.DavSyncAdapter.onPerformSync(DavSyncAdapter.java:133)
        08-22 13:09:56.610: E/davdroid.DavSyncAdapter(17681):   at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:247)
    

    How can I solve this? I cannot import server certificate into my phone and I know the risks of using http.Thank You.


  • developer

    Please provide verbose logs, including the URLs that were tried to fetch. Are they http URLs?


  • developer

    Any news on this? Do you use OwnCloud? It redirects http to https by default, so this may be the reason.


  • developer

    I guess http has redirected to https, so I'm closing this.


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.