summaryrefslogtreecommitdiff
path: root/lib/gnutls_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/gnutls_int.h')
-rw-r--r--lib/gnutls_int.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 0a2d21256a..aa7c9f7f1d 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -185,9 +185,12 @@ typedef enum record_send_state_t {
#define DEFAULT_MAX_RECORD_SIZE 16384
#define DEFAULT_MAX_EARLY_DATA_SIZE 16384
#define TLS_RECORD_HEADER_SIZE 5
-#define DTLS_RECORD_HEADER_SIZE (TLS_RECORD_HEADER_SIZE+8)
-#define RECORD_HEADER_SIZE(session) (IS_DTLS(session) ? DTLS_RECORD_HEADER_SIZE : TLS_RECORD_HEADER_SIZE)
-#define MAX_RECORD_HEADER_SIZE DTLS_RECORD_HEADER_SIZE
+#define DTLS13_RECORD_HEADER_SIZE 5 //Will be made dynamic
+#define DTLS_RECORD_HEADER_SIZE TLS_RECORD_HEADER_SIZE+8
+#define DTLS_RESOLVE_RECORD_HEADER_SIZE(session) (session->security_parameters.pversion->tls13_sem && session->security_parameters.epoch_write>1) ? DTLS13_RECORD_HEADER_SIZE : DTLS_RECORD_HEADER_SIZE
+
+#define RECORD_HEADER_SIZE(session) (IS_DTLS(session) ? DTLS_RESOLVE_RECORD_HEADER_SIZE(session) : TLS_RECORD_HEADER_SIZE)
+#define MAX_RECORD_HEADER_SIZE TLS_RECORD_HEADER_SIZE+8
#define MIN_RECORD_SIZE 512
#define MIN_RECORD_SIZE_SMALL 64