// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // Copyright by contributors to this project. // SPDX-License-Identifier: (Apache-2.0 OR MIT)
use mls_rs_core::{crypto::CipherSuiteProvider, protocol_version::ProtocolVersion};
// Verify that the protocol version matches if package.version != version { return Err(MlsError::ProtocolVersionMismatch);
}
// Verify that the cipher suite matches if package.cipher_suite != cs.cipher_suite() { return Err(MlsError::CipherSuiteMismatch);
}
// Verify that the public init key is a valid format for this cipher suite
cs.kem_public_key_validate(&package.hpke_init_key)
.map_err(|_| MlsError::InvalidInitKey)?;
// Verify that the init key and the leaf node public key are different if package.hpke_init_key.as_ref() == package.leaf_node.public_key.as_ref() { return Err(MlsError::InitLeafKeyEquality);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.