how to put array into bio ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

how to put array into bio ?

vichy
Dear all:
I try to use d2i_PrivateKey_bio to get the RSA keys in a der file, but
the binary content is written in an unsigned char array.
I know I can write the unsigned char array as a file and then read it in.
But I want to know is there function I can use to transfer array as Bio file?
appreciate your help,
vichy
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: how to put array into bio ?

Goetz Babin-Ebell
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

vichy wrote:
| Dear all:
| I try to use d2i_PrivateKey_bio to get the RSA keys in a der file, but
| the binary content is written in an unsigned char array.
| I know I can write the unsigned char array as a file and then read it in.
| But I want to know is there function I can use to transfer array as
Bio file?
| appreciate your help,

d2i_PrivateKey()
If you insist on using BIO, use BIO_new_mem_buf()


Goetz
- --
DMCA: The greed of the few outweighs the freedom of the many
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKfpMt2iGqZUF3qPYRAiWlAJ9bPEByJOieUcefGNUtwT9HGOe38ACeI6KP
bvX7qAW+quOdXMMHKWxFacQ=
=qg43
-----END PGP SIGNATURE-----
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: how to put array into bio ?

vichy
Hi:

2009/8/9, Goetz Babin-Ebell <[hidden email]>:

> -----BEGIN PGP SIGNED MESSAGE-----
>  Hash: SHA1
>
>
>  vichy wrote:
>  | Dear all:
>  | I try to use d2i_PrivateKey_bio to get the RSA keys in a der file, but
>  | the binary content is written in an unsigned char array.
>  | I know I can write the unsigned char array as a file and then read it in.
>  | But I want to know is there function I can use to transfer array as
>  Bio file?
>  | appreciate your help,
>
>  d2i_PrivateKey()
>  If you insist on using BIO, use BIO_new_mem_buf()
is there any function I can use without BIO, since I saw one of the
input parameters of d2i_PrivateKey is BIO.
so I think I must use BIO.
appreciate your help,
vichy
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: how to put array into bio ?

Goetz Babin-Ebell
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

vichy wrote:
| Hi:
|
| 2009/8/9, Goetz Babin-Ebell <[hidden email]>:
|>  vichy wrote:
|>  | Dear all:
|>  | I try to use d2i_PrivateKey_bio to get the RSA keys in a der file, but
|>  | the binary content is written in an unsigned char array.
|>  | I know I can write the unsigned char array as a file and then read
it in.
|>  | But I want to know is there function I can use to transfer array as
|>  Bio file?
|>  | appreciate your help,
|>
|>  d2i_PrivateKey()
|>  If you insist on using BIO, use BIO_new_mem_buf()
| is there any function I can use without BIO, since I saw one of the
| input parameters of d2i_PrivateKey is BIO.
| so I think I must use BIO.

the interfawce for d2i_PrivateKey is:
EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a,
~                         const unsigned char **pp, long length);

Please where is there a BIO ?


Goetz

- --
DMCA: The greed of the few outweighs the freedom of the many
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFKfwJt2iGqZUF3qPYRAredAJYjWzOmFIdHwM6VXL4GdmKuQPCTAJ9E11EV
lhY5qaM77ZfF5gKYD9LhRg==
=FGzn
-----END PGP SIGNATURE-----
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]