mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 19:54:40 +02:00
allow user to set session timeout at compile time w/ CYASSL_SESSION_TIMEOUT
This commit is contained in:
@@ -623,6 +623,12 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef CYASSL_SESSION_TIMEOUT
|
||||||
|
#define CYASSL_SESSION_TIMEOUT 500
|
||||||
|
/* default session resumption cache timeout in seconds */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
enum Misc {
|
enum Misc {
|
||||||
ECC_BYTE = 0xC0, /* ECC first cipher suite byte */
|
ECC_BYTE = 0xC0, /* ECC first cipher suite byte */
|
||||||
CHACHA_BYTE = 0xCC, /* ChaCha first cipher suite */
|
CHACHA_BYTE = 0xCC, /* ChaCha first cipher suite */
|
||||||
@@ -771,7 +777,6 @@ enum Misc {
|
|||||||
MAX_CERT_VERIFY_SZ = 1024, /* max */
|
MAX_CERT_VERIFY_SZ = 1024, /* max */
|
||||||
CLIENT_HELLO_FIRST = 35, /* Protocol + RAN_LEN + sizeof(id_len) */
|
CLIENT_HELLO_FIRST = 35, /* Protocol + RAN_LEN + sizeof(id_len) */
|
||||||
MAX_SUITE_NAME = 48, /* maximum length of cipher suite string */
|
MAX_SUITE_NAME = 48, /* maximum length of cipher suite string */
|
||||||
DEFAULT_TIMEOUT = 500, /* default resumption timeout in seconds */
|
|
||||||
|
|
||||||
DTLS_TIMEOUT_INIT = 1, /* default timeout init for DTLS receive */
|
DTLS_TIMEOUT_INIT = 1, /* default timeout init for DTLS receive */
|
||||||
DTLS_TIMEOUT_MAX = 64, /* default max timeout for DTLS receive */
|
DTLS_TIMEOUT_MAX = 64, /* default max timeout for DTLS receive */
|
||||||
|
@@ -380,7 +380,7 @@ int InitSSL_Ctx(CYASSL_CTX* ctx, CYASSL_METHOD* method)
|
|||||||
ctx->userdata = 0;
|
ctx->userdata = 0;
|
||||||
#endif /* OPENSSL_EXTRA */
|
#endif /* OPENSSL_EXTRA */
|
||||||
|
|
||||||
ctx->timeout = DEFAULT_TIMEOUT;
|
ctx->timeout = CYASSL_SESSION_TIMEOUT;
|
||||||
|
|
||||||
#ifndef CYASSL_USER_IO
|
#ifndef CYASSL_USER_IO
|
||||||
ctx->CBIORecv = EmbedReceive;
|
ctx->CBIORecv = EmbedReceive;
|
||||||
|
Reference in New Issue
Block a user