mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust/pv: Add-Secret: Add user-data types
Add four new user-data types an add-secret request could have: Unsigned, Signed(EcSECP521R1, Rsa(2048, 3072)) As the user-data enum was not marked as non-exaustive this might be a breaking change for users. (Not for any crate in this repo though). The addition of such user-data is provided by following patches. Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
bfd0e12d22
commit
f36c34038b
@@ -240,11 +240,7 @@ impl AddSecretRequest {
|
||||
self.keyslots.iter().for_each(|k| aad.push(Aad::Ks(k)));
|
||||
aad.push(Aad::Plain(&secr_auth));
|
||||
|
||||
ctx.build_aad(self.version.into(), &aad, conf_len, self.magic())
|
||||
}
|
||||
|
||||
fn magic(&self) -> crate::request::RequestMagic {
|
||||
self.magic.as_bytes().try_into().unwrap()
|
||||
ctx.build_aad(self.version.into(), &aad, conf_len, self.magic.get())
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
|
||||
@@ -63,7 +63,7 @@ impl AddCmd {
|
||||
let mut data = Vec::with_capacity(PAGESIZE);
|
||||
bin_add_secret_req.read_to_end(&mut data)?;
|
||||
|
||||
if !AddSecretMagic::starts_with_magic(&data[..6]) {
|
||||
if !AddSecretMagic::starts_with_magic(&data) {
|
||||
return Err(Error::NoAsrcb);
|
||||
}
|
||||
Ok(Self(data))
|
||||
|
||||
Reference in New Issue
Block a user