The exported key from IIS is a NETSCAPE_RSA struct.
you can program to get the its strucutre.


Charles Walker wrote:

> Hello there,
>
> I am attempting to convert a key backup generated by Microsoft Key
> Manager to PEM format, according to some hints that I have seen in the
> archive of this mailing list, and am not having a great deal of success.
>
> I have a little C program that searches for the string "private-key" in
> the file, then searches backwards for the first 0x30 0x82 before the
> "private-key" string, then writes from that 0x30 0x82 (inclusive) into
> another file - effectively removing the data before 0x30 0x82 and not
> modifying or removing anything after it.
>
> Then I attempt to run the following command on the output:
>
> openssl rsa -inform NET -in file.out -out file.pem
>
> where file.out is the file generated by my aforementioned little C
> program.  openssl prompts for the password.  I enter the same one (in
> the same case) that I used in IIS.  openssl (which is 0.94 which I have
> built with debug) then gives the following error:
>
> unable to load Private Key
> 775: Error:asn1 encoding routines:d2i_Netscape_RSA:asn1 length
> mismatch:n_pkey.c:216:address=1192744 offset 17
>
> I thought maybe I had a problem with the password, but I have now tried
> this with two different keys (and making the password as simple as
> possible on the second one) but i still have the problem.  Any clues?
>
> Thanks,
> Charles Walker
> --
> =======================================
> Charles Walker, Networking Consultant, Hypertrak
> mail: [EMAIL PROTECTED]
> http://www.hypertrak.com
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to