trust_anchors.rs (612B)
1 /* -*- Mode: rust; rust-indent-offset: 4 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 pub(crate) struct TrustAnchor { 7 bytes: &'static [u8], 8 subject: (u16, u8), 9 } 10 11 impl TrustAnchor { 12 pub fn bytes(&self) -> &'static [u8] { 13 self.bytes 14 } 15 16 pub fn subject(&self) -> &'static [u8] { 17 &self.bytes[self.subject.0 as usize..][..self.subject.1 as usize] 18 } 19 } 20 21 include!(concat!(env!("OUT_DIR"), "/trust_anchors.rs"));