The unified diff between revisions [2df88abf..] and [818e3621..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'schema_migration.cc'

#
#
# patch "schema_migration.cc"
#  from [8eac2eece6572cf7e66eee9872afd712559614b4]
#    to [f2d3da73d631a26623c371280391f81266f9863f]
#
============================================================
--- schema_migration.cc	8eac2eece6572cf7e66eee9872afd712559614b4
+++ schema_migration.cc	f2d3da73d631a26623c371280391f81266f9863f
@@ -285,20 +285,20 @@ sqlite3_unbase64_fn(sqlite3_context *f,
       sqlite3_result_error(f, "need exactly 1 arg to unbase64()", -1);
       return;
     }
-  data decoded;
+  string decoded;

   // This operation may throw informative_failure.  We must intercept that
   // and turn it into a call to sqlite3_result_error, or rollback will fail.
   try
     {
-      decode_base64(base64<data>(string(sqlite3_value_cstr(args[0]))), decoded);
+      decoded = decode_base64_as<string>(sqlite3_value_cstr(args[0]));
     }
   catch (informative_failure & e)
     {
       sqlite3_result_error(f, e.what(), -1);
       return;
     }
-  sqlite3_result_blob(f, decoded().c_str(), decoded().size(), SQLITE_TRANSIENT);
+  sqlite3_result_blob(f, decoded.c_str(), decoded.size(), SQLITE_TRANSIENT);
 }

 static void
@@ -527,7 +527,9 @@ migrate_to_external_privkeys(sqlite3 * d

         P(F("moving key '%s' from database to %s")
           % ident % keys.get_key_dir());
-        keys.migrate_old_key_pair(ident, old_priv, pub);
+        keys.migrate_old_key_pair(ident,
+                                  decode_base64(old_priv),
+                                  decode_base64(pub));
       }
   }