<div dir="auto"><div>Thanks.</div><div dir="auto">Regarding BIO_dgram_sctp_wait_for_dry() and BIO_dgram_sctp_msg_waiting(), we can use the new control options which are already merged in master :</div><div dir="auto">BIO_CTRL_DGRAM_SCTP_WAIT_FOR_DRY</div><div dir="auto">BIO_CTRL_DGRAM_SCTP_MSG_WAITING.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Tue, 15 Oct, 2019, 3:19 PM Matt Caswell, <<a href="mailto:matt@openssl.org">matt@openssl.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
On 15/10/2019 10:32, Matt Caswell wrote:<br>
> <br>
> <br>
> On 15/10/2019 07:51, Naveen Shivanna wrote:<br>
>> Hi, <br>
>><br>
>> After adding 'enable-sctp' compile option, OpenSSL (DTLS) can work with<br>
>> SCTP as transport.<br>
>><br>
>> OpenSSL bss_dgram.c file includes the kernel /netinet/sctp.h.<br>
>><br>
>> We have our own custom SCTP implementation (also implements  custom BIO<br>
>> METHODS, do not use the default methods), so we need to remove the<br>
>> dependency of kernel sctp.h from bss_gram.c file. Our build environment<br>
>> do not have the sctp.h and we are not supposed to install lksctp-tools.<br>
>><br>
>> Can we tailor the bss_gram.c with new compile macro or is there any<br>
>> other better solution ?<br>
> <br>
> Hmm. There isn't really a "good" way to do this. I can think of two options:<br>
> <br>
> 1) Modify the OpenSSL source (perhaps in the way that you suggest with a<br>
> compile time macro)<br>
> <br>
> or<br>
> <br>
> 2) Provide a "dummy" implementation of netinet/sctp.h. This would have<br>
> to provide "stub" implementations of any SCTP related functions/macros<br>
> used by bss_dgram.c. That would enable you to build unmodified OpenSSL<br>
> source.<br>
<br>
Thinking about this a little more, I think you may encounter other<br>
problems with replacing the standard SCTP BIO with your own one. The<br>
functions BIO_dgram_sctp_wait_for_dry() and BIO_dgram_sctp_msg_waiting()<br>
spring to mind. They get called by libssl in certain scenarios, are<br>
specific to the standard SCTP BIO, and are not replaceable via BIO_METHOD.<br>
<br>
I think you would have to implement your own versions of those<br>
functions, which implies that modifying the OpenSSL source is the only<br>
possibility.<br>
<br>
Matt<br>
</blockquote></div></div></div>