<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 10/11/2016 02:06 PM, Ajay Garg wrote:<br>
    <blockquote
cite="mid:CAHP4M8WU69VGGN-H_p3WaLxPm2C7rjAk9a__dX1_ww+rKQf39A@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=windows-1252">
      <div dir="ltr"><span
          style="font-family:arial,helvetica,sans-serif">Hi All.<br>
          <br>
        </span>
        <div><span style="font-family:arial,helvetica,sans-serif"><br>
          </span></div>
        <div><span style="font-family:arial,helvetica,sans-serif">a)<br>
          </span></div>
        <div><span style="font-family:arial,helvetica,sans-serif">In the
            call,<br>
          </span>
          <pre class="gmail-code"><span style="font-family:arial,helvetica,sans-serif">                      int BIO_new_bio_pair(BIO **bio1, size_t writebuf1, BIO **bio2, size_t writebuf2);

are internal-buffers malloc'ed for each of "bio1" and "bio2"?
</span></pre>
          <pre class="gmail-code"><span style="font-family:arial,helvetica,sans-serif">If yes, is there a way to pass buffers from the application-layer?
I ask this, because not all systems possess dynamic-memory allocation (or at least "malloc" is not available on all systems).

</span></pre>
          <pre class="gmail-code"><span style="font-family:arial,helvetica,sans-serif">b)
Irrespective of the values of "writebuf1" and "writebuf2" in a), I see that everything works perfect.
So, there's got to be some internal-buffer that manages the complete ssl-packet, most probably instantiated via the call

                      BIO* BIO_new(BIO_f_ssl());

</span></pre>
          <pre class="gmail-code"><span style="font-family:arial,helvetica,sans-serif">Here too, is it possible to pass the buffer from application-layer (because of same reasons as above)?</span>
</pre>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    You should be able to produce the desired effect with
    BIO_new_mem_buf() (twice) and attaching the resulting BIOs to each
    other with BIO_make_bio_pair().<br>
    <br>
    -Ben<br>
  </body>
</html>