pub fn create_cert_cbor(&self, ocsp_der: &[u8]) -> Vec<u8> {
        use cbor::DataItem;
        let cert_cbor = DataItem::Array(vec![
            DataItem::TextString("📜⛓"),
            DataItem::Map(vec![
                (
                    DataItem::TextString("cert"),
                    DataItem::ByteString(&self.config.cert_der),
                ),
                (DataItem::TextString("ocsp"), DataItem::ByteString(ocsp_der)),
            ]),
            DataItem::Map(vec![(
                DataItem::TextString("cert"),
                DataItem::ByteString(&self.config.issuer_der),
            )]),
        ]);
        cert_cbor.serialize()
    }
// TODO: Make OCSP status as an internal state of SxgWorker, so that
// SxgWorker is able to fetch OCSP. This will need a definition of a
// Fetcher trait. Both js and rust callers need to implement this trait.
Make OCSP status as an internal state of SxgWorker, so that
SxgWorker is able to fetch OCSP. This will need a definition of a
Fetcher trait. Both js and rust callers need to implement this trait.
Make OCSP status as an internal state of SxgWorker so that SxgWorker is able to fetch OCSP . This will need a definition of a Fetcher trait . Both js and rust callers need to implement this trait .
pub fn create_cert_cbor(&self, ocsp_der: &[u8]) -> Vec<u8> {
        use cbor::DataItem;
        let cert_cbor = DataItem::Array(vec![
            DataItem::TextString("📜⛓"),
            DataItem::Map(vec![
                (
                    DataItem::TextString("cert"),
                    DataItem::ByteString(&self.config.cert_der),
                ),
                (DataItem::TextString("ocsp"), DataItem::ByteString(ocsp_der)),
            ]),
            DataItem::Map(vec![(
                DataItem::TextString("cert"),
                DataItem::ByteString(&self.config.issuer_der),
            )]),
        ]);
        cert_cbor.serialize()
    }
pub fn create_cert_cbor ( & self , ocsp_der : & [ u8 ] ) -> Vec < u8 > { use cbor :: DataItem ; let cert_cbor = DataItem :: Array ( vec ! [ DataItem TextString ( " DataItem Map ( vec [ ( DataItem TextString ( " " ) DataItem ByteString ( self config cert_der ) ) ( DataItem TextString ( " " ) DataItem ByteString ( ocsp_der ) ) ] ) DataItem Map ( vec [ ( DataItem TextString ( " " ) DataItem ByteString ( self config issuer_der ) ) ] ) ] ) ; cert_cbor . serialize ( ) }
TODO: Make OCSP status as an internal state of SxgWorker, so that
SxgWorker is able to fetch OCSP.
TODO : Make OCSP status as an internal state of SxgWorker so that SxgWorker is able to fetch OCSP .
&self
ocsp_der
&[u8]
&self
ocsp_der
&[u8]