|
From: | Sam Varshavchik |
Subject: | Re: [Help-gnutls] BIO_s_mem Replacement in GnuTLS |
Date: | Fri, 15 May 2009 19:43:54 -0400 |
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_pull_function() and 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 buffer.
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.
pgpza1t_z2__P.pgp
Description: PGP signature
[Prev in Thread] | Current Thread | [Next in Thread] |