-
Everything looked good moving from the old DSA SUPublicDSAKeyFile usage to SUPublicEDKey until I actually tried to run my app. Sparkle fails to initialize and displays an alert stating, "The update checker failed to start correctly." After stepping through the code, SUSigningInputString() fails trying to create an NSData object from the SUPublicEDKey string value. decode() returns SUSigningInputStatusInvalid. I must be missing something simple here but after stepping through the code, it seems pretty clear ... NSData (and therefore Sparkle) does not like the SUPublicEDKey string from generate_keys. wth? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
Likely the format of the key is wrong, what does it look like in your Info.plist? |
Beta Was this translation helpful? Give feedback.
-
The following is the output from
That string value results in a failure in decode() to create NSData from an expected base64 encoded string. At first I thought maybe Sparkle didn't like that my Info.plist still had the old 'SUPublicDSAKeyFile' key/value in the Info.plist, so I removed that DSA properties (i.e. SUPublicDSAKeyFile and SUExpectsDSASignature). But after stepping through the Sparkle init code I discovered it was the failure in decode() with the string from 'SUPublicEDKey' generated by Sparkle's Our of curiosity, I generated a ed25519 key pair with
(same output error occurs if I try to pass the private key into If I leave the BEGIN/END lines in the private key generated from So here's where I'm at ...
What Sparkle wants as a public key is conflicting with what it can use to sign an update package. grrr I've got to be missing something simple going on here because I'm pretty sure that if Sparkle's implementation of ed25519 had problems, more developers would be writing about this. Sparkle's supported ed25519 for many years now. This has got to be something in my environment. I'm building with Xcode 14.3 on macOS Ventura 13.2.1 (22D68). I haven't tried any of this on an older macOS version. |
Beta Was this translation helpful? Give feedback.
-
This key works fine for me using Sparkle 2.4 and does not fail to decode. Can you double check the output of your Info.plist in your generated app bundle? (Check the built bundle). Sparkle does not support generating EdDSA keys using other tools. The process for doing that "correctly" is more complicated than what you're trying. Check #2298 for more info. |
Beta Was this translation helpful? Give feedback.
-
thanks for the replies, Zorg |
Beta Was this translation helpful? Give feedback.
-
I updated to Sparkle 2.4 and re-generated keys, carefully copy/pasted the given SUPublicEDKey string into the Info.plist and viola!, Sparkle starts up without complaint. I still had the breakpoint set in decode() and the alloc and init of NSData from the SUPublicEDKey string succeeds without any problem. I even went back to my old public key and pasted carefully pasted it into my Info.plist and Sparkle starts up just fine. I reverted my changes and started over with the previous Info.plist, generated a new key pair, and then re-applied Info.plist changes It's working just fine and after re-signing the update packages with the new private key, and the full Sparkle update process completes without any problems. What changed since last night? I'm not sure. I had walked through decode() several times and the NSData alloc init was failing before. The new key pair is working today. Thanks for your patience. |
Beta Was this translation helpful? Give feedback.
I updated to Sparkle 2.4 and re-generated keys, carefully copy/pasted the given SUPublicEDKey string into the Info.plist and viola!, Sparkle starts up without complaint. I still had the breakpoint set in decode() and the alloc and init of NSData from the SUPublicEDKey string succeeds without any problem. I even went back to my old public key and pasted carefully pasted it into my Info.plist and Sparkle starts up just fine.
I reverted my changes and started over with the previous Info.plist, generated a new key pair, and then re-applied Info.plist changes It's working just fine and after re-signing the update packages with the new private key, and the full Sparkle update process completes …