<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-06-05 20:42 GMT+02:00 Lorenzo Miniero <span dir="ltr"><<a href="mailto:lminiero@gmail.com" target="_blank">lminiero@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="gmail-h5">2015-06-05 20:18 GMT+02:00 Matt Caswell <span dir="ltr"><<a href="mailto:matt@openssl.org" target="_blank">matt@openssl.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I see you got it working! Just some comments below<br>
<span><br>
On 05/06/15 12:34, Lorenzo Miniero wrote:<br>
> I've started looking into filters and I have some doubts, though, also<br>
> taking into account what you suggested, and I apologize again if this<br>
> turns out to be silly. As far as I've understood, what I should do is<br>
> changing the current pattern I use for outgoing packets:<br>
><br>
>       application < memBIO < ssl<br>
><br>
> to something like this:<br>
><br>
>       application < memBIO < filter < ssl<br>
><br>
> or this:<br>
><br>
>       application < filter < memBIO < ssl<br>
><br>
> that is, a new BIO filter that enforces the fragmentation I talked<br>
> about. Not exactly sure about which one should be the way to go, but<br>
> I've given this some thought.<br>
<br>
</span>I took a very brief look at your code and I see you went with the first<br>
option. That's fine, although I would have done it slightly differently:<br>
<br>
application <--   -- ssl<br>
              |   |<br>
              |   V<br>
              filter<br>
              ^   V<br>
              memBIO<br>
<br>
i.e. the filter does all the reading and writing to the memBIO. libssl<br>
calls BIO_write(), the filter takes note of the packet sizes, and then<br>
writes to the membBIO. When the application wants to read data it calls<br>
BIO_read on the filter, and the filter figures out how big the packet<br>
needs to be and reads that amount out of the memBIO. Your way works too<br>
though.<br>
<div><div><br>
Matt<br></div></div></blockquote><div><br></div><div><br></div></div></div><div>Ah I didn't know that was an option: I'm quite unfamiliar with how BIO filters worked, and so I just went with what made sense to me while experimenting with them. I'll try doing something along the lines you suggested as soon as I have some time, thanks!</div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div>Lorenzo</div><div> </div></font></span></div></div></div>
</blockquote></div><br></div><div class="gmail_extra"><div class="gmail_extra" style="font-size:12.8px">Apologies for reviving this old thread, but a user of my project made me notice that my code doesn't compile on Openssl 1.1.0 anymore. Apparently the cause is some structures have been made opaque in the new version. In my case, the structure that breaks the code is BIO, as I used some of its previously public properties in my filter. Is there any transition documentation page that can help figuring out how I can adapt it accordingly? Or is the way my filter was written at the time hopelessly broken now, and a different approach to do the same needed?</div><div class="gmail_extra" style="font-size:12.8px"><br></div><div class="gmail_extra" style="font-size:12.8px">Thanks!</div></div></div>