pub struct ClientCertificate { /* private fields */ }Expand description
Client-side connection descriptor: crypto public keys + server addresses (fast mode).
Derived from a ServerKeyPair and distributed to clients out-of-band.
Pass directly to ClientSocketBuilder::new.
Implementations§
Source§impl ClientCertificate
impl ClientCertificate
Sourcepub fn addresses(&self) -> &[SocketAddr]
pub fn addresses(&self) -> &[SocketAddr]
Return the server addresses embedded in this certificate.
Sourcepub fn save(&self, path: impl AsRef<Path>) -> Result<(), CertificateError>
pub fn save(&self, path: impl AsRef<Path>) -> Result<(), CertificateError>
Save the client certificate to a binary file (fast mode).
§File layout (fast mode, F)
| Offset | Size | Field | Description |
|---|---|---|---|
| 0 | 10 | Header | Magic TYPHOON, type C, mode F, version 1 |
| 10 | 261120 (EPK_BYTES) | EPK | Classic McEliece 348864 public key |
| 261130 | 32 (ED25519_BYTES) | VPK | Ed25519 verifying key |
| 261162 | 32 (ED25519_BYTES) | OBFS | Symmetric tailer obfuscation key |
| 261194 | 2 | ADDR_COUNT | Number of addresses (big-endian u16) |
| 261196 | varies | ADDRS | Address list; each entry: 1-byte family (4/6), 4 or 16 IP bytes, 2-byte port (big-endian) |
Trait Implementations§
Source§impl Clone for ClientCertificate
impl Clone for ClientCertificate
Source§fn clone(&self) -> ClientCertificate
fn clone(&self) -> ClientCertificate
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ClientCertificate
impl RefUnwindSafe for ClientCertificate
impl Send for ClientCertificate
impl Sync for ClientCertificate
impl Unpin for ClientCertificate
impl UnsafeUnpin for ClientCertificate
impl UnwindSafe for ClientCertificate
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more