hierynomus / sshj

ssh, scp and sftp for java
Apache License 2.0
2.46k stars 594 forks source link

Add unit tests of strict key exchange extension #918

Closed hpoettker closed 6 months ago

hpoettker commented 6 months ago

Thanks for merging #917!

I also wrote two unit tests for the KeyExchanger and the Transport, respectively. They cover some corner cases and in particular aborts that are an import part of the strict key exchange to address the CVE. However, they are a bit mock and reflection heavy, so they might show brittleness in the future.

codecov-commenter commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (a262f51) 68.74% compared to head (12ea6b2) 69.02%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #918 +/- ## ============================================ + Coverage 68.74% 69.02% +0.27% - Complexity 1437 1448 +11 ============================================ Files 208 208 Lines 7602 7602 Branches 658 658 ============================================ + Hits 5226 5247 +21 + Misses 2023 2004 -19 + Partials 353 351 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.