mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-16 07:40:08 +00:00
Improve JWT key initialization and avoid saving public key (#4085)
This commit is contained in:
parent
2cbfe6fa5b
commit
a1fbd6d729
5 changed files with 48 additions and 87 deletions
|
@ -1164,7 +1164,7 @@ impl Config {
|
|||
}
|
||||
|
||||
pub fn delete_user_config(&self) -> Result<(), Error> {
|
||||
crate::util::delete_file(&CONFIG_FILE)?;
|
||||
std::fs::remove_file(&*CONFIG_FILE)?;
|
||||
|
||||
// Empty user config
|
||||
let usr = ConfigBuilder::default();
|
||||
|
@ -1189,9 +1189,6 @@ impl Config {
|
|||
pub fn private_rsa_key(&self) -> String {
|
||||
format!("{}.pem", CONFIG.rsa_key_filename())
|
||||
}
|
||||
pub fn public_rsa_key(&self) -> String {
|
||||
format!("{}.pub.pem", CONFIG.rsa_key_filename())
|
||||
}
|
||||
pub fn mail_enabled(&self) -> bool {
|
||||
let inner = &self.inner.read().unwrap().config;
|
||||
inner._enable_smtp && (inner.smtp_host.is_some() || inner.use_sendmail)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue