Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7524983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T03:12:38+00:00 2026-05-30T03:12:38+00:00

I am developing an application that need a certificate verification from the server. It

  • 0

I am developing an application that need a certificate verification from the server. It works fine on Android 2.3 version and above, but for android 2.2 it gave me an exception :

W/System.err( 2116): java.io.IOException: SSL handshake failure: Failure in SSL library, usually a protocol error
W/System.err( 2116): error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure (external/openssl/ssl/s3_pkt.c:1053 0x3a5208:0x00000003)
W/System.err( 2116):    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeconnect(Native Method)
W/System.err( 2116):    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:305)
W/System.err( 2116):    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.<init>(OpenSSLSocketImpl.java:502)
W/System.err( 2116):    at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:443)

This error came from BufferedInputStream when the device try to retrieve an InputStream from SSLSocket. The code is below :

BufferedInputStream getSocketReader() throws IOException {
BufferedInputStream bis = new BufferedInputStream(sslSocket.getInputStream(), 32768);
        return bis;
    }

Here is my current code of createEasySSLContext() method:

private static SSLContext createEasySSLContext() throws IOException {
    try {
        SSLContext context = SSLContext.getInstance("TLS");
        KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
        keyManagerFactory.init(sampleKeystore, "password".toCharArray());

        CustomX509TrustManager trustManager = new CustomX509TrustManager(null);
        context.init(keyManagerFactory.getKeyManagers(), new TrustManager[]{trustManager}, null);
        return context;
    } catch (Exception e) {
        throw new IOException(e.getMessage());
    }
}

How is this happen? Can I fixed it without losing Android 2.2 support? Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T03:12:39+00:00Added an answer on May 30, 2026 at 3:12 am

    More likely the CA that issued your server certificate is not trusted by Android 2.1. Either get a new certificate, or create a trust store that contains the CA certificate and setup your code to use it.

    More info and some sample code here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a desktop application that will need to collect data (from the
I am developing one application that requires records from Addressbook , I need all
I am developing an application that updates the data in QTableView from apache server
In the small application that I'm currently developing for a customer I need to
I'm creating an installation script for an application that I'm developing and need to
I am developing RoR application that works with legacy database and uses ActiveScaffold plugin
I'm developing an application that will need to communicate with itself running on different
I am developing an ASP.Net application that will need to verify that the user
I am developing application in N-Tier Architecture. as we all know that we need
I'm developing a standalone application that accesses a common database on a server. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.