pub struct Certs { /* private fields */ }
Expand description
A Certs message is used as part of the channel handshake to send additional certificates.
These certificates are not presented as part of the TLS handshake. Originally this was meant to make Tor TLS handshakes look “normal”, but nowadays it serves less purpose, especially now that we have TLS 1.3.
Every relay sends this message as part of channel negotiation; clients do not send them.
Implementations
sourceimpl Certs
impl Certs
sourcepub fn push_cert_body<B>(&mut self, certtype: CertType, cert: B) where
B: Into<Vec<u8>>,
pub fn push_cert_body<B>(&mut self, certtype: CertType, cert: B) where
B: Into<Vec<u8>>,
Add a new encoded certificate to this cell.
Does not check anything about the well-formedness of the certificate.
sourcepub fn cert_body(&self, tp: CertType) -> Option<&[u8]>
pub fn cert_body(&self, tp: CertType) -> Option<&[u8]>
Return the body of the certificate tagged with ‘tp’, if any.
sourcepub fn parse_ed_cert(&self, tp: CertType) -> Result<KeyUnknownCert>
pub fn parse_ed_cert(&self, tp: CertType) -> Result<KeyUnknownCert>
Look for a certificate of type ‘tp’ in this cell; return it if there is one.
Trait Implementations
sourceimpl Body for Certs
impl Body for Certs
sourcefn into_message(self) -> ChanMsg
fn into_message(self) -> ChanMsg
Convert this type into a ChanMsg, wrapped as appropriate.
Auto Trait Implementations
impl RefUnwindSafe for Certs
impl Send for Certs
impl Sync for Certs
impl Unpin for Certs
impl UnwindSafe for Certs
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more