Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
OTA-2418: Remove example.com URL from automated garage-sign usage
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Sul <[email protected]>
  • Loading branch information
Mike Sul committed Apr 3, 2019
1 parent e1b8f9f commit f0ed5e3
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
10 changes: 0 additions & 10 deletions src/libaktualizr/package_manager/fetcher_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,6 @@ TEST(Fetcher, DownloadDefaultUri) {
target_json["length"] = 1;
Uptane::Target target("fake_file", target_json);

EXPECT_TRUE(pacman->fetchTarget(target, fetcher, keys, progress_cb, nullptr));
}
{
// example.com (default) custom uri.
Json::Value target_json;
target_json["hashes"]["sha256"] = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
target_json["custom"]["uri"] = "https://example.com/";
target_json["length"] = 1;
Uptane::Target target("fake_file", target_json);

EXPECT_TRUE(pacman->fetchTarget(target, fetcher, keys, progress_cb, nullptr));
}
}
Expand Down
5 changes: 1 addition & 4 deletions src/libaktualizr/uptane/tuf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,7 @@ Target::Target(std::string filename, const Json::Value &content) : filename_(std

if (custom.isMember("uri")) {
std::string custom_uri = custom["uri"].asString();
// Ignore this exact URL for backwards compatibility with old defaults that inserted it.
if (custom_uri != "https://example.com/") {
uri_ = std::move(custom_uri);
}
uri_ = std::move(custom_uri);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/sota_tools/deploy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ bool OfflineSignRepo(const ServerCredentials &push_credentials, const std::strin
return false;
}

std::string cmd("garage-sign targets add --repo aktualizr --format OSTREE --length 0 --url \"https://example.com/\"");
std::string cmd("garage-sign targets add --repo aktualizr --format OSTREE --length 0");
cmd += " --name " + name + " --version " + hash.string() + " --sha256 " + hash.string();
cmd += " --hardwareids " + hardwareids;
if (system(cmd.c_str()) != 0) {
Expand Down

0 comments on commit f0ed5e3

Please sign in to comment.