mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-28 00:58:59 +00:00
Co-authored-by: heihutu <30542132+heihutu@users.noreply.github.com> Co-authored-by: houseme <housemecn@gmail.com> Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
@@ -130,8 +130,14 @@ impl ObjectStore {
|
||||
}
|
||||
|
||||
fn decrypt_data(data: &[u8]) -> Result<Vec<u8>> {
|
||||
let de = rustfs_crypto::decrypt_data(get_global_action_cred().unwrap_or_default().secret_key.as_bytes(), data)?;
|
||||
Ok(de)
|
||||
let cred = get_global_action_cred().unwrap_or_default();
|
||||
match rustfs_crypto::decrypt_data(cred.secret_key.as_bytes(), data) {
|
||||
Ok(decrypted) => Ok(decrypted),
|
||||
Err(_) => {
|
||||
warn!("Failed to decrypt IAM config data, treating as unencrypted");
|
||||
Ok(data.to_vec())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn encrypt_data(data: &[u8]) -> Result<Vec<u8>> {
|
||||
|
||||
Reference in New Issue
Block a user