Re: how can i export the private key as PKCS#7 ?
- From: "wuhao" <wuhao@xxxxxxxxxxx>
- Date: Wed, 26 Apr 2006 09:49:41 +0800
hi Mitch
i have tried CryptExportPKCS8() using szOID_RSA_RSA
it export
///////////////////////////////////////////////////////////
30 82 03 85 30 82 02 EE-A0 03 02 01 02 02 01 0C 0...0...........
30 0D 06 09 2A 86 48 86-F7 0D 01 01 04 05 00 30 0...*.H........0
81 87 31 0B 30 09 06 03-55 04 06 13 02 43 4E 31 ..1.0...U....CN1
0B 30 09 06 03 55 04 08-13 02 42 4A 31 10 30 0E .0...U....BJ1.0.
06 03 55 04 07 13 07 42-65 69 6A 69 6E 67 31 0F ..U....Beijing1.
30 0D 06 03 55 04 0A 13-06 43 45 2E 6C 74 64 31 0...U....CE.ltd1
13 30 11 06 03 55 04 0B-13 0A 4D 61 69 6C 45 78 .0...U....MailEx
70 65 72 74 31 11 30 0F-06 03 55 04 03 13 08 77 pert1.0...U....w
75 68 61 6F 2D 43 41 31-20 30 1E 06 09 2A 86 48 uhao-CA1 0...*.H
86 F7 0D 01 09 01 16 11-77 75 68 61 6F 40 6D 79 ........wuhao@my
63 65 2E 6E 65 74 2E 63-6E 30 1E 17 0D 30 36 30 ce.net.cn0...060
34 32 34 30 37 30 32 30-33 5A 17 0D 31 36 30 34 424070203Z..1604
32 31 30 37 30 32 30 33-5A 30 6A 31 0B 30 09 06 21070203Z0j1.0..
03 55 04 06 13 02 43 4E-31 0B 30 09 06 03 55 04 .U....CN1.0...U.
08 13 02 42 4A 31 0F 30-0D 06 03 55 04 0A 13 06 ...BJ1.0...U....
43 45 2E 6C 74 64 31 0B-30 09 06 03 55 04 0B 13 CE.ltd1.0...U...
.... ...
/////////////////////////////////////////////////////////////////////////
but i expected it can export as followed,
(so it can be read by the function PEM_read_PrivateKey() in openssl)
////////////////////////////////////////////////////////////////////////
// test.key
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDXQ+U/CaT/zVIEEY+eXJ6bdfOjBELVSdYXdRWfOomVCdMS0ENh
/ExSnI+2vDWlnyB1YkpTaPgvw0vbikfdXJMi0Zma0ZPG85qgEnm8MrYNb99WzUr2
Ii8HtnvFSGFXTPYRz1AjPz1c/ABWevQExU0uN8y06mMUnT4fWTqPONAfKQIDAQAB
AoGAbEV/EaTFM9BOlzNJ/EnzkJfUEkM7ZlH799JxLKRhvO+zFXxg1/DxZn/OnQev
J/2QctocLjXW1xcwmVzE5qcAbY7iumTiD9pZ5s/vvWTW2LeFCAj3wcE6czOUPQcm
905h3ARXIa3+0zw2c8szW3pcCrVqPUDcC3BF07t9DkFh7v0CQQD/qx4LJvt2WGQR
IaqblAU+fR0qR/C0mKmC5025XrM8o/8bc1PU1kih73NdomvDkLQ0GQh9YntPnowV
MP3iLXD3AkEA14tdOUTswcBhgIsvDxTRNmkSGT9QIc9mdPIB15Afm2nXsVxTHYM1
CjEx4gOkaO46Fi2hS8KlFwg12bf2LCUI3wJALIEM6cQPYbphMNo7aHmLsCT3PrTn
IYixeSfqT6o8aQHjFlQs84+ZdRbJbjMnrxMxSyBQagMKlAF1QPsWNpjSYQJBANGL
okDH2ifugJu4NDLEOTRdZ4P2AlAsUl4E3HeVnLS5bED4EbGSWiEjfGxOwCpm1z+y
cqm1fEvs5nVYG9IE2x8CQQC98iG4d0Y7fQker1U6MRpruWkYNrit/dQToOQmCyAk
S8q1azASHU7bvqigTZVX3b1SYV72IqMpTbEOKfeUrGRj
-----END RSA PRIVATE KEY-----
////////////////////////////////////////////////////////////
can i export the key in this format ?
thank you .
.
- Follow-Ups:
- Re: how can i export the private key as PKCS#7 ?
- From: Mitch Gallant
- Re: how can i export the private key as PKCS#7 ?
- References:
- how can i export the private key as PKCS#7 ?
- From: wuhao
- Re: how can i export the private key as PKCS#7 ?
- From: Mitch Gallant
- how can i export the private key as PKCS#7 ?
- Prev by Date: Re: Importing a Symmetric Key into the Microsoft Base Smart Card C
- Next by Date: Re: how can i export the private key as PKCS#7 ?
- Previous by thread: Re: how can i export the private key as PKCS#7 ?
- Next by thread: Re: how can i export the private key as PKCS#7 ?
- Index(es):