same as before, forgot the server changes
This commit is contained in:
@@ -91,34 +91,6 @@ pub async fn start_server(server: Arc<Mutex<Server>>) -> Result<(), Box<dyn Erro
|
|||||||
let cert = generate_simple_self_signed(current_config_names)?;
|
let cert = generate_simple_self_signed(current_config_names)?;
|
||||||
write(&lock.certificate_path, cert.cert.pem())?;
|
write(&lock.certificate_path, cert.cert.pem())?;
|
||||||
write(&lock.key_path, cert.signing_key.serialize_pem())?;
|
write(&lock.key_path, cert.signing_key.serialize_pem())?;
|
||||||
println!("attempting to load saved password...");
|
|
||||||
if let Ok(entry) = Entry::new("tetanus-server", &lock.address) {
|
|
||||||
if let Ok(password) = entry.get_password() {
|
|
||||||
lock.password = password;
|
|
||||||
println!("password loaded from keyring!");
|
|
||||||
} else {
|
|
||||||
println!("error getting password, using randomly generated one.");
|
|
||||||
if let Err(e) = entry.set_password(&lock.password) {
|
|
||||||
println!("error saving generated password! {e}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
println!("error creating entry, using randomly generated password.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
println!("attempting to load saved password...");
|
|
||||||
if let Ok(entry) = Entry::new("tetanus-server", &lock.address) {
|
|
||||||
if let Ok(password) = entry.get_password() {
|
|
||||||
lock.password = password;
|
|
||||||
println!("password loaded from keyring!");
|
|
||||||
} else {
|
|
||||||
println!("error getting password, using randomly generated one.");
|
|
||||||
if let Err(e) = entry.set_password(&lock.password) {
|
|
||||||
println!("error saving generated password! {e}");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
println!("error creating entry, using randomly generated password.");
|
|
||||||
}
|
}
|
||||||
let certs = load_certs(&lock.certificate_path)?;
|
let certs = load_certs(&lock.certificate_path)?;
|
||||||
let key = load_key(&lock.key_path)?;
|
let key = load_key(&lock.key_path)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user