hi,
i don't know if this is related to openssl, but every time
i run the following code on redhat 6.1 it will receive a SEGV.
it doesnt happen with older versions of glibc (tested 2.0.7),
and it'll run just fine on aix and solaris:
#define BUFFER 512
[...]
unsigned char buf[BUFFER];
int rlen = 0;
#if defined(WITH_BLOWFISH)
BF_KEY ks;
unsigned char ivec[8], passphrase[BUFFER], outdata[BUFFER], md[MD5_DIGEST_LENGTH];
int num;
[...] memset some vars to 0 [...]
[...] get MD5 of entered passphrase [...]
MD5(passphrase, (unsigned long) strlen(passphrase), md);
BF_set_key(&ks, MD5_DIGEST_LENGTH, md);
[...]
while((rlen = read(STDIN_FILENO, buf, BUFFER)) > 0)
{
#if defined(WITH_BLOWFISH)
BF_cfb64_encrypt(buf, outdata, (unsigned long) rlen,
&ks, ivec, &num, BF_ENCRYPT);
wlen = write(mysock, outdata, rlen);
#else
wlen = write(mysock, buf, rlen);
#endif
if(wlen < 0)
[...]
it will crash merrily in BF_cfb64_encrypt,
Program received signal SIGSEGV, Segmentation fault.
0x804a010 in BF_cfb64_encrypt ()
(gdb) backtrace
#0 0x804a010 in BF_cfb64_encrypt ()
#1 0x4010648c in __DTOR_END__ () from /lib/libc.so.6
(gdb) x/c 0x804a010
0x804a010 <BF_cfb64_encrypt+240>: 50 '2'
has anyone else experienced similar problems on redhat?
is there a remedy, or is it a stupid mistake i made?
TIA,
--
Toni Andjelkovic - iT AUSTRIA, [EMAIL PROTECTED]
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]