# must fail: param_set_sha_uppercase # a pin whose digest is not lowercase hexadecimal read as a fault, not pin_malformed (the corpus tool's param_set) diff --git a/wai/wai-rs/src/bin/wai_cli/http_vectors_receipts.rs b/wai/wai-rs/src/bin/wai_cli/http_vectors_receipts.rs index 12a55982..34d16fd9 100644 --- a/wai/wai-rs/src/bin/wai_cli/http_vectors_receipts.rs +++ b/wai/wai-rs/src/bin/wai_cli/http_vectors_receipts.rs @@ -925,7 +925,7 @@ mod built { // A pin whose digest is not 64 lowercase hexadecimal digits locates no grants // file: the pin's own check refuses it (pin_malformed). let grants = match (input["grants"].as_str(), unhex32(sha)) { - (Some(p), Some(d)) => read_grants_file(&d, &c.file(p)?).map_err(|e| Stop::Fault(format!("the grants file: {e}")))?, + (Some(p), d) => read_grants_file(&d.ok_or(Stop::Fault("sha256 is not a hash".into()))?, &c.file(p)?).map_err(|e| Stop::Fault(format!("the grants file: {e}")))?, _ => Vec::new(), }; let mut sink = SinkKeyLog::new(revs, anchors).with_statuses(statuses).with_grants(grants);