Ahmad Syukri wrote:
> 
> Hi,
> 
> Someone... plz help me! Could you plz tell me how to use PKCS8_encrypt()
> function? I tried to encrypt private key, but don't know how. The only clue
> I know is by using this function. It doesn't work! Part of my code as below.
> Sorry to bother you all, but I don't have much time... HELP! HELP!
> 

READ THE FAQ!

Also, although PKCS8_encrypt() does work there are better ways to do
this using PEM functions, check the latest documentation on
www.openssl.org for the PEM functions specifically:

int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid,
                                       char *kstr, int klen,
                                       pem_password_cb *cb, void *u);

which can peform encryption and output in one call.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.

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

Reply via email to