TorSharp
TorSharp copied to clipboard
Check crc of downloaded zip
Sometime happens that the zip file is corrupted and the program crash.
Is it possible to add the signature check of the downloaded files? and in case the crc test is not passed try to download again the file?
Thanks
This is a great idea. In general, for a checksum to be performed we would need an authoritative source for the expected checksum value. CRC is one such option but many software distribution platforms (such as Debian .deb packages) use SHA256 due to its desirable properties. Just to make sure I am not misunderstanding you, is there a reading you mentioned CRC specifically? (maybe I am misunderstanding).
Do you know if it's Tor or Privoxy failing to unzip? My gut says probably Privoxy since 3 sources are used: https://github.com/joelverhagen/TorSharp/blob/30aeeaa0206a887447bcda529d24dcc303e35fb3/src/TorSharp/Tools/Privoxy/PrivoxyFetcher.cs#L16-L18
Perhaps I need to enhance the tool fetching to trip another source if the first one returns a bad ZIP.
@joelverhagen , sorry when i was writing this issue i was falling asleep (3am in italy); To clarify: I was intending the .asc file present in each source of Privoxy, and also present in tor page download. The files uses PGP encryption, so checking that will be fine.
And the download problem is often Privoxy, but once it occurred with tor.
Thanks for the fast reply Alex