{"action":"created","issue":{"url":"https://api.github.com/repos/otohdotio/otoh.io-android-client/issues/5","labels_url":"https://api.github.com/repos/otohdotio/otoh.io-android-client/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/otohdotio/otoh.io-android-client/issues/5/comments","events_url":"https://api.github.com/repos/otohdotio/otoh.io-android-client/issues/5/events","html_url":"https://github.com/otohdotio/otoh.io-android-client/issues/5","id":56931828,"number":5,"title":"Two-way SSL broken with API 21","user":{"login":"jason-callaway","id":3760617,"avatar_url":"https://avatars.githubusercontent.com/u/3760617?v=3","gravatar_id":"","url":"https://api.github.com/users/jason-callaway","html_url":"https://github.com/jason-callaway","followers_url":"https://api.github.com/users/jason-callaway/followers","following_url":"https://api.github.com/users/jason-callaway/following{/other_user}","gists_url":"https://api.github.com/users/jason-callaway/gists{/gist_id}","starred_url":"https://api.github.com/users/jason-callaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jason-callaway/subscriptions","organizations_url":"https://api.github.com/users/jason-callaway/orgs","repos_url":"https://api.github.com/users/jason-callaway/repos","events_url":"https://api.github.com/users/jason-callaway/events{/privacy}","received_events_url":"https://api.github.com/users/jason-callaway/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jason-callaway","id":3760617,"avatar_url":"https://avatars.githubusercontent.com/u/3760617?v=3","gravatar_id":"","url":"https://api.github.com/users/jason-callaway","html_url":"https://github.com/jason-callaway","followers_url":"https://api.github.com/users/jason-callaway/followers","following_url":"https://api.github.com/users/jason-callaway/following{/other_user}","gists_url":"https://api.github.com/users/jason-callaway/gists{/gist_id}","starred_url":"https://api.github.com/users/jason-callaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jason-callaway/subscriptions","organizations_url":"https://api.github.com/users/jason-callaway/orgs","repos_url":"https://api.github.com/users/jason-callaway/repos","events_url":"https://api.github.com/users/jason-callaway/events{/privacy}","received_events_url":"https://api.github.com/users/jason-callaway/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-02-08T00:07:17Z","updated_at":"2015-02-08T16:56:24Z","closed_at":null,"body":"postWithJSONCert in otoh.java seems to be broken with API 21 whereas it worked with API 19.\r\n\r\nI'm also using a Nexus 6 now as my test device as opposed to my old Galaxy S5, but I doubt that's the root cause.\r\n\r\n```\r\n-----END CERTIFICATE-----\r\n02-07 19:00:22.183    7867-7887/io.otoh.otohio I/System.out﹕ PUT https://api.otoh.io/0.1/certificates/test201502073 - {\"csr\":\"-----BEGIN CERTIFICATE REQUEST-----\\nMIIBojCCAUwCAQAwfTEZMBcGA1UEAxMQdGVzdDIwMTUwMjA3My1rZTENMAsGA1UEC\\nxMEb3RvaDEdMBsGA1UEChMUQ2F0b2N0aW4gU3lzdGVtcyBMTEMxEjAQBgNVBAcTCU\\nZyZWRlcmljazERMA8GA1UECBMITWFyeWxhbmQxCzAJBgNVBAYTAlVTMFwwDQYJKoZ\\nIhvcNAQEBBQADSwAwSAJBAPilwG6erOfQdN\\/QmfrtiKK5s\\/D7yFZdwchtJ9xHYju4\\n4KMCzZMk5GbqnubIRU8NV0M9VQ4V4nHxdjO0zuKtKgUCAwEAAaBqMGgGCSqGSIb3D\\nQEJDjFbMFkwVwYDVR0RBFAwToEZdGVzdDIwMTUwMjA3M0BleGFtcGxlLmNvbaAxBg\\nMqAwSgKgwoMmU0Mzc3YTUwZDdmOTRkNGIxZDdhYmZiMDA4Yzc1ZjY2ODk1MzA2ZDA\\nNBgkqhkiG9w0BAQsFAANBAHBd2jwRg1Oj24R5wvcoAWajAMEwoJhQs+tgJn9XvlvR\\n6i8KpEnchJPRXhvWH6B0sUmr+hE6T02b2RBkafNHF8Q=\\n-----END CERTIFICATE REQUEST-----\",\"key_use\":\"ke\",\"username\":\"test201502073\",\"identity_name\":\"test201502073@work\"}\r\n02-07 19:00:22.670    7867-7887/io.otoh.otohio E/+++++debug﹕ exception caught\r\n02-07 19:00:22.670    7867-7887/io.otoh.otohio W/System.err﹕ javax.net.ssl.SSLHandshakeException: Handshake failed\r\n02-07 19:00:22.670    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:374)\r\n02-07 19:00:22.670    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.okhttp.Connection.upgradeToTls(Connection.java:197)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.okhttp.Connection.connect(Connection.java:151)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:276)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:211)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:373)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:491)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at io.otoh.otohio.otoh.postWithJSONCert(otoh.java:207)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at io.otoh.otohio.otoh.createCertificate(otoh.java:372)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at io.otoh.otohio.GenIdentityActivity$1.doInBackground(GenIdentityActivity.java:202)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at io.otoh.otohio.GenIdentityActivity$1.doInBackground(GenIdentityActivity.java:91)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at android.os.AsyncTask$2.call(AsyncTask.java:288)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at java.util.concurrent.FutureTask.run(FutureTask.java:237)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at java.lang.Thread.run(Thread.java:818)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xa11b9800: Failure in SSL library, usually a protocol error\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ error:1407743E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert inappropriate fallback (external/openssl/ssl/s23_clnt.c:765 0xac4d0e61:0x00000000)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.org.conscrypt.NativeCrypto.SSL_do_handshake(Native Method)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:302)\r\n02-07 19:00:22.671    7867-7887/io.otoh.otohio W/System.err﹕ ... 19 more\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/otohdotio/otoh.io-android-client/issues/comments/73419391","html_url":"https://github.com/otohdotio/otoh.io-android-client/issues/5#issuecomment-73419391","issue_url":"https://api.github.com/repos/otohdotio/otoh.io-android-client/issues/5","id":73419391,"user":{"login":"jason-callaway","id":3760617,"avatar_url":"https://avatars.githubusercontent.com/u/3760617?v=3","gravatar_id":"","url":"https://api.github.com/users/jason-callaway","html_url":"https://github.com/jason-callaway","followers_url":"https://api.github.com/users/jason-callaway/followers","following_url":"https://api.github.com/users/jason-callaway/following{/other_user}","gists_url":"https://api.github.com/users/jason-callaway/gists{/gist_id}","starred_url":"https://api.github.com/users/jason-callaway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jason-callaway/subscriptions","organizations_url":"https://api.github.com/users/jason-callaway/orgs","repos_url":"https://api.github.com/users/jason-callaway/repos","events_url":"https://api.github.com/users/jason-callaway/events{/privacy}","received_events_url":"https://api.github.com/users/jason-callaway/received_events","type":"User","site_admin":false},"created_at":"2015-02-08T16:56:24Z","updated_at":"2015-02-08T16:56:24Z","body":"Seems to be related to this: http://developer.android.com/about/versions/android-5.0-changes.html#ssl\r\n\r\n> These changes may lead to breakages in HTTPS or TLS/SSL connectivity in a small number of cases listed below."}}