struct EcdsaSigningKey {
key: Arc<EcdsaKeyPair>,
scheme: SignatureScheme,
}Expand description
A SigningKey that uses exactly one TLS-level SignatureScheme and one ring-level signature::SigningAlgorithm.
Compare this to RsaSigningKey, which for a particular key is willing to sign with several algorithms. This is quite poor cryptography practice, but is necessary because a given RSA key is expected to work in TLS1.2 (PKCS#1 signatures) and TLS1.3 (PSS signatures) – nobody is willing to obtain certificates for different protocol versions.
Currently this is only implemented for ECDSA keys.
Fields§
§key: Arc<EcdsaKeyPair>§scheme: SignatureSchemeImplementations§
Source§impl EcdsaSigningKey
impl EcdsaSigningKey
Sourcefn new(
der: &PrivateKeyDer<'_>,
scheme: SignatureScheme,
sigalg: &'static EcdsaSigningAlgorithm,
) -> Result<Self, ()>
fn new( der: &PrivateKeyDer<'_>, scheme: SignatureScheme, sigalg: &'static EcdsaSigningAlgorithm, ) -> Result<Self, ()>
Make a new ECDSASigningKey from a DER encoding in PKCS#8 or SEC1
format, expecting a key usable with precisely the given signature
scheme.
Trait Implementations§
Source§impl Debug for EcdsaSigningKey
impl Debug for EcdsaSigningKey
Source§impl SigningKey for EcdsaSigningKey
impl SigningKey for EcdsaSigningKey
Source§fn choose_scheme(&self, offered: &[SignatureScheme]) -> Option<Box<dyn Signer>>
fn choose_scheme(&self, offered: &[SignatureScheme]) -> Option<Box<dyn Signer>>
Choose a
SignatureScheme from those offered. Read moreSource§fn public_key(&self) -> Option<SubjectPublicKeyInfoDer<'_>>
fn public_key(&self) -> Option<SubjectPublicKeyInfoDer<'_>>
Get the RFC 5280-compliant SubjectPublicKeyInfo (SPKI) of this
SigningKey if available.Source§fn algorithm(&self) -> SignatureAlgorithm
fn algorithm(&self) -> SignatureAlgorithm
What kind of key we have.
Auto Trait Implementations§
impl Freeze for EcdsaSigningKey
impl RefUnwindSafe for EcdsaSigningKey
impl Send for EcdsaSigningKey
impl Sync for EcdsaSigningKey
impl Unpin for EcdsaSigningKey
impl UnwindSafe for EcdsaSigningKey
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