diff --git a/src/key.rs b/src/key.rs index a695abedd92..b1c9d05379b 100644 --- a/src/key.rs +++ b/src/key.rs @@ -72,6 +72,9 @@ pub enum Kind { P256, P384, P521, + BrainpoolP256R1, + BrainpoolP384R1, + BrainpoolP512R1, X255, } @@ -215,6 +218,9 @@ impl Kind { Kind::Rsa4096 => 9, Kind::P384 => 10, Kind::P521 => 11, + Kind::BrainpoolP256R1 => 12, + Kind::BrainpoolP384R1 => 13, + Kind::BrainpoolP512R1 => 14, } } @@ -231,6 +237,9 @@ impl Kind { 9 => Kind::Rsa4096, 10 => Kind::P384, 11 => Kind::P521, + 12 => Kind::BrainpoolP256R1, + 13 => Kind::BrainpoolP384R1, + 14 => Kind::BrainpoolP512R1, _ => return Err(Error::InvalidSerializedKey), }) } diff --git a/src/types.rs b/src/types.rs index 6300e9d2fbf..f533c9fe743 100644 --- a/src/types.rs +++ b/src/types.rs @@ -605,6 +605,12 @@ pub enum Mechanism { P384Prehashed, P521, P521Prehashed, + BrainpoolP256R1, + BrainpoolP256R1Prehashed, + BrainpoolP384R1, + BrainpoolP384R1Prehashed, + BrainpoolP512R1, + BrainpoolP512R1Prehashed, // clients can also do hashing by themselves Sha256, Tdes,