Commit e14a9508 authored by Ivan Vilata-i-Balaguer's avatar Ivan Vilata-i-Balaguer
Browse files

Add TODOs in places where support for `ouipsig` should be added.

parent 5f66434d
......@@ -195,6 +195,8 @@ block_sig_from_exts(boost::string_view xs)
return block_arrattr_from_exts<sig_array_t>(xs, http_::response_block_signature_ext);
}
// TODO: implement `ouipsig`
std::string
block_chunk_ext( const opt_sig_array_t& sig
, const opt_block_digest_t& prev_digest)
......@@ -831,6 +833,7 @@ struct VerifyingReader::Impl {
return or_throw(y, sys::errc::make_error_code(sys::errc::bad_message), boost::none);
}
// TODO: implement `ouipsig`
// We lack the chain hash of the previous data blocks,
// it should have been included along this block's signature.
if (_range_begin && _block_offset > 0 && _block_offset == *_range_begin) {
......@@ -855,6 +858,7 @@ struct VerifyingReader::Impl {
// Prepare hash for next data block: CHASH[i]=SHA2-512(CHASH[i-1] DHASH[i])
_block_offset += _block_data.size();
// TODO: implement `ouipsig`
http_response::ChunkHdr ch(inch.size, block_chunk_ext(*block_sig, _prev_block_dig));
_pending_parts.push(std::move(ch));
......
......@@ -109,6 +109,7 @@ parse_data_block_offset(const std::string& s) // `^[0-9a-f]*$`
}
// A signatures file entry with `OFFSET[i] SIGNATURE[i] BLOCK_DIGEST[i] CHASH[i-1]`.
// TODO: implement `ouipsig`
struct SigEntry {
std::size_t offset;
std::string signature;
......
......@@ -850,9 +850,9 @@ static const first_last block_ranges[] = {
{0, 0}, // just first block
{0, 1}, // two first blocks
{0, 2}, // all blocks
// TODOv6 TODOv7 These should work as well but v6 requires
// a previous step of signature/hash retrieval.
// Fix in v7.
// These should work as well,
// but the `ouipsig` chunk extension is not yet implemented.
// TODO: implement `ouipsig`
/*
{1, 2}, // two last blocks
{2, 2}, // just last block
......
......@@ -438,6 +438,7 @@ static const string rrs_head_complete =
+ "Transfer-Encoding: chunked\r\n"
+ "\r\n");
// TODO: implement `ouipsig`
static const array<string, 4> rrs_chunk_ext{
"",
";ouisig=\"" + rs_block_sig[0] + "\"",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment