We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d38089 commit 12d96d3Copy full SHA for 12d96d3
src/lib.rs
@@ -584,10 +584,9 @@ mod tests {
584
#[test]
585
#[ignore] // Panicking from C may trap (SIGILL) intentionally, so we test this manually.
586
fn test_panic_raw_ctx_should_terminate_abnormally() {
587
- let ctx_vrfy = Secp256k1::verification_only();
588
- let raw_ctx_verify_as_full = unsafe {Secp256k1::from_raw_all(ctx_vrfy.ctx)};
589
- // Generating a key pair in verify context will panic (ARG_CHECK).
590
- raw_ctx_verify_as_full.generate_keypair(&mut thread_rng());
+ // Trying to use an all-zeros public key should cause an ARG_CHECK to trigger.
+ let pk = PublicKey::from(unsafe { ffi::PublicKey::new() });
+ pk.serialize();
591
}
592
593
0 commit comments