Skip to content

Commit

Permalink
Update tough/src/schema/decoded.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Matthew James Briggs <[email protected]>
  • Loading branch information
flavio and webern authored Jan 26, 2022
1 parent 66d11d1 commit d6eb9ba
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tough/src/schema/decoded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,7 @@ pub struct EcdsaFlex {}
impl Decode for EcdsaFlex {
fn decode(s: &str) -> Result<Vec<u8>, Error> {
if s.starts_with("-----BEGIN ") {
spki::decode(
spki::OID_EC_PUBLIC_KEY,
Some(spki::OID_EC_PARAM_SECP256R1),
s,
)
EcdsaPem::decode(s)
} else {
Hex::decode(s)
}
Expand Down

0 comments on commit d6eb9ba

Please sign in to comment.