Skip to content

Commit 50aee81

Browse files
committed
Update signature requirement to v1.0.0-pre.5
Changelog here: RustCrypto/traits#90
1 parent 99650e4 commit 50aee81

File tree

8 files changed

+10
-15
lines changed

8 files changed

+10
-15
lines changed

build_nostd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ DIRS=`ls -d */`
99
TARGET="thumbv7em-none-eabi"
1010

1111
for dir in $DIRS; do
12-
if [ $dir = "target/" -o $dir = "signature-crate/" ]
12+
if [ $dir = "target/" ]
1313
then
1414
continue
1515
fi

ecdsa/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ optional = true
4444
default-features = false
4545

4646
[dependencies.signature]
47-
version = "= 1.0.0-pre.3"
47+
version = "= 1.0.0-pre.5"
4848
default-features = false
4949

5050
[features]

ecdsa/src/asn1_signature.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ where
4646
MaxSize<C::ScalarSize>: ArrayLength<u8>,
4747
<C::ScalarSize as Add>::Output: ArrayLength<u8> + Add<MaxOverhead>,
4848
{
49-
fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error> {
50-
bytes.as_ref().try_into()
49+
fn from_bytes(bytes: &[u8]) -> Result<Self, Error> {
50+
bytes.try_into()
5151
}
5252
}
5353

ecdsa/src/convert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ where
5959
// support only integers of less than 127 bytes each (signed
6060
// encoding) so the resulting raw signature will have length
6161
// at most 254 bytes.
62-
let mut bytes = signature.as_slice();
62+
let mut bytes = signature.as_bytes();
6363

6464
// First byte is SEQUENCE tag.
6565
if bytes[0] != Asn1Tag::Sequence as u8 {

ecdsa/src/fixed_signature.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ impl<C: Curve> signature::Signature for FixedSignature<C>
2828
where
2929
Size<C::ScalarSize>: ArrayLength<u8>,
3030
{
31-
fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error> {
32-
bytes.as_ref().try_into()
31+
fn from_bytes(bytes: &[u8]) -> Result<Self, Error> {
32+
bytes.try_into()
3333
}
3434
}
3535

ed25519/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ categories = ["cryptography", "no-std"]
1212
keywords = ["crypto", "curve25519", "ecc", "signature", "signing"]
1313

1414
[dependencies.signature]
15-
version = "= 1.0.0-pre.3"
15+
version = "= 1.0.0-pre.5"
1616
default-features = false
1717

1818
[dependencies.serde]

ed25519/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ impl Signature {
5252
}
5353

5454
impl signature::Signature for Signature {
55-
fn from_bytes(bytes: impl AsRef<[u8]>) -> Result<Self, Error> {
56-
bytes.as_ref().try_into()
55+
fn from_bytes(bytes: &[u8]) -> Result<Self, Error> {
56+
bytes.try_into()
5757
}
5858
}
5959

signature-crate/README.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)