Skip to content

Conversation

@philipkalesse
Copy link
Contributor

This pull request resolves #16 and also adds a test under tests/security_tests.rs.

One issue is the function new_complete_bundle() in tests/bundle_tests.rs returns a Bundle without CRC and BIB protecting the primary block when getting passed the CrcRawType = 0.

Therefore the following tests fail when running the tests with --feature bpsec:

  • bundle_tests()
  • bundle_helpers()
  • bundle_canonical_update_tests()
  • bundle_add_cblock()
  • status_report_tests()

Question to the maintainers: Should these tests include a BIB protecting the primary block or should they receive the #[cfg(not(feature = "bpsec"))] flag to only run when executing the tests without the BPSec feature?

@gh0st42
Copy link
Member

gh0st42 commented Nov 4, 2025

bpsec should be tested in the bpsec tests to keep it simpler, there tests should be with crc 0 and BIB

@philipkalesse
Copy link
Contributor Author

philipkalesse commented Nov 4, 2025

Now validate is only running on invalid bundles if the bpsec feature is not used. Validate now checks that the primary Block is covered by a CRC or BIB and an additional tests is added.

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.

Acceptance of BPv7 bundle w/ missing primary block integrity check

2 participants