openmls/test_utils/frankenstein/
credentials.rs

1use tls_codec::*;
2
3use crate::credentials::Credential;
4
5#[derive(
6    Debug, Clone, PartialEq, Eq, TlsSerialize, TlsDeserialize, TlsDeserializeBytes, TlsSize,
7)]
8pub struct FrankenCredential {
9    credential_type: u16,
10    serialized_credential_content: VLBytes,
11}
12
13impl From<Credential> for FrankenCredential {
14    fn from(value: Credential) -> Self {
15        FrankenCredential {
16            credential_type: value.credential_type().into(),
17            serialized_credential_content: value.serialized_content().to_owned().into(),
18        }
19    }
20}