X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=ssl%2Fdtls1.h;h=1438b2513117b5de93a0abaa8573e12a411a6fcd;hb=570006f3a2b327d6092566f0a45265251e393823;hp=5ec13720cd259c0508f802b1a705332226a72989;hpb=6c61726b2af78a1985178d31e551351231b54b10;p=oweals%2Fopenssl.git diff --git a/ssl/dtls1.h b/ssl/dtls1.h index 5ec13720cd..1438b25131 100644 --- a/ssl/dtls1.h +++ b/ssl/dtls1.h @@ -67,11 +67,13 @@ extern "C" { #endif -#define DTLS1_VERSION 0x0100 -#define DTLS1_VERSION_MAJOR 0x01 -#define DTLS1_VERSION_MINOR 0x00 +#define DTLS1_VERSION 0xFEFF +#define DTLS1_BAD_VER 0x0100 +#if 0 +/* this alert description is not specified anywhere... */ #define DTLS1_AD_MISSING_HANDSHAKE_MESSAGE 110 +#endif /* lengths of messages */ #define DTLS1_COOKIE_LENGTH 32 @@ -83,16 +85,22 @@ extern "C" { #define DTLS1_HM_BAD_FRAGMENT -2 #define DTLS1_HM_FRAGMENT_RETRY -3 -#define DTLS1_CCS_HEADER_LENGTH 3 +#define DTLS1_CCS_HEADER_LENGTH 1 +#ifdef DTLS1_AD_MISSING_HANDSHAKE_MESSAGE #define DTLS1_AL_HEADER_LENGTH 7 +#else +#define DTLS1_AL_HEADER_LENGTH 2 +#endif typedef struct dtls1_bitmap_st { - BN_ULLONG map; - unsigned long length; /* sizeof the bitmap in bits */ - BN_ULLONG max_seq_num; /* max record number seen so far */ + unsigned long map; /* track 32 packets on 32-bit systems + and 64 - on 64-bit systems */ + unsigned char max_seq_num[8]; /* max record number seen so far, + 64-bit value in big-endian + encoding */ } DTLS1_BITMAP; struct hm_header_st @@ -162,9 +170,6 @@ typedef struct dtls1_state_st unsigned short handshake_read_seq; - /* only matters for handshake messages */ - BN_ULLONG next_expected_seq_num; - /* Received handshake records (processed and unprocessed) */ record_pqueue unprocessed_rcds; record_pqueue processed_rcds;