Files
RustCrypto-signatures/ecdsa/tests/lib.rs
T
Tony Arcieri 7f3aedd6ca ecdsa: replace CheckSignatureBytes with Order (#281)
Uses a generic implementation for checking that the scalars in a
signature are in range which doesn't require a curve arithmetic backend.
2021-04-21 11:30:29 -07:00

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());
}