You have the public key there.  It is in PEM-encoded DER format.

You did not use the public key to generate the CSR.  You included the
public key in the CSR, but you used that public key's private key to
generate the CSR.

If you have lost that *private* key, your public key is worthless.
Note that the signed certificate you have also contains the public
key.  If you have lost the private key, that certificate cannot be
used to authenticate, because the private key that belongs to that
public key must be used in a mathematical equation that's very
difficult to solve without its companion key during the process of
authentication.

-Kyle H

On Wed, Feb 10, 2010 at 10:32 AM, newbie230 <ian_sta...@polk.com> wrote:
>
> Hi,
>
> I have lost my public key, I used this public key to generate a certificate
> request which has been signed. I need to try and recover my key to a .p12
> file and reimport it into my program to match the signed cert.
>
> All I have to work with is my key is the format -----BEGIN PUBLIC
> KEY-----MIGfMA0...-----END PUBLIC KEY-----.
>
> What I've attempted, and I maybe way off, is to save the  "-----BEGIN PUBLIC
> KEY-----MIGfMA0...-----END PUBLIC KEY----" text as a .pem file and try to
> export to a .p12 file using the command below which generates the errors as
> below:
>
> C:\OpenSSL\bin>openssl pkcs12 -in TOIpubkeyIS.pem -out TOIaaa.p12 -nodes
> 2444:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong
> tag:.\crypto\asn1\tasn_dec.c:1316:
> 2444:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1
> error:.\crypto\asn1\tasn_dec.c:380:Type=PKCS12
>
> Is what I'm trying to achieve even possible? and if so how might I
> accomplish it?
>
> Thanks in advance.
>
> --
> View this message in context: 
> http://old.nabble.com/New-to-Openssl---recover-public-key-tp27535877p27535877.html
> Sent from the OpenSSL - User mailing list archive at Nabble.com.
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    openssl-us...@openssl.org
> Automated List Manager                           majord...@openssl.org
>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to