pub struct IdentityKey(/* private fields */);Expand description
The server’s identity for end-to-end encryption: an ECDSA P-256 key that signs each handshake, so a client pinning its public key knows it talks to this server and not to whatever terminates TLS in between.
Implementations§
Source§impl IdentityKey
impl IdentityKey
Sourcepub fn from_pkcs8(key: &[u8]) -> Result<Self, Error>
pub fn from_pkcs8(key: &[u8]) -> Result<Self, Error>
From a PKCS#8 private key, PEM (-----BEGIN PRIVATE KEY-----) or DER.
Sourcepub fn public_key(&self) -> &[u8] ⓘ
pub fn public_key(&self) -> &[u8] ⓘ
The public key: uncompressed SEC1, 0x04 || X || Y.
Auto Trait Implementations§
impl Forget for IdentityKey
impl Freeze for IdentityKey
impl Move for IdentityKey
impl RefUnwindSafe for IdentityKey
impl Send for IdentityKey
impl Sync for IdentityKey
impl Unpin for IdentityKey
impl UnsafeUnpin for IdentityKey
impl UnwindSafe for IdentityKey
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