Improve marsigning_check.sh script to deal better with non-reproducible, signed macOS mar files
Our current mar-signing check script does two things:
It checks whether the SHA-256 sum from the signed .mar file is the same one as from the unsigned one and returns an error if so.
It strips the signature and compares the SHA-256 sum of the resulting .mar file with the unsigned one.
Step 2) essentially tries to do 2 checks in one: a) that there is a proper signature that can get stripped and b) that the resulting .mar file is the same as the unsigned one. That's cool in theory as we want to have both checks but it has a number of issues in practice. The most important ones are:
i) The script fails the mar-signing check for macOS as stripping the signatures from those files does not give us the unsigned .mar yet due to the content signing. (see: #20254 (moved))
ii) It's not clear we signed actually with the right key (although that is in practice not much of an issue) or whether the signature verifies later on (which is actually what we want to know).