Hi,

Thanks for the response, I checked that and the headers match with the
library that im linking.

This is the contents of my make file:

CC = gcc
CP = /bin/cp
RM = rm -f
AUTHN_INCLUDE_DIR =include

OBJS = authn_api.o
DSO  = authn_api.so

GCC_FLAGS= -I$(AUTHN_INCLUDE_DIR) -I/root/openssl/include -c -fPIC -Wall

$(DSO): $(OBJS)
        $(CC) -g -shared $(OBJS) /lib/libssl.so.1.0.0
/lib/libcrypto.so.1.0.0 -o $(DSO) -m32
$(OBJS): authn_api.c
        $(CC) -g  $(GCC_FLAGS) -o $(OBJS) authn_api.c -m32


Another thing, How can I check that the readed X509 structure its
correct?

Regards

-----Mensaje original-----
De: owner-openssl-...@openssl.org [mailto:owner-openssl-...@openssl.org]
En nombre de David Schwartz
Enviado el: lunes, 29 de noviembre de 2010 5:36
Para: openssl-dev@openssl.org
Asunto: Re: segmentation fault printing x509 attributes

On 11/28/2010 1:53 AM, Ignacio Amoeiro Bosch wrote:

> The following code Works in a standalone c program, but crash (with a 
> seg fault) using it as a module. The crash occurs at line :
> X509_get_version(x), or any method that uses x

My guess would be that the OpenSSL headers you are compiling with don't
precisely match the library that you are linking to. Functions like
X509_get_version are macros that extract elements of the X509 structure.

DS

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to