-1

Customer has created key and certificate using openssl command below

openssl req -newkey rsa:1024 -sha1 -keyout OCkey.pem -out OCreq.pem -subj "/C=country/L=city/O=OCserver/OU=myLab/CN=OCserverName/" -config req.conf

openssl ca -in OCreq.pem -cert CAcert.pem -keyfile CAkey.pem -out OCcert.pem -days 3650 -config sign.conf -extfile sign.ext -md sha1 -notext

So they have given me the certificate(OCcert.pem) and private key (OCkey.pem).

How to ensure that OCcert.pem is created through OCkey.pem using Java?
Note :I can't ask customer to change the ssl command.

Please help.

Kanagavelu Sugumar
  • 18,766
  • 20
  • 94
  • 101
  • Here there is a possibility user can give me server certificate with wrong/bad private key generated using the below command. "openssl genrsa -out badkey.pem 1024" – Kanagavelu Sugumar Sep 25 '11 at 11:23

1 Answers1

0

they have given me the certificate(OCcert.pem) and private key (OCkey.pem)

Why? They should throw that private key away immediately, it is compromised. What was the purpose of this exercise?

user207421
  • 305,947
  • 44
  • 307
  • 483