[Help-gnutls] BIO_s_mem Replacement in GnuTLS
mrsam at courier-mta.com
Sat May 16 01:43:54 CEST 2009
Carolin Latze writes:
> 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? ;-))
gnutls_transport_set_push_function() install a "pull" and a "push" function
for a gnutls_session_t. Basically you'd instantiate a gnutls_session_t, and
attach a pull and a push function that reads and writes from a memory
It's a little bit more work, but it's a far more generic abstraction that
can be used to encapsulate any kind of a source/sink encryption channel.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the Gnutls-help