diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 00:37:43 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-06-02 00:37:43 +0000 |
commit | efcd30da891eccdb3518e9c07afc6f907e9ac5e6 (patch) | |
tree | 70b91a28476765350a9102a245d6a83da82af26f /src/libstore/nar-info.cc | |
parent | 754c910953901ced4fbd27a8b86d36d57cb72996 (diff) |
WIP
Diffstat (limited to 'src/libstore/nar-info.cc')
-rw-r--r-- | src/libstore/nar-info.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstore/nar-info.cc b/src/libstore/nar-info.cc index 8592ee968..4f7c732ce 100644 --- a/src/libstore/nar-info.cc +++ b/src/libstore/nar-info.cc @@ -67,8 +67,9 @@ NarInfo::NarInfo(const Store & store, const std::string & s, const std::string & else if (name == "Sig") sigs.insert(value); else if (name == "CA") { - if (!ca.empty()) corrupt(); - ca = value; + if (ca) corrupt(); + // FIXME: allow blank ca or require skipping field? + ca = parseCaOpt(value); } pos = eol + 1; @@ -104,8 +105,8 @@ std::string NarInfo::to_string(const Store & store) const for (auto sig : sigs) res += "Sig: " + sig + "\n"; - if (!ca.empty()) - res += "CA: " + ca + "\n"; + if (ca) + res += "CA: " + renderContentAddress(*ca) + "\n"; return res; } |