Skip to content

JSON canonicalization uses multiple libraries. #339

@vembacher

Description

@vembacher

Description

Different parts of code use different libraries for JSON canonicalization.

Examples:

sigstore-rs/src/sign.rs

Lines 327 to 332 in d5ba303

let canonicalized_body = {
let mut body = json_syntax::to_value(self.log_entry.body)
.expect("failed to parse constructed Body!");
body.canonicalize();
Some(base64.encode(body.compact_print().to_string()))
};

let mut buf = Vec::new();
let mut ser = serde_json::Serializer::with_formatter(&mut buf, CanonicalFormatter::new());
bundle.payload.serialize(&mut ser).map_err(|e| {
SigstoreError::UnexpectedError(format!(
"Cannot create canonical JSON representation of bundle: {e:?}"
))
})?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions