views:

167

answers:

1

Hi there, and thanks in advance for your help or any tip that could get me out of here.

I work on a JEE app with a JBoss server and an Apache. I'm not really familiar with SSL connections and certificates, I understand the basic, but I have to deal with it. So on my local configuration (localhost) I have my connection certificate configured on JBoss and Apache, and a USER_DEV.P12 file, which I import in my certificates in Firefox. I have the same configuration on a distant test server (test-server), and a USER_TEST.P12 which I also import in Firefox.

When I access https://localhost/ or https://test-server/ Firefox asks me to add an exception, which is normal. After that, I select the appropriated user certificate, and can use my application normally. But for the second (let's say https://test-server/), Firefox rises me a sec_error_reused_issuer_and_serial error. Of course I googled it and founded the Mozilla help, So when I delete the "server" in my certificate manager, I can access again my second domain, but the same problem occurs for the first one.

To shorten the problem, my 2 client/server certificate couples are OK but I can't have 2 certificate exceptions at the same time in Firefox for my 2 different servers/users, even though the names, server address, and MD5 are different. I notified the serial is the same (01), but it's working on my colleague's computer. So am I doing something wrong? Do I have to deal with it manually each time (or with Firefox profiles)?

Thanks for your help. Bastien.

+1  A: 

This is because you use self-signed certs and they use the same serial number. You have a few solutions,

  1. Re-sign the certificates on the same machine using the same tool. Most tools will bump up the serial number for each signing and you will get different serial number.

  2. Make your own CA and sign the 2 certs with the same CA. This way Firefox only needs to import one CA.

ZZ Coder
You're right, my certs are self-signed. The first solution worked. Thanks for your help (Btw, I use OpenSSL to create server key, CA and sign my cert, and keytool to manage my keystore).
Baztoune