codesign: "Argument list too long"
Asked Answered
T

1

1

In the past, I had to codesign a .dmg file.

The old certificate has since expired, and I have a new one to sign with. No problem, right? Do what I did last time? Yes. I exported the new certificate chain and private key as a .pfx file, in windows. It would seem I can import that directly into the OS X keychain tool, without converting to .p12 first. So I did.

When it comes time to actually codesign, first try says it can't determine which certificate to use. So I put the old certificate chain and private key into one keychain (2011), and the new ones in another (2012), and try again:

so...

codesign -s "Identifier Name" --keychain 2012.keychain --verbose --dryrun somefile.dmg

Returns...

somefile.dmg: signed []

BUT!

codesign -s "Identifier Name" --keychain 2012.keychain --verbose somefile.dmg

Returns...

somefile.dmg: Argument list too long

And just to be sure...

codesign -d --verbose somefile.dmg

Reveals...

somefile.dmg: code object is not signed

And for kicks and giggles,

codesign -s "Identifier Name" --keychain 2011.keychain --verbose somefile.dmg

Reveals...

somefile.dmg: signed generic [somefile.dmg]

tl;dr I can still sign things ok with my expired certificate, but when I try to do so with the new one, it works on a dryrun, but when I try to sign for real, the command returns "argument list too long".

I've been trying to figure this out for about two weeks now I kid you not, and as far I can find from searching, there is nothing to be found on this mysterious error message.

Any ideas as to what is going on, or what more I can do?

Thanks,

-Lunpa

Thornhill answered 3/6, 2011 at 21:34 Comment(2)
Something of a curiosity,both the dry run and normal failures return an exit code of 256 =PThornhill
Though, I have low expectations for this to get solved at this point =)Thornhill
C
1

I was having this problem in OSX 10.6.8.

Fortunately, it looks like running the same command in 10.7 Lion worked fine.

Captor answered 24/2, 2012 at 14:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.