Skip to content

Commit

Permalink
ecdsa: gate pkcs8::Encode*Key impls under alloc+pkcs8
Browse files Browse the repository at this point in the history
...rather than `pem`, as these can be used to encode DER without having
full `pem` support enabled.

Closes #721
  • Loading branch information
tarcieri committed Jan 17, 2024
1 parent 55e4450 commit d7427d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ecdsa/src/signing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ where
}
}

#[cfg(feature = "pem")]
#[cfg(all(feature = "alloc", feature = "pkcs8"))]
impl<C> EncodePrivateKey for SigningKey<C>
where
C: AssociatedOid + PrimeCurve + CurveArithmetic,
Expand Down
2 changes: 1 addition & 1 deletion ecdsa/src/verifying.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ where
}
}

#[cfg(feature = "pem")]
#[cfg(all(feature = "alloc", feature = "pkcs8"))]
impl<C> EncodePublicKey for VerifyingKey<C>
where
C: PrimeCurve + AssociatedOid + CurveArithmetic + PointCompression,
Expand Down

0 comments on commit d7427d7

Please sign in to comment.