-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add
#![allow(unexpected_cfgs]
to every non-example target
As of Rust 1.80/nightly 2024-05-05, using custom `cfg` attributes requires that we add a build.rs to all our crates. Aside from slowing builds, this is a red flag for people trying to audit our crates because prior to this change, there was no reason for a project to have a build.rs except to interact with some other language -- which itself is something that requires greater scrutiny than a normal Rust crate. Obviously we are not going to do that for any of our crates except for rust-secp, which wraps a C library. We use custom cfg attributes to allow disabling our cryptography for certain kinds of fuzztests. The Rust blog suggests using Cargo features for this. This is even more insane, because it would then mean that if *any dependency* in a user's tree were to enable a "disable all the crypto" feature in our projects, the user would be fatally and thoroughly compromised. No doubt there will be a ton of pushback over the coming weeks but bluntly, the Rust community is a dumpster fire and I have zero interest in participating in this shit. There is an easy way to just disable the new behavior so do that.
- Loading branch information
Showing
22 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use honggfuzz::fuzz; | ||
|
||
fn do_test(data: &[u8]) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#![allow(unexpected_cfgs)] | ||
use std::str::FromStr; | ||
|
||
use honggfuzz::fuzz; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use honggfuzz::fuzz; | ||
|
||
fn do_test(data: &[u8]) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#![allow(unexpected_cfgs)] | ||
use honggfuzz::fuzz; | ||
|
||
fn do_test(data: &[u8]) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use honggfuzz::fuzz; | ||
|
||
fn do_test(data: &[u8]) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use honggfuzz::fuzz; | ||
|
||
fn do_test(data: &[u8]) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use std::str::FromStr; | ||
|
||
use bitcoin::blockdata::transaction::OutPoint; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use std::fmt; | ||
|
||
use honggfuzz::fuzz; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use bitcoin::hashes::{ripemd160, Hash, HashEngine}; | ||
use honggfuzz::fuzz; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use bitcoin::hashes::{sha1, Hash, HashEngine}; | ||
use honggfuzz::fuzz; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use bitcoin::hashes::{sha256, Hash, HashEngine}; | ||
use honggfuzz::fuzz; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use bitcoin::hashes::{sha512, Hash, HashEngine}; | ||
use honggfuzz::fuzz; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use bitcoin::hashes::{sha512_256, Hash, HashEngine}; | ||
use honggfuzz::fuzz; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(unexpected_cfgs)] | ||
|
||
use std::str::FromStr; | ||
|
||
use honggfuzz::fuzz; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters