On Mon, Jul 19, 2004, Joe smith wrote:

> Hi,
> I tried modifying the code and now I get a segmentation fault on this line:
> 
> err = EVP_CipherUpdate (&ctx, enc_buff, &bytes_enc, message, strlen(message));
> 

[code snipped]

Hard to say since the call to EVP_CipherUpdate() isn't included. If enc_buff
is NULL then that would cause that problem. enc_buff should be at least one
block size larger than the plaintext length.

Oh and BTW setting 'salt' to a constant string isn't a good idea. If you keep
it as NULL and the length as -1 a random salt will be used.

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