Linking to libsrtp even when SRTP is disabled

SK
Sebastian Kemper
Wed, Nov 6, 2019 7:10 PM

Hi once more,

In our config_site.h we define PJMEDIA_HAS_SRTP to 0. While this does
omit the SRTP code in the source files, the build system still links to
libsrtp (or builds it's own copy). There is currently no off-switch for
libsrtp.

I think the optics are a bit off when the code doesn't use libsrtp but
still links to it (or even builds an internal copy). The attached patch
adds an off switch and compounds the statements that set the current
behavior.

I don't like this patch too much because it adds another configure
switch. I'm wondering if maybe it would be better to have one switch
"--with-srtp" that can be on/off/external/internal(default) and leave
"--with-external-srtp" for the time being, but print a warning when used
(and use the facilities from "--with-srtp").

The latter is a bit more involved than just compounding what is
currently there. But if there's interest I sure would try to come up
with a patch. If there's no interest in this I'd rather save me the
effort, hence this mail.

Please let me know what you think. Thanks!

Kind regards,
Seb

Hi once more, In our config_site.h we define PJMEDIA_HAS_SRTP to 0. While this does omit the SRTP code in the source files, the build system still links to libsrtp (or builds it's own copy). There is currently no off-switch for libsrtp. I think the optics are a bit off when the code doesn't use libsrtp but still links to it (or even builds an internal copy). The attached patch adds an off switch and compounds the statements that set the current behavior. I don't like this patch too much because it adds another configure switch. I'm wondering if maybe it would be better to have one switch "--with-srtp" that can be on/off/external/internal(default) and leave "--with-external-srtp" for the time being, but print a warning when used (and use the facilities from "--with-srtp"). The latter is a bit more involved than just compounding what is currently there. But if there's interest I sure would try to come up with a patch. If there's no interest in this I'd rather save me the effort, hence this mail. Please let me know what you think. Thanks! Kind regards, Seb