diff --git a/libmamba/src/validation/update_framework_v0_6.cpp b/libmamba/src/validation/update_framework_v0_6.cpp index 86d0f2b5c6..4310941d1e 100644 --- a/libmamba/src/validation/update_framework_v0_6.cpp +++ b/libmamba/src/validation/update_framework_v0_6.cpp @@ -586,12 +586,7 @@ namespace mamba::validation::v0_6 auto PkgMgrRole::pkg_signatures(const nlohmann::json& j) const -> std::set { - // Libsolv's `repodata.json` parsing returns the signatures alongside other package info - // But, we are here only interested in the signatures - // In the case of parsing using mamba/simdjson, the solvable signatures are set to have the - // same format - auto j_sig = j["signatures"]; - auto sigs = j_sig.get>>(); + auto sigs = j.get>>(); std::set unique_sigs; for (auto& s : sigs) @@ -677,7 +672,15 @@ namespace mamba::validation::v0_6 { try { - check_pkg_signatures(signed_data, signatures); + // Libsolv's `repodata.json` parsing returns the signatures alongside other package info + // i.e: {"info":{},"signatures":{"public_key":{"signature":"metadata_signature"}}} + // But, we are here only interested in the signatures + // In the case of parsing using mamba/simdjson, the solvable signatures are set to have + // the same format + check_pkg_signatures( + signed_data, + signatures.at("signatures").get() + ); } catch (const threshold_error& e) {