Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Merging certificat with private key

Posted on 2011-02-18
5
1,659 Views
Last Modified: 2013-12-04
Hello,
I'll try to explain my problem clearly :)
i need a certificat with a private key inside.
All my certificate are issued by verisign,

I've got a private key in  a file "myprivatekey.pem"
I've got my certificate chain like that :

Verisign1 -> Verisign2 -> Mycert

theses certificat doesn't have any privatekey
I want to merge "Mycert.cer" and "myprivatekey.pem" to have a certificate with the private key.

I searched lot of stuff on internet and i tried many ways with openssl
like that :

verify my key:
openssl rsa -noout -text -in c:\ssl\myprivatekey.pem
--> OK !

i convert my cer files in pem files --> OK !

and when i tried to merge :

C:\OpenSSL-Win32\bin>openssl pkcs12 -export -inkey c:\ssl\myprivatekey.pem -i
n c:\ssl\mycert.pem -out pkcs12.p12 -name test
Loading 'screen' into random state - done
No certificate matches private key

i just can't understand ...

plz advice.


Bye
Mat
0
Comment
Question by:Mathias75000
  • 3
5 Comments
 
LVL 10

Accepted Solution

by:
abbright earned 250 total points
ID: 34928175
Does your private key belong to the public key which is part of Mycert? If not (which seems to be the case according to the error message of openssl you posted) then I guess what you want to have is not possible as the certificate Mycert is a combination of a public key which has been signed by Verisign and the cooresponding private key. Without the corresponding public key belonging to your private key you cannot import it / create a new certificate. You would rather have to create a new public / private key pair and have the public key in the corresponding certificate be signed by verisign.
0
 

Author Comment

by:Mathias75000
ID: 34941591
the private key come from the previous public cert "Mycert" finished in 2010 signed by verisign as well.
My new certificat "Mycert" is just the new one for 2011.
so it should be ok ?
0
 
LVL 18

Assisted Solution

by:decoleur
decoleur earned 250 total points
ID: 34947832
you don't need to include your private key with the cert.

If you encrypt a message with your verisign signed private key the recipient will upon initial communication go to verisign and pull down the public key and validate that you are who you said you were.

you do not distribute your private key.

hope this helps,

-t
0
 

Author Comment

by:Mathias75000
ID: 34949586
yep but i need a certificat with the private key to sign my rdp file, that's why...
but i think i'll just ask for a another pair, it'll be easier ;)
thanks for the help !
0
 

Author Closing Comment

by:Mathias75000
ID: 34949711
partially.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

838 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question