Mercurial > dropbear
comparison dbrandom.c @ 1561:02b226c2675e fuzz
clean some fuzzing conditionals
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 28 Feb 2018 22:10:43 +0800 |
parents | 2f64cb3d3007 |
children | 60fceff95858 |
comparison
equal
deleted
inserted
replaced
1559:92c93b4a3646 | 1561:02b226c2675e |
---|---|
144 void addrandom(const unsigned char * buf, unsigned int len) | 144 void addrandom(const unsigned char * buf, unsigned int len) |
145 { | 145 { |
146 hash_state hs; | 146 hash_state hs; |
147 | 147 |
148 #if DROPBEAR_FUZZ | 148 #if DROPBEAR_FUZZ |
149 if (fuzz.fuzzing || fuzz.recordf) { | 149 if (fuzz.fuzzing) { |
150 return; | 150 return; |
151 } | 151 } |
152 #endif | 152 #endif |
153 | 153 |
154 /* hash in the new seed data */ | 154 /* hash in the new seed data */ |
162 } | 162 } |
163 | 163 |
164 static void write_urandom() | 164 static void write_urandom() |
165 { | 165 { |
166 #if DROPBEAR_FUZZ | 166 #if DROPBEAR_FUZZ |
167 if (fuzz.fuzzing || fuzz.recordf) { | 167 if (fuzz.fuzzing) { |
168 return; | 168 return; |
169 } | 169 } |
170 #endif | 170 #endif |
171 #if !DROPBEAR_USE_PRNGD | 171 #if !DROPBEAR_USE_PRNGD |
172 /* This is opportunistic, don't worry about failure */ | 172 /* This is opportunistic, don't worry about failure */ |
202 pid_t pid; | 202 pid_t pid; |
203 struct timeval tv; | 203 struct timeval tv; |
204 clock_t clockval; | 204 clock_t clockval; |
205 | 205 |
206 #if DROPBEAR_FUZZ | 206 #if DROPBEAR_FUZZ |
207 if (fuzz.fuzzing || fuzz.recordf) { | 207 if (fuzz.fuzzing) { |
208 return; | 208 return; |
209 } | 209 } |
210 #endif | 210 #endif |
211 | 211 |
212 /* hash in the new seed data */ | 212 /* hash in the new seed data */ |