Function signing_input
pub fn signing_input(
caller: &str,
callee: &str,
method: &str,
path: &str,
contract: &str,
wire: &str,
timestamp: &str,
body_sha256_hex: &str,
) -> StringExpand description
I2 (#1971): the bytes a request’s signature is computed over. One field
per line, \n-separated, no trailing newline:
SIGNING_SCHEME;- the caller, as sent in
CALLER_HEADER; - the callee’s qualified context name, so a signature verifies at one callee only;
- the method;
- the URL’s pathname exactly as sent, with no query string and no percent-normalisation;
CONTRACT_HEADERas sent, empty when absent;WIRE_HEADERas sent,1when absent, so the version a callee decodes under is the one that was signed;TIMESTAMP_HEADERas sent;- the SHA-256 of the body’s bytes, 64 lowercase hex digits.
Every header the callee acts on is in it. Header values cannot hold a newline, so no field can forge another’s line.