File tree 2 files changed +1
-47
lines changed
2 files changed +1
-47
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ mod cache;
34
34
pub mod client_auth;
35
35
#[ cfg( any( feature = "dist-client" , feature = "dist-server" ) ) ]
36
36
pub mod http;
37
+
37
38
#[ cfg( test) ]
38
39
mod test;
39
40
Original file line number Diff line number Diff line change @@ -98,53 +98,6 @@ fn create_https_cert_and_privkey_legacy_openssl(
98
98
Ok ( ( cert_digest, cert_pem, privkey_pem) )
99
99
}
100
100
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
-
148
101
#[ test]
149
102
fn certificate_compatibility_assurance ( ) {
150
103
let now: NaiveDateTime = Utc :: now ( ) . naive_utc ( ) ;
You can’t perform that action at this time.
0 commit comments