Changes from 1.0.0-stable.
[openssl.git] / ssl / dtls1.h
index b377cc5f6b2d29d8c92c57344229842904d48c53..6548a98f035168421f5acd987c9bc26fd323ccb1 100644 (file)
 extern "C" {
 #endif
 
-#define DTLS1_VERSION                  0x0100
-#define DTLS1_VERSION_MAJOR            0x01
-#define DTLS1_VERSION_MINOR            0x00
+#define DTLS1_VERSION                  0xFEFF
 
+#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 +84,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
        {
-       PQ_64BIT map;
-       unsigned long length;     /* sizeof the bitmap in bits */
-       PQ_64BIT 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