help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using a Callback to Select the Certificate to Use (error)


From: Pedro Pereira
Subject: Using a Callback to Select the Certificate to Use (error)
Date: Mon, 15 Nov 2010 21:12:14 +0200
User-agent: Internet Messaging Program (IMP) H3 (4.3.5)

Hi,

I am trying to use a callback to select the certificates, but it seems that I am having problems compiling the gnutls example that uses callback to select the certificates.

$ gcc -o client ex-cert-select.c tcp.c `pkg-config gnutls --cflags --libs`
or
$ gcc -o client ex-cert-select.c tcp.c -lgnutls

output:
/tmp/ccpq7pJM.o: In function `cert_callback':
ex-cert-select.c:(.text+0x667): undefined reference to `gnutls_sign_algorithm_get_requested'
collect2: ld returned 1 exit status

gnutls_sign_algorithm_get_requested seems to be part of the gnutls.h, so it should be reachable with the #define and with the gnutls lib.

Then I tried to use the gnutls-extra lib instead, and it compiles!? Strange...but even like that I have problems running the binary:

$ gcc ex-cert-select.c tcp.c -o client -lgnutls-extra
$ ./client
- Server's trusted authorities:
   [0]: CN=GnuTLS test CA
[1]: O=Root CA,OU=http://www.cacert.org,CN=CA Cert Signing Authority,address@hidden [2]: C=ZA,ST=Western Cape,L=Cape Town,O=Thawte Consulting,OU=Certification Services Division,CN=Thawte Personal Freemail CA,address@hidden ./client: relocation error: ./client: symbol gnutls_sign_algorithm_get_requested, version GNUTLS_2_10 not defined in file libgnutls.so.26 with link time reference

...and the program aborts.
What's happening here? Can someone help me to understand how to make this work normally?

Regards,
Pedro




reply via email to

[Prev in Thread] Current Thread [Next in Thread]