Struct openmls::messages::group_info::VerifiableGroupInfo
source · pub struct VerifiableGroupInfo { /* private fields */ }
Expand description
A type that represents a group info of which the signature has not been verified.
It implements the Verifiable
trait and can be turned into a group info by calling
verify(...)
with the signature key of the Credential
.
When receiving a serialized group info, it can only be deserialized into a
VerifiableGroupInfo
, which can then be turned into a group info as described above.
Implementations§
source§impl VerifiableGroupInfo
impl VerifiableGroupInfo
sourcepub fn new(
group_context: GroupContext,
extensions: Extensions,
confirmation_tag: ConfirmationTag,
signer: LeafNodeIndex,
signature: Signature
) -> Self
pub fn new( group_context: GroupContext, extensions: Extensions, confirmation_tag: ConfirmationTag, signer: LeafNodeIndex, signature: Signature ) -> Self
Create a new VerifiableGroupInfo
from its contents.
sourcepub fn ciphersuite(&self) -> Ciphersuite
pub fn ciphersuite(&self) -> Ciphersuite
Get (unverified) ciphersuite of the verifiable group info.
Note: This method should only be used when necessary to verify the group info signature.
Trait Implementations§
source§impl Clone for VerifiableGroupInfo
impl Clone for VerifiableGroupInfo
source§fn clone(&self) -> VerifiableGroupInfo
fn clone(&self) -> VerifiableGroupInfo
Returns a copy 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 VerifiableGroupInfo
impl Debug for VerifiableGroupInfo
source§impl Deserialize for VerifiableGroupInfo
impl Deserialize for VerifiableGroupInfo
source§fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>
This function deserializes the
bytes
from the provided a std::io::Read
and returns the populated struct. Read moresource§impl DeserializeBytes for VerifiableGroupInfo
impl DeserializeBytes for VerifiableGroupInfo
source§impl PartialEq for VerifiableGroupInfo
impl PartialEq for VerifiableGroupInfo
source§fn eq(&self, other: &VerifiableGroupInfo) -> bool
fn eq(&self, other: &VerifiableGroupInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Size for &VerifiableGroupInfo
impl Size for &VerifiableGroupInfo
fn tls_serialized_len(&self) -> usize
source§impl Size for VerifiableGroupInfo
impl Size for VerifiableGroupInfo
fn tls_serialized_len(&self) -> usize
source§impl Verifiable for VerifiableGroupInfo
impl Verifiable for VerifiableGroupInfo
§type VerifiedStruct = GroupInfo
type VerifiedStruct = GroupInfo
The type used for representing the verified data. Must implement the marker trait
VerifiedStruct
.source§fn unsigned_payload(&self) -> Result<Vec<u8>, Error>
fn unsigned_payload(&self) -> Result<Vec<u8>, Error>
Return the unsigned, serialized payload that should be verified.
source§fn verify(
self,
crypto: &impl OpenMlsCrypto,
pk: &OpenMlsSignaturePublicKey
) -> Result<Self::VerifiedStruct, SignatureError>
fn verify( self, crypto: &impl OpenMlsCrypto, pk: &OpenMlsSignaturePublicKey ) -> Result<Self::VerifiedStruct, SignatureError>
Verifies the payload against the given
credential
.
Usually this is implemented by first checking that self.verify_no_out()
does not return an error, and then converting the value into
Self::VerifiedStruct
. Read moresource§fn verify_no_out(
&self,
crypto: &impl OpenMlsCrypto,
pk: &OpenMlsSignaturePublicKey
) -> Result<(), SignatureError>
fn verify_no_out( &self, crypto: &impl OpenMlsCrypto, pk: &OpenMlsSignaturePublicKey ) -> Result<(), SignatureError>
Verifies the payload against the given
credential
.
The signature is fetched via the Verifiable::signature()
function and
the payload via Verifiable::unsigned_payload()
. Read moreimpl StructuralPartialEq for VerifiableGroupInfo
Auto Trait Implementations§
impl Freeze for VerifiableGroupInfo
impl RefUnwindSafe for VerifiableGroupInfo
impl Send for VerifiableGroupInfo
impl Sync for VerifiableGroupInfo
impl Unpin for VerifiableGroupInfo
impl UnwindSafe for VerifiableGroupInfo
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more