update policy config api#790
Conversation
|
The implementation is currently just a new front end to the existing srtp_policy_t API, the intention would be to eventually remove the old structure and functions from the public API. |
Includes a minima implementation and unit tests.
Fully replace old policy struct with new policy API. Update SRTP core policy validation/stream init to consume the new policy layout, including MKI/key handling and null-null policy behavior. Only validate policy once where it is passed in. Remove policy lists, multiple policies now need to be add via srtp_add_stream API. Migrate tests, fuzzer, and docs to the new API and expand policy API test coverage.
|
@paulej , I have update with the major changes still some small things to sort out but progress can be reviewed, feedback appreciated. |
Use add and remove in the same way as the keys api.
The new policy api replaces the need for public srtp_crypto_policy_t. If for some reason there is a need to explicitly set key lengths etc it can be add to the policy api later.
It is a little unclear is a key should be provided or not. Keep current behavior for now.
Add explicit policy tests for srtp_profile_null_sha1_80 and srtp_profile_null_sha1_32. The tests verify that both profiles require a 16-byte master key and 14-byte salt.
paulej
left a comment
There was a problem hiding this comment.
This thing is really long. My eyes glazed over. :) I didn't see anything that screamed of trouble.
|
All major planned changes are completed to support the new config/policy API, the API can be polished later once the main part has been accepted. |
|
This change changes the config api completely, there will likely be follow changes as the API is used issues discovered. A review before 3.0 release will be done as part of #672 . |
As part of the API changes for 3.0, would like to simplify the policy API as well as making it easier to extend in the future. The current API has far to many details and can be cumbersome to set up and validate.
Main changes:
Either a single policy can be used with srtp_create() or else multiple policies can be used with multiple calls to srtp_add_stream() .
A minimal example would be
It could be nice to remove the set_ssrc() function if a suitable default behavior could be found.