mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-22 15:30:57 +00:00
Add option for serialization in ssl_client/server2
This commit is contained in:
parent
d0a86f96dc
commit
9831c8a14c
|
@ -132,6 +132,8 @@ int main( void )
|
||||||
#define DFL_FALLBACK -1
|
#define DFL_FALLBACK -1
|
||||||
#define DFL_EXTENDED_MS -1
|
#define DFL_EXTENDED_MS -1
|
||||||
#define DFL_ETM -1
|
#define DFL_ETM -1
|
||||||
|
#define DFL_SERIALIZE 0
|
||||||
|
#define DFL_EXTENDED_MS_ENFORCE -1
|
||||||
#define DFL_CA_CALLBACK 0
|
#define DFL_CA_CALLBACK 0
|
||||||
#define DFL_EAP_TLS 0
|
#define DFL_EAP_TLS 0
|
||||||
#define DFL_REPRODUCIBLE 0
|
#define DFL_REPRODUCIBLE 0
|
||||||
|
@ -411,6 +413,7 @@ int main( void )
|
||||||
" configuration macro is defined and 1\n" \
|
" configuration macro is defined and 1\n" \
|
||||||
" otherwise. The expansion of the macro\n" \
|
" otherwise. The expansion of the macro\n" \
|
||||||
" is printed if it is defined\n" \
|
" is printed if it is defined\n" \
|
||||||
|
" serialize=%%d default: 0 (do not serialize/deserialize)\n" \
|
||||||
" acceptable ciphersuite names:\n"
|
" acceptable ciphersuite names:\n"
|
||||||
|
|
||||||
#define ALPN_LIST_SIZE 10
|
#define ALPN_LIST_SIZE 10
|
||||||
|
@ -483,6 +486,7 @@ struct options
|
||||||
int cid_enabled_renego; /* whether to use the CID extension or not
|
int cid_enabled_renego; /* whether to use the CID extension or not
|
||||||
* during renegotiation */
|
* during renegotiation */
|
||||||
const char *cid_val; /* the CID to use for incoming messages */
|
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
|
const char *cid_val_renego; /* the CID to use for incoming messages
|
||||||
* after renegotiation */
|
* after renegotiation */
|
||||||
int reproducible; /* make communication reproducible */
|
int reproducible; /* make communication reproducible */
|
||||||
|
@ -1186,6 +1190,7 @@ int main( int argc, char *argv[] )
|
||||||
opt.extended_ms = DFL_EXTENDED_MS;
|
opt.extended_ms = DFL_EXTENDED_MS;
|
||||||
opt.etm = DFL_ETM;
|
opt.etm = DFL_ETM;
|
||||||
opt.dgram_packing = DFL_DGRAM_PACKING;
|
opt.dgram_packing = DFL_DGRAM_PACKING;
|
||||||
|
opt.serialize = DFL_SERIALIZE;
|
||||||
opt.eap_tls = DFL_EAP_TLS;
|
opt.eap_tls = DFL_EAP_TLS;
|
||||||
opt.reproducible = DFL_REPRODUCIBLE;
|
opt.reproducible = DFL_REPRODUCIBLE;
|
||||||
|
|
||||||
|
@ -1574,6 +1579,12 @@ int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
return query_config( q );
|
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 )
|
else if( strcmp( p, "eap_tls" ) == 0 )
|
||||||
{
|
{
|
||||||
opt.eap_tls = atoi( q );
|
opt.eap_tls = atoi( q );
|
||||||
|
|
|
@ -171,6 +171,8 @@ int main( void )
|
||||||
#define DFL_DGRAM_PACKING 1
|
#define DFL_DGRAM_PACKING 1
|
||||||
#define DFL_EXTENDED_MS -1
|
#define DFL_EXTENDED_MS -1
|
||||||
#define DFL_ETM -1
|
#define DFL_ETM -1
|
||||||
|
#define DFL_SERIALIZE 0
|
||||||
|
#define DFL_EXTENDED_MS_ENFORCE -1
|
||||||
#define DFL_CA_CALLBACK 0
|
#define DFL_CA_CALLBACK 0
|
||||||
#define DFL_EAP_TLS 0
|
#define DFL_EAP_TLS 0
|
||||||
#define DFL_REPRODUCIBLE 0
|
#define DFL_REPRODUCIBLE 0
|
||||||
|
@ -499,6 +501,7 @@ int main( void )
|
||||||
" configuration macro is defined and 1\n" \
|
" configuration macro is defined and 1\n" \
|
||||||
" otherwise. The expansion of the macro\n" \
|
" otherwise. The expansion of the macro\n" \
|
||||||
" is printed if it is defined\n" \
|
" is printed if it is defined\n" \
|
||||||
|
" serialize=%%d default: 0 (do not serialize/deserialize)\n" \
|
||||||
" acceptable ciphersuite names:\n"
|
" acceptable ciphersuite names:\n"
|
||||||
|
|
||||||
#define ALPN_LIST_SIZE 10
|
#define ALPN_LIST_SIZE 10
|
||||||
|
@ -590,6 +593,7 @@ struct options
|
||||||
int cid_enabled_renego; /* whether to use the CID extension or not
|
int cid_enabled_renego; /* whether to use the CID extension or not
|
||||||
* during renegotiation */
|
* during renegotiation */
|
||||||
const char *cid_val; /* the CID to use for incoming messages */
|
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
|
const char *cid_val_renego; /* the CID to use for incoming messages
|
||||||
* after renegotiation */
|
* after renegotiation */
|
||||||
int reproducible; /* make communication reproducible */
|
int reproducible; /* make communication reproducible */
|
||||||
|
@ -1872,6 +1876,7 @@ int main( int argc, char *argv[] )
|
||||||
opt.badmac_limit = DFL_BADMAC_LIMIT;
|
opt.badmac_limit = DFL_BADMAC_LIMIT;
|
||||||
opt.extended_ms = DFL_EXTENDED_MS;
|
opt.extended_ms = DFL_EXTENDED_MS;
|
||||||
opt.etm = DFL_ETM;
|
opt.etm = DFL_ETM;
|
||||||
|
opt.serialize = DFL_SERIALIZE;
|
||||||
opt.eap_tls = DFL_EAP_TLS;
|
opt.eap_tls = DFL_EAP_TLS;
|
||||||
opt.reproducible = DFL_REPRODUCIBLE;
|
opt.reproducible = DFL_REPRODUCIBLE;
|
||||||
|
|
||||||
|
@ -2286,6 +2291,12 @@ int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
return query_config( q );
|
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 )
|
else if( strcmp( p, "eap_tls" ) == 0 )
|
||||||
{
|
{
|
||||||
opt.eap_tls = atoi( q );
|
opt.eap_tls = atoi( q );
|
||||||
|
|
Loading…
Reference in a new issue