fedimint_core/encoding/
tls.rs

1
2
3
4
5
6
7
8
9
10
11
12
use std::io::{Error, Write};

use hex::ToHex;
use tokio_rustls::rustls;

use crate::encoding::Encodable;

impl Encodable for rustls::Certificate {
    fn consensus_encode<W: Write>(&self, writer: &mut W) -> Result<usize, Error> {
        self.0.encode_hex::<String>().consensus_encode(writer)
    }
}