mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Add option for serialization in ssl_client/server2
This commit is contained in:
@ -171,6 +171,8 @@ int main( void )
|
||||
#define DFL_DGRAM_PACKING 1
|
||||
#define DFL_EXTENDED_MS -1
|
||||
#define DFL_ETM -1
|
||||
#define DFL_SERIALIZE 0
|
||||
#define DFL_EXTENDED_MS_ENFORCE -1
|
||||
#define DFL_CA_CALLBACK 0
|
||||
#define DFL_EAP_TLS 0
|
||||
#define DFL_REPRODUCIBLE 0
|
||||
@ -499,6 +501,7 @@ int main( void )
|
||||
" configuration macro is defined and 1\n" \
|
||||
" otherwise. The expansion of the macro\n" \
|
||||
" is printed if it is defined\n" \
|
||||
" serialize=%%d default: 0 (do not serialize/deserialize)\n" \
|
||||
" acceptable ciphersuite names:\n"
|
||||
|
||||
#define ALPN_LIST_SIZE 10
|
||||
@ -590,6 +593,7 @@ struct options
|
||||
int cid_enabled_renego; /* whether to use the CID extension or not
|
||||
* during renegotiation */
|
||||
const char *cid_val; /* the CID to use for incoming messages */
|
||||
int serialize; /* serialize/deserialize connection */
|
||||
const char *cid_val_renego; /* the CID to use for incoming messages
|
||||
* after renegotiation */
|
||||
int reproducible; /* make communication reproducible */
|
||||
@ -1872,6 +1876,7 @@ int main( int argc, char *argv[] )
|
||||
opt.badmac_limit = DFL_BADMAC_LIMIT;
|
||||
opt.extended_ms = DFL_EXTENDED_MS;
|
||||
opt.etm = DFL_ETM;
|
||||
opt.serialize = DFL_SERIALIZE;
|
||||
opt.eap_tls = DFL_EAP_TLS;
|
||||
opt.reproducible = DFL_REPRODUCIBLE;
|
||||
|
||||
@ -2286,6 +2291,12 @@ int main( int argc, char *argv[] )
|
||||
{
|
||||
return query_config( q );
|
||||
}
|
||||
else if( strcmp( p, "serialize") == 0 )
|
||||
{
|
||||
opt.serialize = atoi( q );
|
||||
if( opt.serialize < 0 || opt.serialize > 1)
|
||||
goto usage;
|
||||
}
|
||||
else if( strcmp( p, "eap_tls" ) == 0 )
|
||||
{
|
||||
opt.eap_tls = atoi( q );
|
||||
|
Reference in New Issue
Block a user