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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T04:57:25+00:00 2026-06-01T04:57:25+00:00

I am developing an Android application which needs to access QuickPay’s service ( https://secure.quickpay.dk/form

  • 0

I am developing an Android application which needs to access QuickPay’s service (“https://secure.quickpay.dk/form“) through an Http-client. But I keep getting errors when accessing the page. More specifically I get a “No Peer Certificate” error message. I tried several different things already:
I tried adding the root certificate to my keystore, and to use this keystore when connecting, following this procedure: adding certificate to keystore.
I also tried accepting all certificates, following the proposed method from here: accepting certificate for android.
I have successfully connected to other https sites, but can not seem to connect to this one. I have tried on different Android devices (1.6, 2.2, and 2.3.3). Can anyone succeed in connecting to quickpay’s site, or can anyone come up with a possible solution/fix?

//Update: If I access this site with my WebView: payment window examples, and press one of the buttons (which basically just launches a http post with some pre-defined variables) I am able to connect to the site in the webview on Android 2.3.3. Furthermore, I found out that I get a reply from the site if I try to launch the above application on Android 3.1! Any suggestions?

public class MyHttpClient extends DefaultHttpClient {

final Context context;

public MyHttpClient(Context context) {
    this.context = context;
    loadHttps();
}

private void loadHttps() {
    String url = "https://secure.quickpay.dk/form";
    HttpPost httpPost = new HttpPost(url);
    try {
        System.out.println("Executing");
        this.execute(httpPost);
    } catch (UnsupportedEncodingException e) {
        System.out.println(e.getMessage());
    } catch (ClientProtocolException e) {
        System.out.println(e.getMessage());
    } catch (IOException e) {
        System.out.println(e);
    }
}

@Override
protected ClientConnectionManager createClientConnectionManager() {
    SchemeRegistry registry = new SchemeRegistry();
    registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
    registry.register(new Scheme("https", newSslSocketFactory(), 443));
    return new SingleClientConnManager(getParams(), registry);
}

private SSLSocketFactory newSslSocketFactory() {
    try {
        KeyStore trusted = KeyStore.getInstance("BKS");
        InputStream in = context.getResources().openRawResource(R.raw.test);
        try {
            trusted.load(in, "mysecret".toCharArray());
        } finally {
            in.close();
        }
        SSLSocketFactory sf = new SSLSocketFactory(trusted);
        return sf;
    } catch (Exception e) {
        throw new AssertionError(e);
    }
}

}


StackTrace:

WARN/System.err(8459)        at org.apache.harmony.xnet.provider.jsse.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java    258)
 WARN/System.err(8459)       at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java  93)
 WARN/System.err(8459)       at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java    381)
 WARN/System.err(8459)       at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java   177)
 WARN/System.err(8459)       at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java 164)
 WARN/System.err(8459)       at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java 119)
 WARN/System.err(8459)       at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java  359)
 WARN/System.err(8459)       at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java  555)
 WARN/System.err(8459)       at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java  487)
 WARN/System.err(8459)       at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java  465)
 WARN/System.err(8459)       at test.https.MyHttpClient.loadHttps(MyHttpClient.java 34)
 WARN/System.err(8459)       at test.https.MyHttpClient.<init>(MyHttpClient.java    26)
 WARN/System.err(8459)       at test.https.HttpsTesterActivity.onCreate(HttpsTesterActivity.java    60)
 WARN/System.err(8459)       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java   1047)
 WARN/System.err(8459)       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java    1615)
 WARN/System.err(8459)       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java 1667)
 WARN/System.err(8459)       at android.app.ActivityThread.access$1500(ActivityThread.java  117)
 WARN/System.err(8459)       at android.app.ActivityThread$H.handleMessage(ActivityThread.java  935)
 WARN/System.err(8459)       at android.os.Handler.dispatchMessage(Handler.java 99)
 WARN/System.err(8459)       at android.os.Looper.loop(Looper.java  123)
 WARN/System.err(8459)       at android.app.ActivityThread.main(ActivityThread.java 3687)
 WARN/System.err(8459)       at java.lang.reflect.Method.invokeNative(Native Method)    
 WARN/System.err(8459)       at java.lang.reflect.Method.invoke(Method.java 507)
 WARN/System.err(8459)       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java  842)
 WARN/System.err(8459)       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java 600)
  • 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-06-01T04:57:27+00:00Added an answer on June 1, 2026 at 4:57 am

    Just to sum up, I fixed this issue by sticking to the WebView approach. The interaction with the API was moved to a server, creating an intermediate communication point which handles the certificate issues. Not the most elegant solution but it works 🙂

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

Sidebar

Related Questions

I'm developing an Android application which uses the AccountManager to get access to the
I am developing an Android application which needs an image to be transmitted from
I'am developing an application for android, which needs network in order to retrieve some
I'm currently developing an application for Android which needs to use a custom made
I am developing an Android application which rely on .NET web service for dynamic
I am developing an android application which needs to handle mapview. What I basically
We've been developing an Android application which includes Google Adsense. However there seems to
I'm developing an Android application which involves reading pdf files. Initially on syncing with
I am developing an Android application which makes use of the Osmdroid maps api.
I am developing android application in which i have to open option menu from

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.