>From: owner-openssl-us...@openssl.org On Behalf Of Aleix Ventayol
>Sent: Tuesday, 18 June, 2013 17:33

>I've tried it using the following code: 
>    EVP_PKEY * pp = EVP_PKEY_new();
>    EVP_PKEY_set1_DH(pp, dh);            
>    char *buff;
>    BUF_MEM *bptr;
>    int write_rc = 0;
>    BIO *bmem = BIO_new(BIO_s_mem());
>    write_rc = PEM_write_bio_PUBKEY(bmem, pp);

>But I'm not getting anything in pp and write_rc is 0.

Works for me, using file-BIO instead (easier to test).
Are you sure dh contains a valid key? What's in the error 
queue? Easiest way is ERR_print_errors_fp(stderr) .

<snip>

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to