pub struct Signer {
pub kid: String,
pub public_key: String,
/* private fields */
}Expand description
A key that signs messages: the server’s, or a client’s.
Fields§
§kid: StringThe key’s id.
public_key: StringThe public key, base64 of the uncompressed point.
Implementations§
Source§impl Signer
impl Signer
Sourcepub fn thumbprint(&self) -> String
pub fn thumbprint(&self) -> String
The RFC 7638 thumbprint of this key: what a token names it by
(cnf.jkt), and what the server confirms a session is bound to.
Sourcepub fn prove_session(&self, th: &[u8; 32]) -> Result<String, E2eError>
pub fn prove_session(&self, th: &[u8; 32]) -> Result<String, E2eError>
The proof of this key over an end-to-end session (client_auth):
what binds the session to a token naming the key.
Sourcepub fn from_pkcs8(key: &[u8]) -> Result<Self, Error>
pub fn from_pkcs8(key: &[u8]) -> Result<Self, Error>
From a PKCS#8 ECDSA P-256 private key, PEM or DER.
Auto Trait Implementations§
impl Forget for Signer
impl Freeze for Signer
impl Move for Signer
impl RefUnwindSafe for Signer
impl Send for Signer
impl Sync for Signer
impl Unpin for Signer
impl UnsafeUnpin for Signer
impl UnwindSafe for Signer
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