spiffe-rs 0.1.0

Rust port of spiffe-go with SPIFFE IDs, bundles, SVIDs, Workload API client, federation helpers, and rustls-based SPIFFE TLS utilities.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::bundle::x509bundle;
use crate::svid::x509svid;

#[derive(Debug)]
pub struct X509Context {
    pub svids: Vec<x509svid::SVID>,
    pub bundles: x509bundle::Set,
}

impl X509Context {
    pub fn default_svid(&self) -> Option<x509svid::SVID> {
        self.svids.first().cloned()
    }
}