Hi,

I was able to fix the issue by adding the following flags to my openssl
configure step:

no-asm no-shared -fPIC -DPIC

I do not know why this fixes the SEGSEGV but it does.



On Jan 23, 2008 12:37 AM, Md Lazreg <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I have the following code:
>
>
> -------------------------------------------------------------------------------------------------------------------
> unsigned char SERVER_certificate[1406]={
>
> 0x30,0x82,0x05,0x7A,0x30,0x82,0x03,0x62,0x02,0x01,0x01,0x30,0x0D,0x06,0x09,0x2A,
> :
> :
> 0xb4, 0x78, 0xc6, 0x5a, 0x2d, 0x4c, 0xf9, 0xde, 0x7a
> };
>
>    const unsigned char * p = SERVER_certificate;
>
>    X509 * server_cert = d2i_X509(NULL,&p,sizeof(SERVER_certificate));
>
> -------------------------------------------------------------------------------------------------------------------
>
> It works on all platforms except on a machine as follow:
>
> cat <[EMAIL PROTECTED]> /etc/issue
> Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
> Kernel \r on an \m
> uname -a
> Linux bromden 2.6.9-22.EL #1 SMP Mon Sep 19 17:54:55 EDT 2005 ia64 ia64
> ia64 GNU/Linux
>
> In such a configuration it crashes in the d2i_X509 function with a
> segmentation violation!
>
>
> The same code works on
> uname -a
> Linux unagi 2.6.5-7.97-default #1 SMP Fri Jul 2 14:21:59 UTC 2004 ia64
> ia64 ia64 GNU/Linux
> cat /etc/issue
> Welcome to SUSE LINUX Enterprise Server 9 (ia64) - Kernel \r (\l).
>
>
> Any ideas please why d2i_X509 does not work on redhat 4 ia64?
>
> Thanks
>

Reply via email to