Add option for serialization in ssl_client/server2
diff --git a/programs/ssl/ssl_server2.c b/programs/ssl/ssl_server2.c
index b048bc7..f09b404 100644
--- a/programs/ssl/ssl_server2.c
+++ b/programs/ssl/ssl_server2.c
@@ -163,6 +163,7 @@
#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 LONG_RESPONSE "<p>01-blah-blah-blah-blah-blah-blah-blah-blah-blah\r\n" \
@@ -445,6 +446,7 @@
" 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"
@@ -542,6 +544,7 @@
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 */
} opt;
@@ -1500,6 +1503,7 @@
opt.extended_ms = DFL_EXTENDED_MS;
opt.enforce_extended_master_secret = DFL_EXTENDED_MS_ENFORCE;
opt.etm = DFL_ETM;
+ opt.serialize = DFL_SERIALIZE;
for( i = 1; i < argc; i++ )
{
@@ -1917,6 +1921,12 @@
{
return query_config( q );
}
+ else if( strcmp( p, "serialize") == 0 )
+ {
+ opt.serialize = atoi( q );
+ if( opt.serialize < 0 || opt.serialize > 1)
+ goto usage;
+ }
else
goto usage;
}