Drop encryption from the cloud storage backend.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Fri, 10 Sep 2010 00:59:03 +0000 (17:59 -0700)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Fri, 10 Sep 2010 00:59:03 +0000 (17:59 -0700)
Encryption should properly be provided at another layer, so in preparation
for that remove it from the storage layer.

bluesky/store-s3.c

index 8ffc296..e34fafd 100644 (file)
@@ -99,22 +99,15 @@ static void s3store_task(gpointer a, gpointer s)
                       &handler, &info);
 
         if (info.success) {
-            BlueSkyRCStr *raw, *decrypted;
-            raw = bluesky_string_new_from_gstring(info.buf);
-            decrypted = bluesky_crypt_decrypt(raw, store->encryption_key);
-            bluesky_string_unref(raw);
-            async->data = decrypted;
+            async->data = bluesky_string_new_from_gstring(info.buf);
             async->result = 0;
         } else {
             g_string_free(info.buf, TRUE);
         }
 
     } else if (async->op == STORE_OP_PUT) {
-        BlueSkyRCStr *encrypted = bluesky_crypt_encrypt(async->data,
-                                                        store->encryption_key);
-
         struct put_info info;
-        info.val = encrypted;
+        info.val = async->data;
         info.offset = 0;
 
         struct S3PutObjectHandler handler;
@@ -123,11 +116,9 @@ static void s3store_task(gpointer a, gpointer s)
         handler.responseHandler.completeCallback = s3store_response_callback;
         handler.putObjectDataCallback = s3store_put_handler;
 
-        S3_put_object(&store->bucket, async->key, encrypted->len, NULL, NULL,
+        S3_put_object(&store->bucket, async->key, async->data->len, NULL, NULL,
                       &handler, &info);
 
-        bluesky_string_unref(encrypted);
-
         async->result = 0;
     }