Android 5.0 SSL Socket Exception javax.net.ssl.SSLPeerUnverifiedException:No Peer certificate

Source: Internet
Author: User
Tags sha1

Update to the latest version of Android 5.0 beta test My app, when I use API call Https Access when reported as the next error.

Javax.net.ssl.SSLPeerUnverifiedException:No Peer Certificate 11-26 15:35:01.919:w/system.err (353): at Com.android.org.conscrypt.SSLNullSession.getPeerCertificates (sslnullsession.java:104) 11-26 15:35:01.919:w/ System.err (353): at Org.apache.http.conn.ssl.AbstractVerifier.verify (abstractverifier.java:93) 11-26 15:35:01.919: W/system.err (353): at Org.apache.http.conn.ssl.SSLSocketFactory.createSocket (sslsocketfactory.java:388) 11-26 15:35:01.919:w/system.err (353): at Org.apache.http.impl.conn.DefaultClientConnectionOperator.updateSecureConnection ( defaultclientconnectionoperator.java:231) 11-26 15:35:01.919:w/system.err (353): at Org.apache.http.impl.conn.AbstractPoolEntry.layerProtocol (abstractpoolentry.java:302) 11-26 15:35:01.920:w/ System.err (353): At Org.apache.http.impl.conn.AbstractPooledConnAdapter.layerProtocol ( abstractpooledconnadapter.java:146) 11-26 15:35:01.920:w/system.err (353): at Org.apache.http.impl.client.DefaultRequestDirector.establishRoute (Defaultrequestdirector.java:654) 11-26 15:35:01.920:w/system.err (353): At Org.apache.http.impl.client.DefaultRequestDirector.execute ( defaultrequestdirector.java:370) 11-26 15:35:01.920:w/system.err (353): at Org.apache.http.impl.client.AbstractHttpClient.execute (abstracthttpclient.java:555) 11-26 15:35:01.920:w/ System.err (353): at Org.apache.http.impl.client.AbstractHttpClient.execute (abstracthttpclient.java:487) 11-26 15:35:01.920:w/system.err (353): At Org.apache.http.impl.client.AbstractHttpClient.execute ( abstracthttpclient.java:465) 11-26 15:35:01.920:w/system.err (353): at Com.praxify.model.CallServer.makeHttpGetRequest (callserver.java:1515) Android Apache SSL Ssl-certificate


These two days have been plagued by this problem, after unremitting efforts, finally let me locate the problem, (not necessarily the perfect solution for general.) )

Android 5.0 version of Google does not trust the SHA1 certificate, even if set to expire in 2016 is not. If you find that the above problem can be viewed through the browser connection situation is not a certificate problem, the solution is very simple, only need to reconfigure the SHA256 or SHA1 certificate, to regenerate a new. Expiration date can be set to 2015


I am here address find the solution, English good can go to read the original: https://code.google.com/p/android-developer-preview/issues/detail?id=1200

Original address: http://www.itmmd.com/201412/239.html

By Meng Meng's IT People

Android 5.0 SSL Socket Exception javax.net.ssl.SSLPeerUnverifiedException:No Peer certificate

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.