My own TLS Extension - Hello World :-)
carolin.latze at unifr.ch
Fri Apr 23 16:10:38 CEST 2010
thanks a lot, that did it! In the end, I want to implement a
proof-of-concept of the following draft:
However I decided to start with some simple HelloWorld examples first.
Next step will be to implement a supplemental data handshake message ...
(after the API works since I get segfaults now, but I assume those are a
result of my great programming skills :))
Thanks a lot!
On 04/23/10 15:32, Nikos Mavrogiannopoulos wrote:
> We hide all functions by default unless they are exported (in the gnu
> linker at least). If I remember well it is the libgnutls.map file that
> you need to change. Just from curiosity, which extension are you
> trying to add?
> btw. I plan to augment the extension API to automatically store
> extensions to session resumption db (for the moment this only affect
> you in the sense that you will not see your extension in a resumed
> session, unless you dig deeper in libgnutls).
> On Fri, Apr 23, 2010 at 3:11 PM, Carolin Latze <carolin.latze at unifr.ch> wrote:
>> Hi everybody,
>> I tried to write my own TLS extension and ran into problems when trying
>> to define an API for that extension. But let me explain step-by-step:
>> I use gnutls 2.9.11 and followed
>> to add an extension that sends a fix HelloWorld message from client to
>> server and vice versa and prints it (using printf). In order to do so, I
>> modified and added the following files:
>> That worked pretty well. My very simple client and server application
>> (they do a standard handshake) print out the HelloWorld as expected.
>> Now, I wanted to add an API to be able to specify the HelloWorld message
>> within the client and server application. In order to do so, I added the
>> following line to lib/includes/gnutls/gnutls.h:
>> int gnutls_helloworld_set_msg(gnutls_session_t session, const char *msg);
>> The function itself is defined in lib/gnutls_helloworld.c. Furthermore I
>> added gnutls_helloworld.c to lib/Makefile.am. Running make and make
>> install does not show any problems but when I try to call
>> gnutls_helloworld_set_msg in my client application, I run into linker
>> undefined reference to `gnutls_helloworld_set_msg'
>> However when I run nm with my GnuTLS library, gnutls_helloworld_set_msg
>> is listed.
>> Does anybody have an idea whats going wrong here? I assume I missed on
>> modification that is needed to export API methods, but I have no idea
>> where.... Any help would be appreciated.
>> Help-gnutls mailing list
>> Help-gnutls at gnu.org
PhD Student ICT Engineer
Department of Computer Science Swisscom Strategy and Innovation
Boulevard de Pérolles 90 Ostermundigenstrasse 93
CH-1700 Fribourg CH-3006 Bern
phone: +41 26 300 83 30 +41 79 72 965 27
More information about the Gnutls-help