Add in header fields for per-object encryption/authentication.
[bluesky.git] / bluesky / cloudlog.c
index 9d2fe37..c4cb1ae 100644 (file)
@@ -295,14 +295,14 @@ BlueSkyCloudPointer bluesky_cloudlog_serialize(BlueSkyCloudLog *log,
     GString *data3 = g_string_new("");
     bluesky_serialize_cloudlog(log, data1, data2, data3);
 
-    /* TODO: Right now offset/size are set to the raw data, but we should add
-     * header parsing to the code which loads objects back in. */
     log->location = state->location;
     log->location.offset = state->data->len;
     log->data_size = data1->len;
 
     struct cloudlog_header header;
     memcpy(header.magic, CLOUDLOG_MAGIC, 4);
+    memset(header.crypt_auth, sizeof(header.crypt_auth), 0);
+    memset(header.crypt_iv, sizeof(header.crypt_iv), 0);
     header.type = log->type + '0';
     header.size1 = GUINT32_TO_LE(data1->len);
     header.size2 = GUINT32_TO_LE(data2->len);