Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removal of AGPL code #1140

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Terricide
Copy link

Some of the files reference AGPL 3 code, this pull request attempts to remove and rewrite them under an MIT license.

Mark Reed added 3 commits July 5, 2024 12:47
- Added `System` namespace in `SrtcpCryptoContext.cs` for system functionalities.
- Implemented `RotateKeys` method in `SrtcpCryptoContext.cs` to generate and update master keys and salts, re-derive session keys, reset counters, and securely erase temporary keys.
- Added `GenerateNewKey` method in `SrtcpCryptoContext.cs` for key generation using a cryptographic random number generator.
- Replaced `_isLocked` with `_lockObject` in `SrtcpPacketTransformer.cs` for improved thread safety.
- Introduced `Microsoft.Extensions.Logging` in `SrtcpPacketTransformer.cs` for enhanced logging capabilities.
- Implemented disposal pattern in `SrtcpPacketTransformer.cs` to manage resources and prevent memory leaks.
- Added context rotation functionality in `SrtcpPacketTransformer.cs` with interval and enablement fields to enhance security.
- Updated packet encoding and decoding methods in `SrtcpPacketTransformer.cs` for new thread safety, disposal, and context rotation features.
- Added `Wrap` method to `RTPPacket.cs` for performance improvement by avoiding data copying.
- Introduced a shared `RTPPacket` instance `_sharedPacket` in `SrtcpPacketTransformer` for reusing in packet wrapping and transformations, aiming to reduce object allocations and improve performance.
- Ensured the disposal of `_sharedPacket` before closing contexts to release held resources properly.
- Modified encoding/decoding processes to utilize the shared `_sharedPacket`, enhancing efficiency by avoiding repetitive RTPPacket instance creations.
@ris-work
Copy link

ris-work commented Sep 4, 2024

Thanks for this! BTW did you upgrade the target dotnet version? (is this why the AppVeyor builds fail?). The AGPL dependency basically caught me by surprise. I never thought there would be AGPL'd code here.
@sipsorcery, thanks for maintaining this quite big project; what's your view on this PR?

@ris-work
Copy link

ris-work commented Oct 2, 2024

@Terricide: Are these contributions/changes in the PR commits under the MIT license? I would love to merge it to my own private repository and see how it works. Thank you very much.

@Terricide
Copy link
Author

Yes it is licensed under the MIT license. That's why I rewrote it was to make sipsocery not have the AGPL code.

@ris-work
Copy link

ris-work commented Oct 9, 2024

Yes it is licensed under the MIT license. That's why I rewrote it was to make sipsocery not have the AGPL code.

Thank you very much for this, it merged well on the existing modifications (I only do .net 9).

@lostmsu
Copy link
Contributor

lostmsu commented Oct 19, 2024

@Terricide this does not look like a clean room implementation :(

@lostmsu
Copy link
Contributor

lostmsu commented Oct 19, 2024

@Terricide I also noticed, that some of the affected files actually link to source that is explicitly non-AGPL. I checked, and the only 2 files that are actually AGPL are DtlsSrtpServer and SrtpParameters

@lostmsu
Copy link
Contributor

lostmsu commented Oct 19, 2024

@sipsorcery this seems to be a major issue, which also affects all the previous versions of SIPSorcery

@sipsorcery
Copy link
Member

@sipsorcery this seems to be a major issue, which also affects all the previous versions of SIPSorcery

Do you mean for applications that want to use the library? Yes, if the AGPL terms don't suit your app it's potentially a major blocker.

As your yourself point about above this PR could not be considered a different enough implementation to remove the AGPL clause so doesn't fix hat particular problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants