coreos/update_engine — pull request #35 by marineam (2014-06-23 22:05:20+00:00)
Title: Update key version to 2

For reference here is the diff from earlier:

```patch
diff --git a/delta_performer_unittest.cc b/delta_performer_unittest.cc
index 272bf1b..3678092 100644
--- a/delta_performer_unittest.cc
+++ b/delta_performer_unittest.cc
@@ -423,7 +423,7 @@ static void ApplyDeltaFile(bool full_kernel, bool full_rootfs, bool noop,
else
EXPECT_EQ(1, sigs_message.signatures_size());
const Signatures_Signature& signature = sigs_message.signatures(0);
- EXPECT_EQ(1, signature.version());
+ EXPECT_EQ(kSignatureMessageCurrentVersion, signature.version());

uint64_t expected_sig_data_length = 0;
vector key_paths (1, kUnittestPrivateKeyPath);
@@ -926,7 +926,9 @@ TEST(DeltaPerformerTest, ValidMandatoryMetadataSizeTest) {
DoMetadataSizeTest(85376, 85376, true);
}

-TEST(DeltaPerformerTest, RunAsRootMandatoryEmptyMetadataSignatureTest) {
+// TODO: These metadata signature tests can be removed but not before further study
+// to ensure that all the code that used to support this functionality is gone.
+TEST(DeltaPerformerTest, DISABLED_RunAsRootMandatoryEmptyMetadataSignatureTest) {
DoMetadataSignatureTest(kEmptyMetadataSignature, kSignatureGenerated, true);
}

@@ -934,7 +936,7 @@ TEST(DeltaPerformerTest, RunAsRootNonMandatoryEmptyMetadataSignatureTest) {
DoMetadataSignatureTest(kEmptyMetadataSignature, kSignatureGenerated, false);
}

-TEST(DeltaPerformerTest, RunAsRootMandatoryInvalidMetadataSignatureTest) {
+TEST(DeltaPerformerTest, DISABLED_RunAsRootMandatoryInvalidMetadataSignatureTest) {
DoMetadataSignatureTest(kInvalidMetadataSignature, kSignatureGenerated, true);
}

diff --git a/utils_unittest.cc b/utils_unittest.cc
index a7ac338..f4e3431 100644
--- a/utils_unittest.cc
+++ b/utils_unittest.cc
@@ -239,7 +239,7 @@ gboolean TerminateScheduleCrashReporterUploadTest(void* arg) {
}
} // namespace {}

-TEST(UtilsTest, ScheduleCrashReporterUploadTest) {
+TEST(UtilsTest, DISABLED_ScheduleCrashReporterUploadTest) {
// Not much to test. At least this tests for memory leaks, crashes,
// log errors.
GMainLoop* loop = g_main_loop_new(g_main_context_default(), FALSE);
```