Skip to main content

minimal_capabilities_for

Function minimal_capabilities_for 

Source
pub fn minimal_capabilities_for(ciphersuite: Ciphersuite) -> CapabilitiesBuilder
Available on (32-bit or 64-bit) and (crate features test-utils) only.
Expand description

A capabilities builder covering exactly the two dimensions every leaf node must advertise about itself: ciphersuite, and a Basic credential.

Setting capabilities explicitly means they are taken at face value, so a test that needs a particular extension or proposal type advertised has to state the ciphersuite and credential type too. This is the base to chain .extensions(...) / .proposals(...) onto for that. Use Capabilities::builder() directly when the credential under test isn’t Basic.

A test that doesn’t care about capabilities at all should set none, and let them be derived from the leaf.

This helper must keep setting exactly these two dimensions. Tests rely on the ones it leaves empty: capabilities_check.rs builds a party through it specifically so that party does not support a custom proposal type, and adding .proposals(...) here would make that test vacuous without failing.