srtp: Add support for MKI
@ocrete
Submitted by Olivier Crête Link to original bug (#797305)
Description
Currently, our SRTP elements don't support MKIs. This patch series adds support for them.
It has 2 parts:
- Encoder
I just added an MKI property and then it puts a "mki" element in the caps with the MKI in a buffer. This still only allows for one MKI.
- Decoder
This may be a bit more controversial, as I'm allowing multiple MKIs, instead of having separate CAPS, I'm putting them all in one with "srtp-key=X, mki=X, mki2=Y, srtp-key2=Y, mki3=Z, srtp-key3=Z", up to 15, which is the maximum allowed by libsrtp.
The other thing that could be controversial is that support for MKIs were added in libsrtp 2.1. So I put the whole thing behind ifdeds, included the extra MKI property. If no one yells, I would be tempted to just drop the ifdefs and require libsrtp 2.1 at least for everyone.
I'm also attaching a patch against Cerbero to bump libsrtp to 2.2.