cisco / libsrtp

Library for SRTP (Secure Realtime Transport Protocol)
Other
1.2k stars 472 forks source link

eaud_crypto.c:156:17: error: ‘srtp_policy_t’ {aka ‘struct srtp_policy_t’} has no member named ‘ekt #536

Closed zizomizo84gh closed 3 years ago

zizomizo84gh commented 3 years ago

Hi everyone,

I am trying to install and compile the source of rtpproxy and encountered the error following error after "make clean all":

eaud_crypto.c:156:17: error: ‘srtp_policy_t’ {aka ‘struct srtp_policy_t’} has no member named ‘ekt’

may someone advise please and help with this error ?

I copied the directory of libsrtp into the /usr/local/src/rtpproxy where the sorurce is and installed it again. Still getting the same error. my machine has:

Linux T450 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Thanks in advance and best regards Abdul

paulej commented 3 years ago

rtpproxy should not be referencing that field. It was, indeed, removed and had no function previously.

zizomizo84gh commented 3 years ago

hi @paulej,

I am not sure if I got your point. should I simply delete "rval->policy.ekt = NULL;" from eaud_crypto.c at line 156 ?

Kind regards Abdul

paulej commented 3 years ago

The policy structure should be initialized to all zeros before doing anything with it. You should not need to then set ekt to NULL since it would already be null. You'll see this example does that: https://github.com/cisco/libsrtp/blob/master/test/srtp_driver.c#L603. That said, even though it is 0, there is a reference to deprecated_ekt below that which is entirely superfluous. It's best to just not set fields unless you want to set it to something non-zero.

BTW, the reason the EKT stuff was removed is that it was originally added with the intent that EKT would be fully implemented. It took over a decade for the RFC to get produced and it changed a lot over the years. Removing the old references is a tiny bit painful, but keeping it could also cause confusion since it's not the same as the new shiny RFC 8870. The fields were kept there and labeled deprecated just to keep the structure sizes identical (to keep binary-level compatibility).

zizomizo84gh commented 3 years ago

@paulej Thanks for all the details. Highly appreciated

Kind regards Abdul