Hi Stephen, Thank you so much for your help. Using EVP_des_ede3_cbc() worked. I did not know what kind cipher should be used. This will let me move forward. Thanks again, Zhenqiang Fan
-----Original Message----- From: Dr. Stephen Henson [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 27, 2005 3:34 PM To: openssl-users@openssl.org Subject: Re: Using password based encryption. On Tue, Sep 27, 2005, Fan, Zhenqiang wrote: > > Hi, > I am writing PKCS #5 v.2 PBE (password based encryption) program, and cannot > make it work. The problem is that EVP_get_cipherbynid() always returns nil > (see program below). I wonder if there is another way to get an appropriate > EVP_CIPHER object that I can use to call PKCS12_pbe_crypt(). Any help would > be appreciated. Thanks, > Zhenqiang Fan > Well the PBE algorithms aren't treated as actual ciphers which is why EVP_get_cipherbynid() is returning NULL: the NID isn't a cipher. Instead pass a real cipher such as EVP_des_ede3_cbc() as the first argument to PKCS5_pbe2_set(). 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 openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]