Geoff Thorpe <[EMAIL PROTECTED]>:
> "Rubinstein, Dmitry" <[EMAIL PROTECTED]>:

>> I'm working on incorporating OpenSSL into an application that does not
>> provide the SSL code with the bare client-bound socket (the code of SSL is

[...]
> /* Create the BIOs to represent the encrypted connection. */
> dirty_in = BIO_new(BIO_s_mem());
> dirty_out = BIO_new(BIO_s_mem());

Or use a BIO pair, which uses ring-buffer data structures to avoid
the overhead of dynamic memory allocation and moving around data.
(When the write buffer is full, you get SSL_ERROR_WANT_WRITE as
with non-blocking sockets; the applications doesn't use up all
memory.)

Both models are used by ssltest.c, where the server and the client are
implemented inside a single program and have to talk to each other
through memory.

(ssltest.c uses BIO_f_ssl to create a BIO for SSL operations, it does
not use SSL_write/read directly.  Don't be confused by this: This is a
BIO at a higher level; the use of BIO_f_ssl() is unrelated to whether
you have socket I/O, a memory BIO, a BIO pair or anything else below
the SSL library.)
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to