Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work on macOS Sierra? #18

Open
squintgit opened this issue Aug 25, 2016 · 19 comments
Open

Doesn't work on macOS Sierra? #18

squintgit opened this issue Aug 25, 2016 · 19 comments

Comments

@squintgit
Copy link

Won't open on Sierra. Known issue?

@squintgit
Copy link
Author

"Spotify.app is damaged and can't be opened. You should move it to the Trash."

Cancel / Move to Trash

@devinhalladay
Copy link
Owner

It does work on Sierra, but Apple disabled the "Anywhere" option in Gatekeeper during the beta. Here's the workaround: Just right click and then click "Open". That should work; let me know.

@abarisain
Copy link

Nope, that doesn't work. Even by right clicking it and selecting open.
Removing signature using codesign --remove-signature works, but still can't be opened. I can't seem to be able to resign it using the adhoc profile

@sandervankasteel
Copy link
Collaborator

sandervankasteel commented Aug 26, 2016

My 'fix' / workaround for this issue was this: (Since I am also running Mac OS sierra)

#3 (comment)

@swrobel
Copy link

swrobel commented Aug 29, 2016

Works for me on Sierra PB7 (also worked on PB6 before I updated today). I have "Allow apps downloaded from" set to "App Store and identified developers" under Security & Privacy.

@sandervankasteel
Copy link
Collaborator

@swrobel You probably have to re-run sudo spctl --master-disable. This command will disable GateKeeper, because most likely GateKeeper was enable after the update in Sierra.

@abarisain
Copy link

To anybody reading this, this is a really bad idea. It's stuff like that that allowed Xcodeghost to spread. Ideally we should figure out a way for everybody to self-resign the app

@sandervankasteel
Copy link
Collaborator

sandervankasteel commented Aug 30, 2016

@abarisain I totally agree with you that disabling GateKeeper is a bad idea. I agree with you that we should figure out a way to resign the app on OS X / Mac OS.

On Linux I've already "resigned" (during the building of the .deb file) the inside of the .deb file. So there shouldn't be any problems there, but on OS X / Mac OS we need a method to figure this out.

@devinhalladay
Copy link
Owner

I think think THINK that if we rebuild the .spa files on Mac properly that everything will return to normal and the certificate will not break. I wasn't sure how until @sandervankasteel submitted his Linux PR so I'm going to reuse your repackaging code and see if it helps. Will publish a new release in a few minutes and I could use as much help Mac testing as possible to ensure this works (with "Allow from anywhere" turned OFF/Gatekeeper turned ON)

@abarisain
Copy link

Will it? Every file is checksummed

What I have no idea, is why codesign fails to resign it manually, even if the signature is stripped

@sandervankasteel
Copy link
Collaborator

@devinhalladay I doubt that it will.. Because your changes to the contents of the spa file changed the checksum of the .spa file and that in turn changes the checksum of the complete .app. So you need to re-checksum the complete Spotify.app. To do that codesign uses 2 parts, the checksum of the files and the developers certificate. You can always resign it with your own local certificates, that should atleast prevent OS X from saying "The app is damaged".

The only reason I could resign the .deb file on Linux is because the inside the .deb file, there is a in the control.tar.gz which in turn contains a md5sums file, and that just contains the hashes of all files. And as long as the hashes that are in the md5sums file, match the actual file. No worries, the OS will install it!

@abarisain
Copy link

You can always resign it with your own local certificates, that should atleast prevent OS X from saying "The app is damaged".

That's the stuff that needs to be figured out. Sadly, even with the beta Xcode, codesign says that spotify is corrupted when trying to resign it :/

@sandervankasteel
Copy link
Collaborator

That's the stuff that needs to be figured out. Sadly, even with the beta Xcode, codesign says that spotify is corrupted when trying to resign it :/

Ugh, that sucks :( Have you tried removing the complete _CodeSignature directory inside the .app, and then resigning it ?

@abarisain
Copy link

Yes. also tried codesign --remove-signature

@sandervankasteel
Copy link
Collaborator

Have you tried an application like: https://github.com/steakknife/unsign yet?

@abarisain
Copy link

Nope, but the description says " (note: unsigned binaries cannot currently be re-codesign'ed. Patches welcome!)", which explains a lot :)

@sandervankasteel
Copy link
Collaborator

Yeah but technically our binary is a
signed with a certificate from Spotify, albeit invalid after our modifications

@abarisain
Copy link

Yes, I mean that since this app prevents re signing, it won't help

@sandervankasteel
Copy link
Collaborator

@abarisain Have a look at my last comment in #23 ;)

happy dancing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants