mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-29 08:19:42 +08:00
Add MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN
And set to 1024 for mOS. PUBLISHED_FROM=ee3a66ad935cfb50355ebd7bae59c8230914878d
This commit is contained in:
parent
d6ba37dc3c
commit
4072062b72
18
mongoose.c
18
mongoose.c
@ -4388,6 +4388,24 @@ enum mg_ssl_if_result mg_ssl_if_conn_init(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN
|
||||||
|
if (mbedtls_ssl_conf_max_frag_len(ctx->conf,
|
||||||
|
#if MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN == 512
|
||||||
|
MBEDTLS_SSL_MAX_FRAG_LEN_512
|
||||||
|
#elif MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN == 1024
|
||||||
|
MBEDTLS_SSL_MAX_FRAG_LEN_1024
|
||||||
|
#elif MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN == 2048
|
||||||
|
MBEDTLS_SSL_MAX_FRAG_LEN_2048
|
||||||
|
#elif MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN == 4096
|
||||||
|
MBEDTLS_SSL_MAX_FRAG_LEN_4096
|
||||||
|
#else
|
||||||
|
#error Invalid MG_SSL_IF_MBEDTLS_MAX_FRAG_LEN
|
||||||
|
#endif
|
||||||
|
) != 0) {
|
||||||
|
return MG_SSL_ERROR;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
nc->flags |= MG_F_SSL;
|
nc->flags |= MG_F_SSL;
|
||||||
|
|
||||||
return MG_SSL_OK;
|
return MG_SSL_OK;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user