Conversation
Includes a minima implementation and unit tests.
Member
Author
|
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. |
paulej
reviewed
Feb 9, 2026
| return srtp_err_status_bad_param; | ||
| } | ||
|
|
||
| p = (srtp_policy2_t)srtp_crypto_alloc(sizeof(*p)); |
Contributor
There was a problem hiding this comment.
p is a pointer and not yet assigned, right? If so, *p is an invalid pointer dereference.
Member
Author
There was a problem hiding this comment.
compile time only ... but I get your point
| return srtp_err_status_ok; | ||
| } | ||
|
|
||
| srtp_err_status_t srtp_policy2_set_key(srtp_policy2_t policy, |
Contributor
There was a problem hiding this comment.
I don't fully understand the point of this one
Member
Author
There was a problem hiding this comment.
no, I started with this then did add_key, probably add_key is enough
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.