mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Redo of PR#5345. Fixed spelling and typographical errors found by CodeSpell.
Signed-off-by: Shaun Case <warmsocks@gmail.com> Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
@ -35,10 +35,10 @@ make
|
||||
Finally, you can run the targets like `./test/fuzz/fuzz_client`.
|
||||
|
||||
|
||||
Corpus generation for network trafic targets
|
||||
Corpus generation for network traffic targets
|
||||
------
|
||||
|
||||
These targets use network trafic as inputs :
|
||||
These targets use network traffic as inputs :
|
||||
* client : simulates a client against (fuzzed) server traffic
|
||||
* server : simulates a server against (fuzzed) client traffic
|
||||
* dtls_client
|
||||
@ -48,7 +48,7 @@ They also use the last bytes as configuration options.
|
||||
|
||||
To generate corpus for these targets, you can do the following, not fully automated steps :
|
||||
* Build mbedtls programs ssl_server2 and ssl_client2
|
||||
* Run them one against the other with `reproducible` option turned on while capturing trafic into test.pcap
|
||||
* Run them one against the other with `reproducible` option turned on while capturing traffic into test.pcap
|
||||
* Extract tcp payloads, for instance with tshark : `tshark -Tfields -e tcp.dstport -e tcp.payload -r test.pcap > test.txt`
|
||||
* Run a dummy python script to output either client or server corpus file like `python dummy.py test.txt > test.cor`
|
||||
* Finally, you can add the options by appending the last bytes to the file test.cor
|
||||
|
@ -47,7 +47,7 @@ int main(int argc, char** argv)
|
||||
return 2;
|
||||
}
|
||||
|
||||
//lauch fuzzer
|
||||
//launch fuzzer
|
||||
LLVMFuzzerTestOneInput(Data, Size);
|
||||
free(Data);
|
||||
fclose(fp);
|
||||
|
@ -37,7 +37,7 @@
|
||||
* dominate memory usage in small configurations. For the sake of simplicity,
|
||||
* only a Unix version is implemented.
|
||||
*
|
||||
* Warning: we are breaking some of the abtractions from the NET layer here.
|
||||
* Warning: we are breaking some of the abstractions from the NET layer here.
|
||||
* This is not a good example for general use. This programs has the specific
|
||||
* goal of minimizing use of the libc functions on full-blown OSes.
|
||||
*/
|
||||
|
@ -507,7 +507,7 @@ struct options
|
||||
int transport; /* TLS or DTLS? */
|
||||
uint32_t hs_to_min; /* Initial value of DTLS handshake timer */
|
||||
uint32_t hs_to_max; /* Max value of DTLS handshake timer */
|
||||
int dtls_mtu; /* UDP Maximum tranport unit for DTLS */
|
||||
int dtls_mtu; /* UDP Maximum transport unit for DTLS */
|
||||
int fallback; /* is this a fallback connection? */
|
||||
int dgram_packing; /* allow/forbid datagram packing */
|
||||
int extended_ms; /* negotiate extended master secret? */
|
||||
|
@ -651,7 +651,7 @@ struct options
|
||||
int anti_replay; /* Use anti-replay for DTLS? -1 for default */
|
||||
uint32_t hs_to_min; /* Initial value of DTLS handshake timer */
|
||||
uint32_t hs_to_max; /* Max value of DTLS handshake timer */
|
||||
int dtls_mtu; /* UDP Maximum tranport unit for DTLS */
|
||||
int dtls_mtu; /* UDP Maximum transport unit for DTLS */
|
||||
int dgram_packing; /* allow/forbid datagram packing */
|
||||
int badmac_limit; /* Limit of records with bad MAC */
|
||||
int eap_tls; /* derive EAP-TLS keying material? */
|
||||
|
@ -278,7 +278,7 @@ int ca_callback( void *data, mbedtls_x509_crt const *child,
|
||||
|
||||
/*
|
||||
* Test recv/send functions that make sure each try returns
|
||||
* WANT_READ/WANT_WRITE at least once before sucesseding
|
||||
* WANT_READ/WANT_WRITE at least once before succeeding
|
||||
*/
|
||||
int delayed_recv( void *ctx, unsigned char *buf, size_t len );
|
||||
int delayed_send( void *ctx, const unsigned char *buf, size_t len );
|
||||
|
@ -179,7 +179,7 @@ do { \
|
||||
*
|
||||
* This computes the maximum length of a title +3, because we appends "/s" and
|
||||
* want at least one space. (If the value is too small, the only consequence
|
||||
* is poor alignement.) */
|
||||
* is poor alignment.) */
|
||||
#define TITLE_SPACE 17
|
||||
|
||||
#define MEMORY_MEASURE_INIT \
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* UDP proxy: emulate an unreliable UDP connexion for DTLS testing
|
||||
* UDP proxy: emulate an unreliable UDP connection for DTLS testing
|
||||
*
|
||||
* Copyright The Mbed TLS Contributors
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
|
@ -63,7 +63,7 @@ int main( int argc, char** argv )
|
||||
|
||||
if( argc != 2 )
|
||||
{
|
||||
mbedtls_printf( "This program takes exactly 1 agument\n" );
|
||||
mbedtls_printf( "This program takes exactly 1 argument\n" );
|
||||
usage();
|
||||
mbedtls_exit( exit_code );
|
||||
}
|
||||
|
Reference in New Issue
Block a user