File tree 1 file changed +7
-1
lines changed 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,8 @@ impl<'a> DownloadCfg<'a> {
151
151
/// Downloads a file, sourcing its hash from the same url with a `.sha256` suffix.
152
152
/// If `update_hash` is present, then that will be compared to the downloaded hash,
153
153
/// and if they match, the download is skipped.
154
+ /// Verifies the signature found at the same url with a `.asc` suffix, and prints a
155
+ /// warning when the signature does not verify, or is not found.
154
156
pub fn download_and_check (
155
157
& self ,
156
158
url_str : & str ,
@@ -198,7 +200,11 @@ impl<'a> DownloadCfg<'a> {
198
200
199
201
// No signatures for tarballs for now.
200
202
if !url_str. ends_with ( ".tar.gz" ) && !url_str. ends_with ( ".tar.xz" ) {
201
- self . check_signature ( & url_str, & file) ?;
203
+ if let Err ( err) = self . check_signature ( & url_str, & file) {
204
+ // TODO: this should probably be warn!, but log is not used in this part of the code
205
+ // at the moment.
206
+ println ! ( "Invalid signature detected: {}" , err) ;
207
+ }
202
208
}
203
209
204
210
Ok ( Some ( ( file, partial_hash) ) )
You can’t perform that action at this time.
0 commit comments