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]

Reply via email to