On Tue, Feb 24, 2009, Ryan Tolonen wrote:

> 
> 
>     // Get the private key in DER
> 
>     pptr = buf;
> 
>     len = i2d_ECPrivateKey(eckey, &pptr);
> 
>  
> 
>     // Convert the private key back from DER/allocate new eckey
> 
>     newkey = d2i_ECPrivateKey(NULL, &pptr, len);
> 
> 
> Why does the call to d2i_ECPrivateKey(NULL, &pptr, len); always fail?
> (the length returned from the previous call is 222), generating the key,
> allocation and group by name all appears to work.
> 

http://www.openssl.org/support/faq.html#PROG3

Is relevant here.

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to