[Help-gnutls] BIO_s_mem Replacement in GnuTLS

Carolin Latze carolin.latze at unifr.ch
Fri May 15 16:34:29 CEST 2009


Hi all,

I am trying to port an application from OpenSSL to GnuTLS (in oder to 
get TLS 1.2 support). I found the following line in the application:

state->into_ssl = BIO_new(BIO_s_mem());
state->from_ssl = BIO_new(BIO_s_mem());

As BIOs are usually just fds I thought I could easily replace them, but 
those are special. The BIO_s_mem man page says:

 BIO_s_mem() return the memory BIO method function.

       A memory BIO is a source/sink BIO which uses memory for its I/O. 
Data written to a memory BIO is stored in a BUF_MEM
       structure which is extended as appropriate to accommodate the 
stored data.

Is there anything like that in GnuTLS? Or should I rewrite it to use 
normal fds? (Or did I just misunderstand something? ;-))

Cheers
Carolin





More information about the Gnutls-help mailing list