mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-22 12:26:37 +00:00
Update rustfs/src/utils.rs
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
+4
-1
@@ -28,7 +28,10 @@ pub(crate) fn load_private_key(filename: &str) -> io::Result<PrivateKeyDer<'stat
|
|||||||
let mut reader = io::BufReader::new(keyfile);
|
let mut reader = io::BufReader::new(keyfile);
|
||||||
|
|
||||||
// Load and return a single private key.
|
// Load and return a single private key.
|
||||||
private_key(&mut reader).map(|key| key.unwrap())
|
match private_key(&mut reader) {
|
||||||
|
Some(key) => Ok(key),
|
||||||
|
None => Err(error(format!("no private key found in {}", filename))),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn error(err: String) -> io::Error {
|
pub(crate) fn error(err: String) -> io::Error {
|
||||||
|
|||||||
Reference in New Issue
Block a user