mirror of
https://github.com/rosenpass/rosenpass.git
synced 2026-02-28 06:23:08 -08:00
dev(rosenpass): add support for the shake256 hash function in the rosenpass crate
This commit is contained in:
@@ -26,7 +26,7 @@ use rosenpass_util::{
|
||||
use std::os::fd::{AsFd, AsRawFd};
|
||||
use tempfile::TempDir;
|
||||
use zerocopy::AsBytes;
|
||||
|
||||
use rosenpass::config::ProtocolVersion;
|
||||
use rosenpass::protocol::SymKey;
|
||||
|
||||
struct KillChild(std::process::Child);
|
||||
@@ -48,7 +48,16 @@ impl Drop for KillChild {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn api_integration_api_setup() -> anyhow::Result<()> {
|
||||
fn api_integration_api_setup_v02() -> anyhow::Result<()> {
|
||||
api_integration_api_setup(ProtocolVersion::V02)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn api_integration_api_setup_v03() -> anyhow::Result<()> {
|
||||
api_integration_api_setup(ProtocolVersion::V03)
|
||||
}
|
||||
|
||||
fn api_integration_api_setup(protocol_version: ProtocolVersion) -> anyhow::Result<()> {
|
||||
rosenpass_secret_memory::policy::secret_policy_use_only_malloc_secrets();
|
||||
|
||||
let dir = TempDir::with_prefix("rosenpass-api-integration-test")?;
|
||||
@@ -96,6 +105,7 @@ fn api_integration_api_setup() -> anyhow::Result<()> {
|
||||
peer: format!("{}", peer_b_wg_peer_id.fmt_b64::<8129>()),
|
||||
extra_params: vec![],
|
||||
}),
|
||||
protocol_version: protocol_version.clone(),
|
||||
}],
|
||||
};
|
||||
|
||||
@@ -116,6 +126,7 @@ fn api_integration_api_setup() -> anyhow::Result<()> {
|
||||
endpoint: Some(peer_a_endpoint.to_owned()),
|
||||
pre_shared_key: None,
|
||||
wg: None,
|
||||
protocol_version: protocol_version.clone(),
|
||||
}],
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user