Using a Callback to Select the Certificate to Use (error)
pedro.pereira at tut.fi
Mon Nov 15 20:12:14 CET 2010
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`
$ gcc -o client ex-cert-select.c tcp.c -lgnutls
/tmp/ccpq7pJM.o: In function `cert_callback':
ex-cert-select.c:(.text+0x667): undefined reference to
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
- Server's trusted authorities:
: CN=GnuTLS test CA
: O=Root CA,OU=http://www.cacert.org,CN=CA Cert Signing
Authority,EMAIL=support at cacert.org
: C=ZA,ST=Western Cape,L=Cape Town,O=Thawte
Consulting,OU=Certification Services Division,CN=Thawte Personal
Freemail CA,EMAIL=personal-freemail at thawte.com
./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?
More information about the Gnutls-help