Changeset View
Changeset View
Standalone View
Standalone View
src/script/descriptor.h
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
* If the descriptor has a checksum, it must be valid. If require_checksum | * If the descriptor has a checksum, it must be valid. If require_checksum | ||||
* is set, the checksum is mandatory - otherwise it is optional. | * is set, the checksum is mandatory - otherwise it is optional. | ||||
* | * | ||||
* If a parse error occurs, or the checksum is missing/invalid, or anything | * If a parse error occurs, or the checksum is missing/invalid, or anything | ||||
* else is wrong, nullptr is returned. | * else is wrong, nullptr is returned. | ||||
*/ | */ | ||||
std::unique_ptr<Descriptor> Parse(const std::string &descriptor, | std::unique_ptr<Descriptor> Parse(const std::string &descriptor, | ||||
FlatSigningProvider &out, | FlatSigningProvider &out, std::string &error, | ||||
bool require_checksum = false); | bool require_checksum = false); | ||||
/** | /** | ||||
* Get the checksum for a descriptor. | * Get the checksum for a descriptor. | ||||
* | * | ||||
* If it already has one, and it is correct, return the checksum in the input. | * If it already has one, and it is correct, return the checksum in the input. | ||||
* If it already has one that is wrong, return "". | * If it already has one that is wrong, return "". | ||||
* If it does not already have one, return the checksum that would need to be | * If it does not already have one, return the checksum that would need to be | ||||
Show All 25 Lines |