From: Dominik Csapak <d.csapak@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox-backup] fix typo s/CGM/GCM/i
Date: Wed, 27 Oct 2021 09:05:51 +0200 [thread overview]
Message-ID: <20211027070551.697454-1-d.csapak@proxmox.com> (raw)
only user visible change is in the error message
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
pbs-config/src/key_config.rs | 2 +-
pbs-tape/src/sg_tape/encryption.rs | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/pbs-config/src/key_config.rs b/pbs-config/src/key_config.rs
index 178b3b52..9397633d 100644
--- a/pbs-config/src/key_config.rs
+++ b/pbs-config/src/key_config.rs
@@ -67,7 +67,7 @@ impl KeyDerivationConfig {
/// Encryption Key Configuration
///
/// We use this struct to store secret keys. When used with a key
-/// derivation function, the key data is encrypted (AES-CGM), and you
+/// derivation function, the key data is encrypted (AES-GCM), and you
/// need the password to restore the plain key.
#[derive(Deserialize, Serialize, Clone, Debug)]
pub struct KeyConfig {
diff --git a/pbs-tape/src/sg_tape/encryption.rs b/pbs-tape/src/sg_tape/encryption.rs
index def1fbff..2fabd8eb 100644
--- a/pbs-tape/src/sg_tape/encryption.rs
+++ b/pbs-tape/src/sg_tape/encryption.rs
@@ -10,7 +10,7 @@ use crate::sgutils2::{SgRaw, alloc_page_aligned_buffer};
/// Test if drive supports hardware encryption
///
-/// We search for AES_CGM algorithm with 256bits key.
+/// We search for AES_GCM algorithm with 256bits key.
pub fn has_encryption<F: AsRawFd>(
file: &mut F,
) -> bool {
@@ -213,14 +213,14 @@ struct SspDataEncryptionAlgorithmDescriptor {
algorithm_code: u32,
}
-// Returns the algorythm_index for AES-CGM
+// Returns the algorythm_index for AES-GCM
fn decode_spin_data_encryption_caps(data: &[u8]) -> Result<u8, Error> {
proxmox_lang::try_block!({
let mut reader = &data[..];
let _page: SspDataEncryptionCapabilityPage = unsafe { reader.read_be_value()? };
- let mut aes_cgm_index = None;
+ let mut aes_gcm_index = None;
loop {
if reader.is_empty() { break; };
@@ -236,14 +236,14 @@ fn decode_spin_data_encryption_caps(data: &[u8]) -> Result<u8, Error> {
continue; // can't decrypt in hardware
}
if desc.algorithm_code == 0x00010014 && desc.key_size == 32 {
- aes_cgm_index = Some(desc.algorythm_index);
+ aes_gcm_index = Some(desc.algorythm_index);
break;
}
}
- match aes_cgm_index {
+ match aes_gcm_index {
Some(index) => Ok(index),
- None => bail!("drive does not support AES-CGM encryption"),
+ None => bail!("drive does not support AES-GCM encryption"),
}
}).map_err(|err: Error| format_err!("decode data encryption caps page failed - {}", err))
--
2.30.2
next reply other threads:[~2021-10-27 7:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-27 7:05 Dominik Csapak [this message]
2021-10-27 14:29 ` [pbs-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211027070551.697454-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox