14c0da88a93aa7b1aa71d5e7e923b537f0d419f3 |
|
21-Jul-2016 |
Alex Deymo <deymo@google.com> |
Remove libcurl support from update_engine_sideload. While sideloading an update from recovery we don't need nor want to download payload from HTTP(S) URLs, only local file:// are supported. This patch moves libcurl_http_fetcher and certificate_checker files out of libpayload_consumer dropping the libcurl and libssl dependencies from it and the update_engine_sideload. Bug: 27178350 TEST=build UE for Brillo and Android. Unittests still pass and update_engine_sideload doesn't link to libcurl. Change-Id: Iffefdb094654f7277dc825c041fe55aac9ee8756
/system/update_engine/certificate_checker.cc
|
39910dcd1d68987ccee7c3031dc269233a8490bb |
|
10-Nov-2015 |
Alex Deymo <deymo@google.com> |
Split payload application code into a subdirectory. This patch splits from the main libupdate_engine code the part that is strictly used to download and apply a payload into a new static library, moving the code to subdirectories. The new library is divided in two subdirectories: common/ and payload_consumer/, and should not depend on other update_engine files outside those two subdirectories. The main difference between those two is that the common/ tools are more generic and not tied to the payload consumer process, but otherwise they are both compiled together. There are still dependencies from the new libpayload_consumer library into the main directory files and DBus generated files. Those will be addressed in follow up CLs. Bug: 25197634 Test: FEATURES=test emerge-link update_engine; `mm` on Brillo. Change-Id: Id8d0204ea573627e6e26ca9ea17b9592ca95bc23
/system/update_engine/certificate_checker.cc
|
aea4c1cea20dda7ae7e85fc8924a2d784f70d806 |
|
20-Aug-2015 |
Alex Deymo <deymo@google.com> |
Re-license update_engine to Apache2 This patch automatically replaced the license on all text files from Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as a reference. The license header was added to .gyp and .gypi files, the NOTICE was replaced with a copy of the Apache2 license and MODULE_LICENSE_* file was updated. BUG=b/23084294 TEST=grep 'Chromium OS Authors' doesn't find anything. Change-Id: Ie5083750755f5180a8a785b24fe67dbf9195cd10
/system/update_engine/certificate_checker.cc
|
f68bbbc952aa9a71898e4939b5f36187fa564a50 |
|
09-Feb-2015 |
Alex Vakulenko <avakulenko@chromium.org> |
update_engine: replace std::vector<char> with chromeos::Blob To make update engine consistent with the rest of platform2 code replaced std::vector<char> as the container of binary data with chromeos::Blob. BUG=None TEST=`FEATURES=test emerge-link update_engine` Change-Id: I6385fd2257d15aa24bfa74ac35512c2a06c33012 Reviewed-on: https://chromium-review.googlesource.com/247793 Reviewed-by: Gilad Arnold <garnold@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/certificate_checker.cc
|
88b591f24cb3f94f982d7024c2e8ed25c2cc26a2 |
|
29-Aug-2014 |
Alex Vakulenko <avakulenko@chromium.org> |
update_engine: Replace NULL with nullptr Replaced the usage of NULL with nullptr. This also makes it possible to use standard gtest macros to compare pointers in Update Manager's unit tests. So, there is no need in custom UMTEST_... macros which are replaced with the gtest macros (see change in update_engine/update_manager/umtest_utils.h): UMTEST_ASSERT_NULL(p) => ASSERT_EQ(nullptr, p) UMTEST_ASSERT_NOT_NULL(p) => ASSERT_NE(nullptr, p) UMTEST_EXPECT_NULL(p) => EXPECT_EQ(nullptr, p) UMTEST_EXPECT_NOT_NULL(p) => EXPECT_NE(nullptr, p) BUG=None TEST=FEATURES=test emerge-link update_engine USE="clang asan" FEATURES=test emerge-link update_engine Change-Id: I77a42a1e9ce992bb2f9f263db5cf75fe6110a4ec Reviewed-on: https://chromium-review.googlesource.com/215136 Tested-by: Alex Vakulenko <avakulenko@chromium.org> Reviewed-by: Alex Deymo <deymo@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/certificate_checker.cc
|
d2779df63aaad8b65fc5d4badee7dbc9bed7f2b6 |
|
16-Jun-2014 |
Alex Vakulenko <avakulenko@chromium.org> |
update_engine: fixed warnings from cpplint Fixed all the cpplint warnings in update engine. BUG=None TEST=Unit tests still pass. Change-Id: I285ae858eec8abe0b26ff203b99a42a200ceb71c Reviewed-on: https://chromium-review.googlesource.com/204027 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/certificate_checker.cc
|
1f84723f499b3b309efac11324ed4e6c937341b6 |
|
07-Apr-2014 |
Gilad Arnold <garnold@chromium.org> |
Revise the SystemState hierarchy. * Removed all #includes from SystemState; added includes in .cc files that use the various objects (MetricsLibrary, DevicePolicy, etc). * MockSystemState: - Regulated the set of getters/setters: foo() returns the current Foo object interface; this object can be overridden by set_foo(); mock_foo() or fake_foo() returns the default (internal) mock/fake equivalent, and fails if it is different from foo() (safety). - Make member declaration order consistent with that of API. - Removed MOCK_METHOD declarations for two methods and replaced them with fake getter/setter. This means that MockSystemState is now reduced to a fake, and can be renamed (separate CL). This also means that a few tests have a slightly different semantics now. * All virtual overrides are qualified as such. However, removed the 'const' method qualified from all getters: it made little sense, especially when considering that getters are handing addresses of internal mock members. * Made the UpdateAttempter a contained member of both {Real,Mock}SystemState, resolving initialization dependencies. In general, the invariant is that all members of the SystemState that rely on it being fully populated by the time of their initialization, need to export a separate Init() method, that will be called (by the SystemState implementation constructor or Init() method) only after all members are set. * Made the mock GPIO handler and connection manager contained members of MockSystemState; the destructor could safely be moved. * Cleanup in UpdateAttempter (part of resolving dependencies): - Ordinary member initialization done via default initializers (constants) or initializer list in the constructor (parameters). - Init() method only does work that cannot be done during construction, with appropriate comment documenting the need for it. - Better reuse via constructor delegation. BUG=chromium:358278 TEST=Unit tests. Change-Id: I96ff6fc7e7400b0a9feb6cc8d4ffe97a51000f91 Reviewed-on: https://chromium-review.googlesource.com/193587 Reviewed-by: Gilad Arnold <garnold@chromium.org> Tested-by: Gilad Arnold <garnold@chromium.org> Commit-Queue: David Zeuthen <zeuthen@chromium.org>
/system/update_engine/certificate_checker.cc
|
75039d7397f03dff77bdf4e26398049ff88edc4c |
|
25-Mar-2014 |
Alex Vakulenko <avakulenko@chromium.org> |
update_engine: update to libbase 242728 Made update_engine link with libchrome-242728 and fixed compile issues due to changes in namespaces and include file layout. Also removed some of suppressed compiler warnings and fixed the issues masked by them (e.g. mismatched printf-like specifiers). Added -Wextra compiler option to enable additional useful warnings to ensure more strict checking... Had to disable "unused-parameter" though since we have a lot of functions (mainly in fakes) that do not use all of their parameters. BUG=chromium:351593 TEST=Unit tests passed. CQ-DEPEND=CL:191721 Change-Id: I1aa63a48d5f1f4ea75ba6b00aec7aa5f3bad15c4 Reviewed-on: https://chromium-review.googlesource.com/191510 Reviewed-by: Alex Vakulenko <avakulenko@chromium.org> Commit-Queue: Alex Vakulenko <avakulenko@chromium.org> Tested-by: Alex Vakulenko <avakulenko@chromium.org>
/system/update_engine/certificate_checker.cc
|
d29695df35b7192faef4009d42a62c37bdd90a8f |
|
09-Apr-2013 |
Jay Srinivasan <jaysri@chromium.org> |
Refactoring: Move prefs constants out to the constants.h/cc Adding/removing the set of keys used by various parts of the Update Engine code does not affect the implementation of the prefs module, hence separating them. BUG=chromium:229090 TEST=Unit tests pass. Change-Id: Id774b726a47b461e563e2e413527054e4da0c012 Reviewed-on: https://gerrit.chromium.org/gerrit/47593 Reviewed-by: Gilad Arnold <garnold@chromium.org> Tested-by: Jay Srinivasan <jaysri@chromium.org> Commit-Queue: Jay Srinivasan <jaysri@chromium.org>
/system/update_engine/certificate_checker.cc
|
6f6ea00aa8c4cf54b6842be32ca1226854c24f78 |
|
14-Dec-2012 |
Jay Srinivasan <jaysri@chromium.org> |
Support for processing multiple URLs in update_engine. Main changes: 1. Added a new PayloadState class which encapsulates all the persisted state we use for multiple URLs, back-off (TBD), etc. 2. Added support for handling multiple URLs stored in the OmahaResponse in OmahaRequestAction and OmahaResponseHandlerAction code. 3. Added support for picking the right URL in OmahaResponseHandlerAction and putting it in the install_plan. This way, the rest of the code that uses the install_plan is oblivious to the presence of multiple URLs :-) 4. Added support for advancing to next URL when an update fails. The full error classification is a new work item (chromium-os:37206). Right now, it's a basic round-robin on every error. 5. Updated the conditions for determining when hash checks are mandatory. Previously since there was only one URL, if it was HTTPS, the checks were waived. Now, even if there's one HTTP URL, we make hash checks mandatory even if other HTTPS URLs are present. 6. Added new unit tests for PayloadState and the new logic added to other places. Noisy changes: 1. Instead of passing PrefsInterface to OmahaRequestAction and OmahaResponseHandlerAction, we're now passing SystemState which will now contain PrefsInterface and the newly added PayloadState object that these actions need to do their work. 2. Renamed a bunch of setters/getters to set_x() and x() instead of SetX() and GetX() methods - this was pending from Gilad's old CR. As I'm adding new methods in the correct style, I went ahead and fixed it to avoid the confusing styles. 3. Updated all existing unit tests to reflect these changes. BUG=chromium-os:36807 TEST=All Single/Multiple URL scenarios work fine on my ZGB as expected. TEST=Old and new unit tests run fine. Change-Id: Id31f9ccb220471f3ec3a475f624dc03c16119144 Reviewed-on: https://gerrit.chromium.org/gerrit/39638 Commit-Ready: Jay Srinivasan <jaysri@chromium.org> Reviewed-by: Jay Srinivasan <jaysri@chromium.org> Tested-by: Jay Srinivasan <jaysri@chromium.org>
/system/update_engine/certificate_checker.cc
|
8155d081dc729d407f8ff9e95b4ef91ae14281ce |
|
06-Apr-2012 |
Mike Frysinger <vapier@chromium.org> |
pull in base/stringprintf.h explicitly Newer libbase no longer implicitly includes the stringprintf.h header, so building against it fails with missing StringPrintf definitions. BUG=chromium-os:25872 TEST=`emerge-x86-alex update_engine` works with old & new libbase Change-Id: Ia1ea842449c0382ee4c8e5abd3ddfb3012c3ff2f Reviewed-on: https://gerrit.chromium.org/gerrit/19774 Commit-Ready: Mike Frysinger <vapier@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
/system/update_engine/certificate_checker.cc
|
7f9aea2748370b0a26e1d5c36db7d8bbf3ba1245 |
|
12-Sep-2011 |
Bruno Rocha <bpontes@google.com> |
Add UMA metrics for detecting and reporting update certificate changes. LibcurlHttpFetcher checks if the update server certificate has changed since last update, and stores an eventual report in prefs. UpdateCheckScheduler submits to UMA reports from the previous update. BUG=chromium-os:19842 TEST=Included unittest for the new class and tested locally on an Alex device, since we need to verify against the actual server certificates. Change-Id: I5bee5d648982cd7618db09b67d5bff377eaa1fc1 Reviewed-on: http://gerrit.chromium.org/gerrit/7565 Reviewed-by: Bruno Pontes Soares Rocha <bpontes@chromium.org> Tested-by: Bruno Pontes Soares Rocha <bpontes@chromium.org> Reviewed-by: Andrew de los Reyes <adlr@chromium.org> Reviewed-by: Darin Petkov <petkov@chromium.org>
/system/update_engine/certificate_checker.cc
|