diff --git a/programs/ssl/ssl_client2.c b/programs/ssl/ssl_client2.c index 0d7cb667e..eaaacac9c 100644 --- a/programs/ssl/ssl_client2.c +++ b/programs/ssl/ssl_client2.c @@ -132,6 +132,8 @@ int main( void ) #define DFL_FALLBACK -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 @@ -411,6 +413,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 @@ -483,6 +486,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 */ @@ -1186,6 +1190,7 @@ int main( int argc, char *argv[] ) opt.extended_ms = DFL_EXTENDED_MS; opt.etm = DFL_ETM; opt.dgram_packing = DFL_DGRAM_PACKING; + opt.serialize = DFL_SERIALIZE; opt.eap_tls = DFL_EAP_TLS; opt.reproducible = DFL_REPRODUCIBLE; @@ -1574,6 +1579,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 ); diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c index 3279cda9e..7c431a01a 100644 --- a/programs/ssl/ssl_server2.c +++ b/programs/ssl/ssl_server2.c @@ -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 );