@@ -28,7 +28,7 @@ extern crate core;
2828#[ cfg( feature = "alloc" ) ]
2929extern crate alloc;
3030
31- #[ cfg( fuzzing ) ]
31+ #[ cfg( secp256k1_fuzz ) ]
3232const THIS_UNUSED_CONSTANT_IS_YOUR_WARNING_THAT_ALL_THE_CRYPTO_IN_THIS_LIB_IS_DISABLED_FOR_FUZZING : usize = 0 ;
3333
3434mod macros;
@@ -133,7 +133,7 @@ impl SchnorrSigExtraParams {
133133/// Library-internal representation of a Secp256k1 public key
134134#[ repr( C ) ]
135135#[ derive( Copy , Clone ) ]
136- #[ cfg_attr( fuzzing , derive( PartialEq , Eq , PartialOrd , Ord , Hash ) ) ]
136+ #[ cfg_attr( secp256k1_fuzz , derive( PartialEq , Eq , PartialOrd , Ord , Hash ) ) ]
137137pub struct PublicKey ( [ c_uchar ; 64 ] ) ;
138138impl_array_newtype ! ( PublicKey , c_uchar, 64 ) ;
139139impl_raw_debug ! ( PublicKey ) ;
@@ -190,14 +190,14 @@ impl PublicKey {
190190 }
191191}
192192
193- #[ cfg( not( fuzzing ) ) ]
193+ #[ cfg( not( secp256k1_fuzz ) ) ]
194194impl PartialOrd for PublicKey {
195195 fn partial_cmp ( & self , other : & PublicKey ) -> Option < core:: cmp:: Ordering > {
196196 Some ( self . cmp ( other) )
197197 }
198198}
199199
200- #[ cfg( not( fuzzing ) ) ]
200+ #[ cfg( not( secp256k1_fuzz ) ) ]
201201impl Ord for PublicKey {
202202 fn cmp ( & self , other : & PublicKey ) -> core:: cmp:: Ordering {
203203 let ret = unsafe {
@@ -207,17 +207,17 @@ impl Ord for PublicKey {
207207 }
208208}
209209
210- #[ cfg( not( fuzzing ) ) ]
210+ #[ cfg( not( secp256k1_fuzz ) ) ]
211211impl PartialEq for PublicKey {
212212 fn eq ( & self , other : & Self ) -> bool {
213213 self . cmp ( other) == core:: cmp:: Ordering :: Equal
214214 }
215215}
216216
217- #[ cfg( not( fuzzing ) ) ]
217+ #[ cfg( not( secp256k1_fuzz ) ) ]
218218impl Eq for PublicKey { }
219219
220- #[ cfg( not( fuzzing ) ) ]
220+ #[ cfg( not( secp256k1_fuzz ) ) ]
221221impl core:: hash:: Hash for PublicKey {
222222 fn hash < H : core:: hash:: Hasher > ( & self , state : & mut H ) {
223223 let ser = self . serialize ( ) ;
@@ -228,7 +228,7 @@ impl core::hash::Hash for PublicKey {
228228/// Library-internal representation of a Secp256k1 signature
229229#[ repr( C ) ]
230230#[ derive( Copy , Clone ) ]
231- #[ cfg_attr( fuzzing , derive( PartialEq , Eq , PartialOrd , Ord , Hash ) ) ]
231+ #[ cfg_attr( secp256k1_fuzz , derive( PartialEq , Eq , PartialOrd , Ord , Hash ) ) ]
232232pub struct Signature ( [ c_uchar ; 64 ] ) ;
233233impl_array_newtype ! ( Signature , c_uchar, 64 ) ;
234234impl_raw_debug ! ( Signature ) ;
@@ -281,14 +281,14 @@ impl Signature {
281281 }
282282}
283283
284- #[ cfg( not( fuzzing ) ) ]
284+ #[ cfg( not( secp256k1_fuzz ) ) ]
285285impl PartialOrd for Signature {
286286 fn partial_cmp ( & self , other : & Signature ) -> Option < core:: cmp:: Ordering > {
287287 Some ( self . cmp ( other) )
288288 }
289289}
290290
291- #[ cfg( not( fuzzing ) ) ]
291+ #[ cfg( not( secp256k1_fuzz ) ) ]
292292impl Ord for Signature {
293293 fn cmp ( & self , other : & Signature ) -> core:: cmp:: Ordering {
294294 let this = self . serialize ( ) ;
@@ -297,17 +297,17 @@ impl Ord for Signature {
297297 }
298298}
299299
300- #[ cfg( not( fuzzing ) ) ]
300+ #[ cfg( not( secp256k1_fuzz ) ) ]
301301impl PartialEq for Signature {
302302 fn eq ( & self , other : & Self ) -> bool {
303303 self . cmp ( other) == core:: cmp:: Ordering :: Equal
304304 }
305305}
306306
307- #[ cfg( not( fuzzing ) ) ]
307+ #[ cfg( not( secp256k1_fuzz ) ) ]
308308impl Eq for Signature { }
309309
310- #[ cfg( not( fuzzing ) ) ]
310+ #[ cfg( not( secp256k1_fuzz ) ) ]
311311impl core:: hash:: Hash for Signature {
312312 fn hash < H : core:: hash:: Hasher > ( & self , state : & mut H ) {
313313 let ser = self . serialize ( ) ;
@@ -317,7 +317,7 @@ impl core::hash::Hash for Signature {
317317
318318#[ repr( C ) ]
319319#[ derive( Copy , Clone ) ]
320- #[ cfg_attr( fuzzing , derive( PartialEq , Eq , PartialOrd , Ord , Hash ) ) ]
320+ #[ cfg_attr( secp256k1_fuzz , derive( PartialEq , Eq , PartialOrd , Ord , Hash ) ) ]
321321pub struct XOnlyPublicKey ( [ c_uchar ; 64 ] ) ;
322322impl_array_newtype ! ( XOnlyPublicKey , c_uchar, 64 ) ;
323323impl_raw_debug ! ( XOnlyPublicKey ) ;
@@ -370,14 +370,14 @@ impl XOnlyPublicKey {
370370 }
371371}
372372
373- #[ cfg( not( fuzzing ) ) ]
373+ #[ cfg( not( secp256k1_fuzz ) ) ]
374374impl PartialOrd for XOnlyPublicKey {
375375 fn partial_cmp ( & self , other : & XOnlyPublicKey ) -> Option < core:: cmp:: Ordering > {
376376 Some ( self . cmp ( other) )
377377 }
378378}
379379
380- #[ cfg( not( fuzzing ) ) ]
380+ #[ cfg( not( secp256k1_fuzz ) ) ]
381381impl Ord for XOnlyPublicKey {
382382 fn cmp ( & self , other : & XOnlyPublicKey ) -> core:: cmp:: Ordering {
383383 let ret = unsafe {
@@ -387,17 +387,17 @@ impl Ord for XOnlyPublicKey {
387387 }
388388}
389389
390- #[ cfg( not( fuzzing ) ) ]
390+ #[ cfg( not( secp256k1_fuzz ) ) ]
391391impl PartialEq for XOnlyPublicKey {
392392 fn eq ( & self , other : & Self ) -> bool {
393393 self . cmp ( other) == core:: cmp:: Ordering :: Equal
394394 }
395395}
396396
397- #[ cfg( not( fuzzing ) ) ]
397+ #[ cfg( not( secp256k1_fuzz ) ) ]
398398impl Eq for XOnlyPublicKey { }
399399
400- #[ cfg( not( fuzzing ) ) ]
400+ #[ cfg( not( secp256k1_fuzz ) ) ]
401401impl core:: hash:: Hash for XOnlyPublicKey {
402402 fn hash < H : core:: hash:: Hasher > ( & self , state : & mut H ) {
403403 let ser = self . serialize ( ) ;
@@ -407,7 +407,7 @@ impl core::hash::Hash for XOnlyPublicKey {
407407
408408#[ repr( C ) ]
409409#[ derive( Copy , Clone ) ]
410- #[ cfg_attr( fuzzing , derive( PartialEq , Eq , PartialOrd , Ord , Hash ) ) ]
410+ #[ cfg_attr( secp256k1_fuzz , derive( PartialEq , Eq , PartialOrd , Ord , Hash ) ) ]
411411pub struct KeyPair ( [ c_uchar ; 96 ] ) ;
412412impl_array_newtype ! ( KeyPair , c_uchar, 96 ) ;
413413impl_raw_debug ! ( KeyPair ) ;
@@ -492,14 +492,14 @@ pub fn non_secure_erase_impl<T>(dst: &mut T, src: T) {
492492 atomic:: compiler_fence ( atomic:: Ordering :: SeqCst ) ;
493493}
494494
495- #[ cfg( not( fuzzing ) ) ]
495+ #[ cfg( not( secp256k1_fuzz ) ) ]
496496impl PartialOrd for KeyPair {
497497 fn partial_cmp ( & self , other : & KeyPair ) -> Option < core:: cmp:: Ordering > {
498498 Some ( self . cmp ( other) )
499499 }
500500}
501501
502- #[ cfg( not( fuzzing ) ) ]
502+ #[ cfg( not( secp256k1_fuzz ) ) ]
503503impl Ord for KeyPair {
504504 fn cmp ( & self , other : & KeyPair ) -> core:: cmp:: Ordering {
505505 let this = self . public_key ( ) ;
@@ -508,17 +508,17 @@ impl Ord for KeyPair {
508508 }
509509}
510510
511- #[ cfg( not( fuzzing ) ) ]
511+ #[ cfg( not( secp256k1_fuzz ) ) ]
512512impl PartialEq for KeyPair {
513513 fn eq ( & self , other : & Self ) -> bool {
514514 self . cmp ( other) == core:: cmp:: Ordering :: Equal
515515 }
516516}
517517
518- #[ cfg( not( fuzzing ) ) ]
518+ #[ cfg( not( secp256k1_fuzz ) ) ]
519519impl Eq for KeyPair { }
520520
521- #[ cfg( not( fuzzing ) ) ]
521+ #[ cfg( not( secp256k1_fuzz ) ) ]
522522impl core:: hash:: Hash for KeyPair {
523523 fn hash < H : core:: hash:: Hasher > ( & self , state : & mut H ) {
524524 // To hash the key pair we just hash the serialized public key. Since any change to the
@@ -615,7 +615,7 @@ extern "C" {
615615 -> c_int ;
616616}
617617
618- #[ cfg( not( fuzzing ) ) ]
618+ #[ cfg( not( secp256k1_fuzz ) ) ]
619619extern "C" {
620620 // Contexts
621621 #[ cfg_attr( not( rust_secp_no_symbol_renaming) , link_name = "rustsecp256k1_v0_8_1_context_preallocated_size" ) ]
@@ -996,7 +996,7 @@ impl<T> CPtr for [T] {
996996 }
997997}
998998
999- #[ cfg( fuzzing ) ]
999+ #[ cfg( secp256k1_fuzz ) ]
10001000mod fuzz_dummy {
10011001 use super :: * ;
10021002 use core:: sync:: atomic:: { AtomicUsize , Ordering } ;
@@ -1482,7 +1482,7 @@ mod fuzz_dummy {
14821482 }
14831483}
14841484
1485- #[ cfg( fuzzing ) ]
1485+ #[ cfg( secp256k1_fuzz ) ]
14861486pub use self :: fuzz_dummy:: * ;
14871487
14881488#[ cfg( test) ]
0 commit comments