Skip to content

Commit 2651953

Browse files
committed
bignp256: fixes
1 parent 6625bd0 commit 2651953

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

bignp256/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ pub mod public_key;
5858
pub mod secret_key;
5959

6060
#[cfg(feature = "pkcs8")]
61-
#[allow(dead_code)]
6261
const ALGORITHM_OID: pkcs8::ObjectIdentifier =
6362
pkcs8::ObjectIdentifier::new_unwrap("1.2.112.0.2.0.34.101.45.2.1");
6463

bignp256/src/secret_key.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,7 @@ impl SecretKey {
9090
/// sidechannel, always ensure that the input has been pre-padded to `C::FieldBytesSize`.
9191
pub fn from_slice(slice: &[u8]) -> Result<Self> {
9292
if slice.len() == <BignP256 as elliptic_curve::Curve>::FieldBytesSize::USIZE {
93-
#[allow(deprecated)]
94-
Self::from_bytes(FieldBytes::from_slice(slice))
93+
Self::from_bytes(&FieldBytes::try_from(slice).map_err(|_| Error)?)
9594
} else if (Self::MIN_SIZE..<BignP256 as elliptic_curve::Curve>::FieldBytesSize::USIZE)
9695
.contains(&slice.len())
9796
{

0 commit comments

Comments
 (0)