Simplify KeyPair handling

This commit is contained in:
Valentin Tolmer
2021-06-15 23:07:22 +02:00
committed by nitnelave
parent f918debc2e
commit c3bbcce6a3
8 changed files with 14 additions and 46 deletions

View File

@@ -23,7 +23,7 @@ impl SqlBackendHandler {
fn get_password_file(
clear_password: &str,
server_public_key: opaque::PublicKey<'_>,
server_public_key: &opaque::PublicKey,
) -> Result<opaque::server::ServerRegistration> {
use opaque::{client, server};
let mut rng = rand::rngs::OsRng;
@@ -51,7 +51,7 @@ fn get_password_file(
fn passwords_match(
password_file_bytes: &[u8],
clear_password: &str,
server_private_key: opaque::PrivateKey<'_>,
server_private_key: &opaque::PrivateKey,
) -> Result<()> {
use opaque::{client, server};
let mut rng = rand::rngs::OsRng;

View File

@@ -103,7 +103,7 @@ fn get_server_keys(file_path: &str) -> Result<KeyPair> {
e
)
})?;
Ok(KeyPair(keypair))
Ok(keypair)
}
}