Well I ran the command 
openssl asn1parse -in ca.key

I got a bunch of numbers, a hex dump, and something that says 'rsaEncryption' 
but I don't see anything that looks like ASN.1, DER or PEM.  You were right 
that I want the output to stay the same as the original.
My key is human readable.  It does have MII at the start but it also has 
----Begin Private Key---- at the beginning.  Any more steps to follow to find 
out what type of key this is?

> Date: Tue, 6 Jan 2015 00:23:35 -0500
> From: noloa...@gmail.com
> To: openssl-users@openssl.org
> Subject: Re: [openssl-users] Need help encrypting my ca.key
> 
> On Tue, Jan 6, 2015 at 12:04 AM, jack seth <bird_...@hotmail.com> wrote:
> > Thanks for the response.  First I am running this on Windows 7.   Questions
> >
> > 1. How can I determine what key format my ca.key is in?
> If its binary, then its simply ASN.1/DER encoded.
> 
> If its ASCII (human readable) and starts with MII (IIRC), then its
> Base64 encoded ASN.1/DER.
> 
> If its ASCII (human readable) and starts with ----- BEGIN XXX -----,
> then its PEM.
> 
> > 2. You say there are multiple key formats for the same key, but for my peace
> > of mind I would like to get the same key format that I originally had.  How
> > can I do this?
> 
> Use -outform to control the output encoding. I think the two values of
> interest are DER and PEM.
> 
> Jeff
> _______________________________________________
> openssl-users mailing list
> openssl-users@openssl.org
> https://mta.opensslfoundation.net/mailman/listinfo/openssl-users
                                          
_______________________________________________
openssl-users mailing list
openssl-users@openssl.org
https://mta.opensslfoundation.net/mailman/listinfo/openssl-users

Reply via email to