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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:14:35+00:00 2026-05-25T10:14:35+00:00

This is a cross-post from the Mozilla Crypto Dev ML. Hoping that someone on

  • 0

This is a cross-post from the Mozilla Crypto Dev ML. Hoping that someone on SO has some experience using org.mozilla.jss. Link: JSS – MDN

I’m trying to make two separate HTTPS requests to a remote host using two client sockets and two different client certificates respectively (client cert A and B). My test program is a modified version of SSLTest.java

From my host, I’m able to make two connections on two different sockets to the remote host. I’m able to receive a 200 OK back from the remote web server for both individual connections.

My problem is that client certificate ‘A’ is being used for both connections ‘A’ and ‘B’.

I’ve been using this constructor:

public SSLSocket(java.lang.String host,int port, 
java.net.InetAddress localAddr, 
int localPort, 
SSLCertificateApprovalCallback certApprovalCallback, 
SSLClientCertificateSelectionCallback clientCertSelectionCallback)

I’ve also implemented the interface SSLClientCertificateSelectionCallback (source) in order to use the above constructor and pass the correct client certificate. Also, I placed a line in my implemented SSLClientCertificateSelectionCallback select() function to log when the call back is executed.

Running my app, and checking the log, the select() method is only ever called once during the creation of the first SSLSocket (selecting Client Cert ‘A’) and never on future SSLSocket instantiations when Client Cert B nickname is specified. In fact, I have to restart my app for select() to be run again.

Is there a way I can trigger the native callback code to run select() when a certificate is requested by the remote server?

Thanks,

PR

  • 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-25T10:14:36+00:00Added an answer on May 25, 2026 at 10:14 am

    It sounds like there might be some session caching going on. You said that you use SSLSocket. Have you tried setting the session caching to false? By default, SSLSocket enables session caching.

    For instance in the SSLSocket class, there’s the method public void useCache(boolean b) If you set pass it a parameter of false after you create the socket, hopefully that’ll prevent the server from caching your first session (I assume you are calling both client connections from one program). That way, it should prompt you for another certificate request from the second connection like you want.

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

Sidebar

Related Questions

This is a cross post from Perl Monks and Mahalo answers, where I have
I created a cursor from the one that was described on this post: SQL
I have set a property across threads before and I found this post Cross-thread
There is an interesting post over here about this, in relation to cross-application flow
I just came a cross this nice code that makes this scatter matrix plot:
Note: I am cross-posting this from App Engine group because I got no answers
How to make this css code cross browser compatible using jquery. this code only
im trying to POST (cross domain) some data to a jersey web service and
the issue i mentioned in this post is actually happening because of cross threading
I noticed a blog post from Google that mentions the ability to paste images

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.