mirror of
https://github.com/RustCrypto/signatures
synced 2026-06-21 13:45:42 +00:00
7f3aedd6ca
Uses a generic implementation for checking that the scalars in a signature are in range which doesn't require a curve arithmetic backend.
16 lines
397 B
Rust
16 lines
397 B
Rust
//! Smoke tests which use `MockCurve`
|
|
|
|
#![cfg(feature = "dev")]
|
|
|
|
use core::convert::TryFrom;
|
|
use elliptic_curve::dev::MockCurve;
|
|
|
|
type Signature = ecdsa::Signature<MockCurve>;
|
|
type SignatureBytes = ecdsa::SignatureBytes<MockCurve>;
|
|
|
|
#[test]
|
|
fn rejects_all_zero_signature() {
|
|
let all_zero_bytes = SignatureBytes::default();
|
|
assert!(Signature::try_from(all_zero_bytes.as_ref()).is_err());
|
|
}
|