File tree Expand file tree Collapse file tree 2 files changed +1
-47
lines changed Expand file tree Collapse file tree 2 files changed +1
-47
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ mod cache;
3434pub mod client_auth;
3535#[ cfg( any( feature = "dist-client" , feature = "dist-server" ) ) ]
3636pub mod http;
37+
3738#[ cfg( test) ]
3839mod test;
3940
Original file line number Diff line number Diff line change @@ -98,53 +98,6 @@ fn create_https_cert_and_privkey_legacy_openssl(
9898 Ok ( ( cert_digest, cert_pem, privkey_pem) )
9999}
100100
101- #[ allow( dead_code) ]
102- #[ derive( Default , Debug , Clone , Copy ) ]
103- struct FlipperRng ( u8 ) ;
104-
105- use rand:: CryptoRng ;
106-
107- impl FlipperRng {
108- fn next_byte ( & mut self ) -> u8 {
109- let v = self . 0 ;
110- self . 0 = self . 0 . wrapping_add ( 17 ) ;
111- v
112- }
113-
114- fn fill_array < const N : usize > ( & mut self , dest : & mut [ u8 ; N ] ) {
115- #[ allow( clippy:: needless_range_loop) ]
116- for i in 0 ..N {
117- dest[ i] = self . next_byte ( ) ;
118- }
119- }
120- }
121- impl CryptoRng for FlipperRng { }
122-
123- impl RngCore for FlipperRng {
124- fn next_u32 ( & mut self ) -> u32 {
125- let mut v = [ 0u8 ; 4 ] ;
126- self . fill_array ( & mut v) ;
127- u32:: from_le_bytes ( v)
128- }
129-
130- fn next_u64 ( & mut self ) -> u64 {
131- let mut v = [ 0u8 ; 8 ] ;
132- self . fill_array ( & mut v) ;
133- u64:: from_le_bytes ( v)
134- }
135-
136- fn fill_bytes ( & mut self , dest : & mut [ u8 ] ) {
137- for byte in dest {
138- * byte = self . next_byte ( ) ;
139- }
140- }
141-
142- fn try_fill_bytes ( & mut self , dest : & mut [ u8 ] ) -> std:: result:: Result < ( ) , rand:: Error > {
143- self . fill_bytes ( dest) ;
144- Ok ( ( ) )
145- }
146- }
147-
148101#[ test]
149102fn certificate_compatibility_assurance ( ) {
150103 let now: NaiveDateTime = Utc :: now ( ) . naive_utc ( ) ;
You can’t perform that action at this time.
0 commit comments