Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Help getting my App ready for GateKeeper. Code signing and Package depolyment

So gate keeper is comming out for OSX 10.8 and I need to do some things so users can download and install my app without GateKeeper causing trouble.


I went here: https://developer.apple.com/certificates/index.action#maccertrequest and got a developer ID application and installer certificate.


I am using XCode 3.2.6 and Packagemaker 3.0.4. I am sticking with these versions so that I can support PPC builds.


In package maker, how do I 'sign' the install package so that GateKeeper will not complain about it? The documentation doesn't really tell me anything about this.


In XCode under the code signing section I pick the Code Signing Identity and have a drop-down box appears. I pick the common name from the cert that I just got from Apple. I do a build and it fails with "Command /usr/bin/codesign failed with exit code 1".


Not very descriptive. I did notice under the key store it says the certificate was signed by an unknow authority. Well it was signed by Apple, so why is it saying this and what can I do about it if anything. Anyway, I am kind of stuck at the moment and any help would greatly be appricated.

Posted on May 2, 2012 7:04 AM

Reply
24 replies

May 3, 2012 9:59 AM in response to etresoft

I have sent a message to Apple about my inability to see that document. They have fixed it, apparently it was a problem with my account.


I would be interested in seeing your method without using product sign works on 10.8 gatekeep machine that isn't one you developed on. Maybe other issues caused strangness with my account and those certs although using product sign worked.


However I still had issues with the individual code sign that gave me a requirments problem with the apple cert, but not the verisign cert.

May 7, 2012 5:43 AM in response to Tomeranaray

I can sign my code with XCode 3.2 (whatever the full version is). However the file, while signed, still reports that it "doesn't meet it's requirements". If I sign with a verisign code cert instead of the Apple one, it does meet it's requirements.


The real problem was getting my install package signed, and I discovered productsign which does the trick. Just telling packagemaker to use a cert doesn't work. It is still untrusted by gatekeeper.


The is still the problem of product updates since you can't copy a signed file and keep it signed. It does seem that an actual program will only need to be signed to use some new APIs, not for anything I do now. I am ok with unsigned or untrusted binaries at this point because it will not be a problem in the immedate future and perhaps may never be a problem.


If it does become a problem some time will have gone by and perhaps people might know how we solve the update problem with signed files. I do not understand why Apple refuses to let you copy a signed file and have it's signature remain valid. If a file isn't altered, then it should still be trustworthy. Instead they pack some of the signed information in some kind of "extra data" which is part of the file-system, not the file itself. Whenever you copy a file, this extra data is lost.

May 7, 2012 5:41 AM in response to Tomeranaray

I see you might be asking for help on how to sign the file. Install your certs and look at the code signing section of the project properties. Under that you should see something that lets you choose a cert, you click on that and you get a list of certs you can use. Then it will sign the file the next time you build it. Signing is the LAST step, so if you have some scripts that do things like copy the file, this will happen before the file is signed.


You may still be stuck unless your package and executable are in its final place before being signed since you can't copy the file. You can expand the codesigning step in your build results to see the actual codesign command and it's paramters. You can copy that and then move your file to where you wish and re-issue the command to sign your file again.

May 7, 2012 6:23 AM in response to TheSilverHammer

TheSilverHammer wrote:


If you sign your file and then COPY it, then it is no longer trusted. Yes, that is exactly what I mean.

Sorry, but that is not true. You were doing some funky stuff and I'm still not sure what was going on. If you copy a signed application, that copy is still signed and valid. Otherwise, how could you possibly download a signed file anyway?

May 7, 2012 6:37 AM in response to etresoft

Just try it for yourself. Sign a binary file, some simple test excutable. Verifry it is signed useing the codesign tool. Then copy it. I used both "cp" from the bash shell or the simple copy / paste using the finder. Now re-example the file with codesing and you will see what I mean. Oh, the file has a signature, but it isn't trusted anymore.


As for how could you download a signed file? That is a great question, I do not have answer for that. If you do find such an answer, please post it here. Right now the only answer I know of is, "You can't".

Help getting my App ready for GateKeeper. Code signing and Package depolyment

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.