Skip to main content

match_endpoints

Function match_endpoints 

Source
pub fn match_endpoints(
    writer: &EndpointProtection,
    reader: &EndpointProtection,
    writer_has_info: bool,
    reader_has_info: bool,
) -> EndpointMatch
Expand description

Match Writer ↔ Reader. Aus den beiden EndpointProtection- Werten wird bestimmt:

  • Ist das Paar kompatibel?
  • Auf welchem Level wird kommuniziert?

Regel (Plan §Stufe 3 DoD):

  • Writer Encrypt, Reader None ohne Info → Reject
  • Writer None ohne Info, Reader EncryptReject
  • Writer Sign, Reader EncryptAccept(Encrypt) (stronger wins)
  • Alles andere → Accept(max(w, r))