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

The Archive Base Latest Questions

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

Current situation: We do a POST to a certain url using HTTPS/SSL. For this

  • 0

Current situation:

We do a POST to a certain url using HTTPS/SSL. For this to work my (former) colleague posted this question: Java HTTPS client certificate authentication

So basicly we have a keystore in .p12 format and the truststore is a .jks file.

We have no control over the server that receives our POST request.

Issue:

The server admins have provided us with some new .der files because their old certificate was about to expire.

As I’m fairly new to SSL certificates and keytool– and openssl-commands I have no idea how to proceed from here.

1) Is it necessary to generate new .p12 and .jks files? Or do I only need to generate a new .jks file?

2) How do I generate these files from a .der certificate? I have found some websites with the most keytool/openssl commands but I haven’t been able to successfully generate what I need.

The last command I tried (to no avail) was:

keytool -storepass dsmserver -keystore c:\temp\newkeystore.jks -importcert -alias "c:\temp\newcert.der" -trustcacerts
  • 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-01T19:25:27+00:00Added an answer on June 1, 2026 at 7:25 pm

    Wait, which certificate expired? If it was theirs, there shouldn’t have been any need to send you a new file (after all, you don’t have to update your browser when, say, stackoverflow.com’s SSL certificate expires and they install a new one). If you’re doing mutual authentication (client certificate authentication), then there are four certificates involved: your certificate, their certificate, the certificate of the authority that signed your certificate, and the certificate of the authority that signed their certificate. They send you their certificate and you check to see that it was properly signed by a certificate authority that you trust (that’s what the truststore is for – it’s a list of the certificate authorities that you trust to sign certificates from their side). Subsequently, you send your certificate and they check to see that it was properly signed by a certificate authority that they trust. (Of course, all of this is automatically done for you behind the scenes in JSSE by the SSL handshake procedure)

    Remember, a certificate is a (signed) assertion that such-and-such name is identified by a particular public key. So if their certificate expired, they’ll generate a new one, get it signed by a CA that you already trust, and replace the old one with this one. When your software (automatically, as part of the behind-the-scenes SSL handshake) gets the new one, it will check to see who the signer (“issuer”) was and if it’s in your list of trusted authorities (and properly signed). If this checks out, you’ll accept it automatically. They don’t need to send you anything out-of-band to make this happen, unless they’re changing certificate authorities and you don’t already trust the new one. If so, you can use

    keytool -import -keystore <truststore> -file <certificate file> -alias <someca>
    

    If, on the other hand, your certificate is the one that expired, then they shouldn’t be sending you anything unrequested. Instead, you should be generating a CSR via:

    keytool -genkey -alias <myalias> -keystore <keystore>.p12 -storetype pkcs12
    keytool -certreq -alias <myalias> -file request.csr -keystore <keystore>.p12 -storetype pkcs12
    

    This will update the keystore with a new private key and create a file named “request.csr” which you should then send to them (or to a CA that’s in their truststore) for a signature. They will respond with a signed certificate which you will then import back into your keystore using:

    keytool -import -alias <myalias> -file <signed certificate>.cer
    

    If I had to guess, it looks like they tried to perform these three steps for you, and tried to send you the certificate and the corresponding private key, which is invalid – Java will (rightly!) try its best to stop you from importing that because the private key itself was tainted when they sent it over an untrusted channel (e-mail, I presume?) This defeats the purpose of PKI – nobody should ever have access to your private key except for you.

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

Sidebar

Related Questions

This post from SqlBatman describes a situation similar to my current client and, in
I am using Asp.Net/C# in my application.My current situation is that I am using
As far as I know, the current situation is this: Use SQL session state
in the current situation, when we post data from a webpage via the Jquery
I'm using a Java program to POST some XML data from a remote client
This is my current situation: Im trying to execute a website that access to
So the situation is this: attempting to add a dropdown box using the jquery.multiselect
Current situation: Ubuntu 8.04 server edition (live server) Postgresql 8.3.7 (from standard repositories) Postgis
Current situation date (nvarchar(9)) sku (nvarchar(5)) smith (decimal) jones (decimal) jonson (decimal) nguyen (decimal)
My current situation is: I have to read a file and put the contents

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.