tcpfilesystemsmd5integrityself-updating

Checking integrity with MD5


We have an desktop application what has an automatic update module that downloads an update file and install it.

the updating routine does an MD5 comparison for the update file before updating (comparing the local file md5 version with the server version)

Is that a necessary step? this is basically a zip or exe file (windows and mac)

Does the zip/exe formats contain a 'checksum' module already?

We are using liburl for downloading, does it guarantee that the file is an exact copy of the server?

Thank you.


Solution

  • That depends what you are trying to achieve.

    Yes, a zip file does have a checksum and will normally abort if the file has changed during transport.

    An exe file (unless its a zip with an exe layer around it) does not have a check unless it is some kind of signed executable.

    However, a md5 check might be useful to check if the file is still ok the way it is on your hardisk - after it was unzipped.