aboutsummaryrefslogtreecommitdiffstats
path: root/license-generator/paddle/src
diff options
context:
space:
mode:
authorTeddy Wing2018-11-07 21:16:35 +0100
committerTeddy Wing2018-11-07 21:16:35 +0100
commitd4b1a74ddbd5f9f629541affb6b43d34d8cbd925 (patch)
tree281b768ebaee51149b4bc0501188f6fce3af6443 /license-generator/paddle/src
parent2e575e48be0ff909656a5e309f4a727d18555f49 (diff)
downloaddome-key-web-d4b1a74ddbd5f9f629541affb6b43d34d8cbd925.tar.bz2
AquaticPrime::plist(): Fix signature
When I updated the plist function tests, I discovered that the `data` field for "Signature" was incorrect. Turns out that the 'plist' crate takes it upon itself to base64 encode the input Vec it gets: https://github.com/ebarnard/rust-plist/blob/v0.3.0/src/xml/writer.rs#L171-L174 This meant I was double-base64 encoding the signature. To fix this, I removed base64 encoding from the `sign()` method, and return the `[u8]` array directly. I thought this would be the end of it, but I ran into another problem where my tests failed. It turns out that the 'plist' crate base64 encodes using the `base64::MIME` config, which wraps the base64-encoded string to 76 characters and uses CRLF line endings. But my XML string uses plain LF line endings, so I ended up with useless CRs in the `<data>` tag. To solve this, I ended up having to fork the 'plist' crate and change it to use the `base64::STANDARD` config, which doesn't line wrap the base64 string. For now the fork is a local copy. I'll publish it when I'm ready to publish the rest.
Diffstat (limited to 'license-generator/paddle/src')
0 files changed, 0 insertions, 0 deletions