Skip to content

Commit

Permalink
Update changelog.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed Oct 9, 2023
1 parent d250255 commit fcc1c57
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
- [Rust](https://github.com/moonrepo/rust-plugin/blob/master/CHANGELOG.md)
- [Schema](https://github.com/moonrepo/schema-plugin/blob/master/CHANGELOG.md)

## Unreleased

#### 🚀 Updates

- Added support for minisign checksum files. Can now verify `.minisig` signatures for downloaded tools.
- TOML API
- Added an `install.checksum_public_key` setting.
- WASM API
- Added a `checksum_public_key` field to `DownloadPrebuiltOutput`.
- Removed `checksum` from `VerifyChecksumInput`.

## 0.19.2

#### 🚀 Updates
Expand Down
17 changes: 10 additions & 7 deletions crates/core/src/tool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -658,17 +658,20 @@ impl Tool {

let handle_error = |error: Error| ProtoError::Minisign { error };

PublicKey::from_base64(
let public_key = PublicKey::from_base64(
checksum_public_key.ok_or_else(|| ProtoError::MissingChecksumPublicKey)?,
)
.map_err(handle_error)?
.verify(
&fs::read_file_bytes(download_file)?,
&Signature::decode(&fs::read_file(checksum_file)?).map_err(handle_error)?,
false,
)
.map_err(handle_error)?;

public_key
.verify(
&fs::read_file_bytes(download_file)?,
&Signature::decode(&fs::read_file(checksum_file)?)
.map_err(handle_error)?,
false,
)
.map_err(handle_error)?;

verified = true;
}
_ => {
Expand Down

0 comments on commit fcc1c57

Please sign in to comment.