On Mon, Jun 26, 2006, Jason K. Resch wrote:

> 
> I wanted to thank you for your suggestions, it is working now.  I had to
> change the code: 
> 
> int res = i2d_PKCS8PrivateKey_fp (fp, clave, EVP_des_ede3_cbc(), NULL,
> 0, NULL, pwd);
> 
> TO
> 
> int pbe_nid = OBJ_txt2nid("PBE-SHA1-3DES");
> int res = i2d_PKCS8PrivateKey_nid_fp (fp, clave, pbe_nid, NULL, 0, NULL,
> pwd);
> 

You can also use the NID directly:

int res = i2d_PKCS8PrivateKey_nid_fp (fp, clave,
                        NID_pbe_WithSHA1And3_Key_TripleDES_CBC, NULL, 0, NULL, 
pwd);

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to