pub struct AttestationParams {
pub user_data: Option<Vec<u8>>,
pub nonce: Option<Vec<u8>>,
pub public_key: Option<Vec<u8>>,
}Expand description
Parameters for requesting an attestation document from the Nitro Security Module.
Fields§
§user_data: Option<Vec<u8>>Optional user data to include in the attestation document (e.g. SHA-256 hash of TLS cert).
nonce: Option<Vec<u8>>Optional cryptographic nonce to prevent replay attacks.
public_key: Option<Vec<u8>>Optional public key (DER-encoded) for cryptographic sealing or key exchange.
Implementations§
Source§impl AttestationParams
Builder-style setters and accessors for the attestation parameters.
impl AttestationParams
Builder-style setters and accessors for the attestation parameters.
Sourcepub fn with_user_data(self, data: impl Into<Vec<u8>>) -> Self
pub fn with_user_data(self, data: impl Into<Vec<u8>>) -> Self
Sets user data bytes.
Sourcepub fn with_user_data_hash(self, data: &[u8]) -> Self
pub fn with_user_data_hash(self, data: &[u8]) -> Self
Computes the SHA-256 hash of the input data (such as a DER-encoded certificate)
and sets it as the user_data field for Remote Attestation TLS (RA-TLS).
Sourcepub fn with_nonce(self, nonce: impl Into<Vec<u8>>) -> Self
pub fn with_nonce(self, nonce: impl Into<Vec<u8>>) -> Self
Sets the cryptographic nonce.
Sourcepub fn with_public_key(self, public_key: impl Into<Vec<u8>>) -> Self
pub fn with_public_key(self, public_key: impl Into<Vec<u8>>) -> Self
Sets the DER-encoded public key.
Sourcepub fn public_key(&self) -> Option<&[u8]>
pub fn public_key(&self) -> Option<&[u8]>
Returns a reference to the public key, if set.
Trait Implementations§
Source§impl Clone for AttestationParams
impl Clone for AttestationParams
Source§impl Debug for AttestationParams
impl Debug for AttestationParams
Source§impl Default for AttestationParams
impl Default for AttestationParams
Source§impl PartialEq for AttestationParams
impl PartialEq for AttestationParams
impl StructuralPartialEq for AttestationParams
Auto Trait Implementations§
impl Freeze for AttestationParams
impl RefUnwindSafe for AttestationParams
impl Send for AttestationParams
impl Sync for AttestationParams
impl Unpin for AttestationParams
impl UnsafeUnpin for AttestationParams
impl UnwindSafe for AttestationParams
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more