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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:27:17+00:00 2026-05-26T22:27:17+00:00

In an Android app, I fetch content from a https url; in order to

  • 0

In an Android app, I fetch content from a https url; in order to avoid SSL cert verification errors, I add the SSL public key to my keystore, which then resides in my res/raw folder of the app.
Following the instructions as on http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html, which all works fine so far.

..until I activate Proguard and obfuscation. With Proguard activated, I am getting the following error,

ERROR/Login(4401): Could not login.
    javax.net.ssl.SSLException: hostname in certificate didn't match: <store.mydomain.com/185.165.192.15> != <store.mydomain.com> OR <store.mydomain.com>
    at xyz.fd.a(Unknown Source)

which I don’t quite understand. Why would the idenfitication of the url change in a way that it’s also fetching the /<ipAddress> together with the domain name, whereas it works fine without Proguard obfuscation.

As the httpClient for fetching the https content, I use sources as in MyHttpClient at:
http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html

proguard.cfg:

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*

-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class * extends android.app.backup.BackupAgentHelper
-keep public class * extends android.preference.Preference

-keep class * extends DefaultHttpClient

-ignorewarnings
-repackageclasses 'xyz'
-allowaccessmodification

-keepclasseswithmembernames class * {
    native <methods>;
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet);
}

-keepclasseswithmembers class * {
    public <init>(android.content.Context, android.util.AttributeSet, int);
}

-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}

-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

-keep class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

Update:

Also removing -repackageclasses ‘xyz’ and -allowaccessmodification doesn’t make a difference, same error.

  • 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-26T22:27:17+00:00Added an answer on May 26, 2026 at 10:27 pm

    I was using the latest httpclient 4.1.2. Now when I switch back to 4.1.1, the problem is gone.

    Also see: http://comments.gmane.org/gmane.comp.apache.httpclient.user/262

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

Sidebar

Related Questions

I am using webview in my android app to fetch some webpages from multiple
I want to develop an Android app that will fetch geo-tagged tweets from Twitter
I am making an android database app in which when i fetch values from
My android app needs to fetch some info from a php server that hosts
In my application I am using in app billing (Android). I want to fetch
My android app project need to add a new function of saving the click
in my app i am trying to fetch some data from database and i
I am working on an android app in which i have to fetch data
I try to fetch user's feeds via graph api from my Android application. It
I need to fetch some data over the cloud from my app. I've watched

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.