Hello Steve and thank you for the answer.
You were right. I was linking with 0.9.7.
I've just installed the 0.9.8e and unfortunately, the segfault still remain :

Here is the new core dump :
------------------------------------------------
#0 0x400cd204 in EVP_CIPHER_nid () from /usr/local/ssl/lib/libcrypto.so.0.9.8 #1 0x400cd22b in EVP_CIPHER_type () from /usr/local/ssl/lib/libcrypto.so.0.9.8
#2  0x4014b0b0 in __JCR_LIST__ () from /usr/local/ssl/lib/libcrypto.so.0.9.8
#3  0x4006591c in OBJ_obj2nid () from /usr/local/ssl/lib/libcrypto.so.0.9.8
#4 0x40106322 in PKCS7_set_cipher () from /usr/local/ssl/lib/libcrypto.so.0.9.8 #5 0x401062c8 in PKCS7_set_cipher () from /usr/local/ssl/lib/libcrypto.so.0.9.8 #6 0x40108f02 in PKCS7_encrypt () from /usr/local/ssl/lib/libcrypto.so.0.9.8
#7  0xbffff398 in ?? ()
#8  0x4000ab80 in _dl_runtime_resolve () at dl-runtime.c:196
#9  0x0804a410 in main (argc=Cannot access memory at address 0x9
-------------------------------------------

It's very strange, I took a look at the openssl's smime utility to make this soft, and I'm reading a book where the way to do a pkcs7 encryption is the same as mine.

I really don't understand what's going on.


Florian Manach
NUMLOG
[EMAIL PROTECTED]
(+33)0130791616

Dr. Stephen Henson a écrit :
On Fri, Apr 13, 2007, Florian MANACH wrote:

Hi,

I'm trying to create a PKCS7 encryption software and I have some issues doing it.

My call to the PKCS7_encrypt function leads to a segmentation fault.
The core dump shows :
---------------------------------------------------------------------
(gdb) where
#0  0x400b7a0f in EVP_CIPHER_type () from /usr/lib/libcrypto.so.0.9.7
#1  0x00000017 in ?? ()
#2  0x40125a08 in ?? () from /usr/lib/libcrypto.so.0.9.7
#3  0x0809b7f8 in ?? ()
#4  0x400edf1e in PKCS7_set_cipher () from /usr/lib/libcrypto.so.0.9.7
#5  0x00000000 in ?? ()
#6  0x00000000 in ?? ()
#7  0xbffff2d0 in ?? ()
#8 0x4000a9c4 in fixup (l=0x809b7f8, reloc_offset=1074897320) at dl-runtime.c:98

You surely need to know that I'm using OpenSSL 0.9.8d (28 Sep 2006) compiled on Linux Mandrake 10.1.


The debug output suggests it is linked against OpenSSL 0.9.7. Perhaps you are
compiling against the 0.9.8 headers but linking against the 0.9.7 library.

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]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to