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 6329539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:41:11+00:00 2026-05-24T17:41:11+00:00

I am performing HTTP Basic Authentication in my Android application. Recently, however, I have

  • 0

I am performing HTTP Basic Authentication in my Android application. Recently, however, I have been having problems authenticating users due to the following change made on my server:

“…SSL certificates with a key length of 1,024 bits or fewer will be insufficient for security after December 31, 2010. In compliance with these guidelines, most SSL certificate vendors (including GeoTrust) have begun issuing these new 2048-bit keys.”

The recommendation was made to update my Java Runtime Environment. However, seeing as how my application is on the Android, I don’t believe that this would do anything. Therefore, my question is this:

How can I change the following code to use 2048-bit encryption? Is this possible? Does anyone have any recommendations? I’d greatly appreciate it. Thanks!

DefaultHttpClient client = new DefaultHttpClient();
client.getParams().setParameter("Content-type",
        "application/xml");
client.getCredentialsProvider().setCredentials(
        new AuthScope(Constants.SERVER_HOST,
                Constants.SERVER_PORT,
                Constants.SERVER_REALM),
        new UsernamePasswordCredentials(username.getText()
                .toString(), password.getText().toString()));

String getURL = Constants.SERVER_URL;
HttpGet get = new HttpGet(getURL);
responseGet = client.execute(get);

Stack trace errors:

javax.net.ssl.SSLException: Not trusted server certificate
Caused by: java.security.cert.CertificateException:
Caused by: java.security.cert.CertPathValidatorException: TrustAnchor for CertPath not     found.java.security.cert.CertPathValidatorException:
  • 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-24T17:41:13+00:00Added an answer on May 24, 2026 at 5:41 pm

    You don’t. That code has nothing to do with encryption. The server’s administrator is responsible for updating it to use a longer key (2048 bit). You just have to test that your app still works after the update (it seems it doesn’t). What exactly is the problem? Can’t connect anymore? What error (stack trace) are you getting?

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

Sidebar

Related Questions

I have an application that is performing HTTP Requests (specifically calling the FogBugz API)
I have an Android application with an ASP.NET backend. I have the registration_id for
I have a Generic HTTP Handler (*.ashx) in my ASP.Net application which performs some
I am performing asynchronous HTTP (Ajax) requests via jQuery with the basic $.ajax(). The
Aloha, I've been following the guidelines here: http://developer.android.com/resources/tutorials/testing/helloandroid_test.html To create some simple test cases
Something I still don't understand when performing an http-get request to the server is
While performing some upcoming maintenance, I'm going to have to redirect all site traffic
When performing many inserts into a database I would usually have code like this:
I am performing a standard update in NHibernate to a single property. However on
Performing user authentication in Java EE / JSF using j_security_check I tried this solution.

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.