Enum x509_certificate::algorithm::EcdsaCurve
source · pub enum EcdsaCurve {
Secp256r1,
Secp384r1,
}
Expand description
Represents a known curve used with ECDSA.
Variants§
Implementations§
source§impl EcdsaCurve
impl EcdsaCurve
sourcepub fn as_signature_oid(&self) -> Oid
pub fn as_signature_oid(&self) -> Oid
Obtain the OID representing this elliptic curve.
Examples found in repository?
src/algorithm.rs (line 683)
678 679 680 681 682 683 684 685 686 687 688 689 690 691
fn from(alg: KeyAlgorithm) -> Self {
let parameters = match alg {
KeyAlgorithm::Ed25519 => None,
KeyAlgorithm::Rsa => None,
KeyAlgorithm::Ecdsa(curve) => {
Some(AlgorithmParameter::from_oid(curve.as_signature_oid()))
}
};
Self {
algorithm: alg.into(),
parameters,
}
}
Trait Implementations§
source§impl Clone for EcdsaCurve
impl Clone for EcdsaCurve
source§fn clone(&self) -> EcdsaCurve
fn clone(&self) -> EcdsaCurve
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for EcdsaCurve
impl Debug for EcdsaCurve
source§impl From<EcdsaCurve> for &'static EcdsaSigningAlgorithm
impl From<EcdsaCurve> for &'static EcdsaSigningAlgorithm
source§fn from(curve: EcdsaCurve) -> Self
fn from(curve: EcdsaCurve) -> Self
Converts to this type from the input type.
source§impl PartialEq<EcdsaCurve> for EcdsaCurve
impl PartialEq<EcdsaCurve> for EcdsaCurve
source§fn eq(&self, other: &EcdsaCurve) -> bool
fn eq(&self, other: &EcdsaCurve) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.