snmp v3 fixes - #15
Merged
Merged
Conversation
… using exactly the same openssl crate version.
…d5Aes256, Sha1Aes192, Sha1Aes256, Sha224Aes256.
… on heap to prevent stack overflow when allocating a lot of sessions across await points.
Contributor
|
thanks again. it's a pretty big PR so I gonna test it within a few days this week |
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.
Hi. that's me again :-)
I needed v3 support in my app, but when i tried to use it only md5 and sha1 worked for me (it was before ver. 04.11 :-) ).
So i made some fixes, and finally i get to the state where all 31 combinations of Auth and Priv worked.
I also make a server(s) to test different v3 Auth and Priv, feel free to use it:
https://github.com/micdmy/snmp-test-server
I tested my solution against net-snmp 5.9 agent with all Auth/Priv combinations.
I also created tweaked net-snmp that uses reeder's method instead blumenthal, because i added support for both of these key extension method to your lib.
What i fixed and why:
I needed to call openssl functions to enable legacy provider for DES support.
If you don't these combinations are not supported and you get new error kind when doing session .init()
blumenthal and reeder are kind of non-standard (according to some rfc i don't remember), so i decided that default Security have them disabled. It also doesn't break the previous behaviour and library API.
Last thing. Not related to v3 support but async session.
In my app i create dozens of sessions to many hosts in async fasion.
Because send, recv are stack - allocated I get stack overflow. This happens because rust holds the stack across awaits points.
So i added feature 'heap_buffers' to allocate buffers as Box<[u8]>. It helps with stack overflow.
I can provide you with minimal example to reproduce the stack overflow if you interested.
Best regards,
Michał