1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// This file is part of the Aurelia workspace.
// SPDX-FileCopyrightText: 2026 Zivatar Limited
// SPDX-License-Identifier: Apache-2.0
/// PKCS#8 mTLS material in DER form.
#[derive(Clone, Debug)]
pub struct Pkcs8DerConfig {
/// DER-encoded trust-anchor certificate authority.
pub ca_der: Vec<u8>,
/// DER-encoded leaf certificate presented to peers.
pub cert_der: Vec<u8>,
/// DER-encoded PKCS#8 private key matching `cert_der`.
pub pkcs8_key_der: Vec<u8>,
}
/// PKCS#8 mTLS material in PEM form.
#[derive(Clone, Debug)]
pub struct Pkcs8PemConfig {
/// PEM-encoded trust-anchor certificate authority.
pub ca_pem: Vec<u8>,
/// PEM-encoded leaf certificate presented to peers.
pub cert_pem: Vec<u8>,
/// PEM-encoded PKCS#8 private key matching `cert_pem`.
pub pkcs8_key_pem: Vec<u8>,
}
/// PKCS#8 mTLS material accepted by the TCP transport.
#[derive(Clone, Debug)]
pub enum Pkcs8AuthConfig {
/// DER-encoded PKCS#8 material.
Pkcs8Der(Pkcs8DerConfig),
/// PEM-encoded PKCS#8 material.
Pkcs8Pem(Pkcs8PemConfig),
}
/// Authentication material supplied when building a [`crate::peering::Domus`].
#[derive(Clone, Debug)]
pub enum DomusAuthConfig {
/// PKCS#8 mTLS configuration for the TCP transport.
Pkcs8(Pkcs8AuthConfig),
}