Added member fields for reserved bits and bytes in all payloads
[strongswan.git] / src / libcharon / encoding / payloads / cert_payload.c
index 6b96d2e..814ec27 100644 (file)
@@ -63,6 +63,11 @@ struct private_cert_payload_t {
        bool critical;
 
        /**
+        * reserved bits
+        */
+       bool reserved[7];
+
+       /**
         * Length of this payload.
         */
        u_int16_t payload_length;
@@ -96,13 +101,13 @@ encoding_rule_t cert_payload_encodings[] = {
        /* the critical bit */
        { FLAG,                         offsetof(private_cert_payload_t, critical)              },
        /* 7 Bit reserved bits, nowhere stored */
-       { RESERVED_BIT,         0                                                                                               },
-       { RESERVED_BIT,         0                                                                                               },
-       { RESERVED_BIT,         0                                                                                               },
-       { RESERVED_BIT,         0                                                                                               },
-       { RESERVED_BIT,         0                                                                                               },
-       { RESERVED_BIT,         0                                                                                               },
-       { RESERVED_BIT,         0                                                                                               },
+       { RESERVED_BIT,         offsetof(private_cert_payload_t, reserved[0])   },
+       { RESERVED_BIT,         offsetof(private_cert_payload_t, reserved[1])   },
+       { RESERVED_BIT,         offsetof(private_cert_payload_t, reserved[2])   },
+       { RESERVED_BIT,         offsetof(private_cert_payload_t, reserved[3])   },
+       { RESERVED_BIT,         offsetof(private_cert_payload_t, reserved[4])   },
+       { RESERVED_BIT,         offsetof(private_cert_payload_t, reserved[5])   },
+       { RESERVED_BIT,         offsetof(private_cert_payload_t, reserved[6])   },
        /* Length of the whole payload*/
        { PAYLOAD_LENGTH,       offsetof(private_cert_payload_t, payload_length)},
        /* 1 Byte CERT type*/