Remove read_file and read_file_string and replace them with the std alternatives

This commit is contained in:
Daniel García
2022-07-15 19:13:26 +02:00
parent 7cbcad0e38
commit c9376e3126
5 changed files with 6 additions and 19 deletions

View File

@ -328,7 +328,7 @@ fn check_rsa_keys() -> Result<(), crate::error::Error> {
}
if !util::file_exists(&pub_path) {
let rsa_key = openssl::rsa::Rsa::private_key_from_pem(&util::read_file(&priv_path)?)?;
let rsa_key = openssl::rsa::Rsa::private_key_from_pem(&std::fs::read(&priv_path)?)?;
let pub_key = rsa_key.public_key_to_pem()?;
crate::util::write_file(&pub_path, &pub_key)?;