pub struct ServerKeygenResponse { /* private fields */ }Expand description
Server key generation response (RFC 7030 §4.4.2).
Contains a multipart/mixed MIME response with two parts:
application/pkcs7-mime- Certificate signed by ML-DSA or composite CAapplication/pkcs8- ML-KEM private key (encrypted for client)
The multipart structure allows secure transport of both the certificate and the server-generated private key.
Implementations§
Source§impl ServerKeygenResponse
impl ServerKeygenResponse
Sourcepub fn new(
cert_pkcs7_der: Vec<u8>,
key_pkcs8_der: Vec<u8>,
boundary: String,
) -> Self
pub fn new( cert_pkcs7_der: Vec<u8>, key_pkcs8_der: Vec<u8>, boundary: String, ) -> Self
Creates a new server key generation response.
Sourcepub fn with_default_boundary(
cert_pkcs7_der: Vec<u8>,
key_pkcs8_der: Vec<u8>,
) -> Self
pub fn with_default_boundary( cert_pkcs7_der: Vec<u8>, key_pkcs8_der: Vec<u8>, ) -> Self
Creates a response with the default boundary.
Sourcepub fn cert_pkcs7_der(&self) -> &[u8] ⓘ
pub fn cert_pkcs7_der(&self) -> &[u8] ⓘ
Returns the certificate PKCS#7 DER.
Sourcepub fn key_pkcs8_der(&self) -> &[u8] ⓘ
pub fn key_pkcs8_der(&self) -> &[u8] ⓘ
Returns the private key PKCS#8 DER.
Sourcepub fn to_multipart_body(&self) -> String
pub fn to_multipart_body(&self) -> String
Generates the multipart/mixed response body.
Returns the complete HTTP response body with MIME boundaries, headers, and base64-encoded parts.
Trait Implementations§
Source§impl Clone for ServerKeygenResponse
impl Clone for ServerKeygenResponse
Source§fn clone(&self) -> ServerKeygenResponse
fn clone(&self) -> ServerKeygenResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServerKeygenResponse
impl Debug for ServerKeygenResponse
Source§impl<'de> Deserialize<'de> for ServerKeygenResponse
impl<'de> Deserialize<'de> for ServerKeygenResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ServerKeygenResponse
impl PartialEq for ServerKeygenResponse
Source§impl Serialize for ServerKeygenResponse
impl Serialize for ServerKeygenResponse
impl Eq for ServerKeygenResponse
impl StructuralPartialEq for ServerKeygenResponse
Auto Trait Implementations§
impl Freeze for ServerKeygenResponse
impl RefUnwindSafe for ServerKeygenResponse
impl Send for ServerKeygenResponse
impl Sync for ServerKeygenResponse
impl Unpin for ServerKeygenResponse
impl UnsafeUnpin for ServerKeygenResponse
impl UnwindSafe for ServerKeygenResponse
Blanket Implementations§
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