On Wed January 23 2008 00:37, Md Lazreg 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 /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
>


I seem to recall that memory allocation features where changed in 2.6.9
Might be related. Also note that is a kernel patched by a distribution,
which is to say that the memory api may not be the same as a vanilla-2.6.9
on which any source code conditional tests would have been based.

The answer is probably to either run a generic kernel with the generic openSSL
code or get your openSSL source from the distributor of that patched kernel.

Mike

> 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
>

__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majordomo@openssl.org