Arduino portable crashes with SignatureVerificationFailedException
- Dominant language
- Java
- Stars
- 14.6k
- Forks
- 7k
- PR merge metrics
- No merged PRs in 30d
Description
Arduino IDE 1.6.8 + [portable installation](https://www.arduino.cc/en/Guide/PortableIDE) + ESP8266 2.3.0 platform package.
Works OK on original host (Windows 7 SP1 64-bit).
Crashes when copied to another host (also Windows 7 SP1 64-bit).
Output from arduino_debug.exe:
```
Loading configuration...
Initializing packages...
cc.arduino.contributions.SignatureVerificationFailedException: package_index.json file signature verification failed
at cc.arduino.contributions.packages.ContributionsIndexer.parseIndex(ContributionsIndexer.java:82)
at processing.app.BaseNoGui.initPackages(BaseNoGui.java:597)
at processing.app.Base.(Base.java:295)
at processing.app.Base.guardedMain(Base.java:222)
at processing.app.Base.main(Base.java:137)
```
File "lib\public.gpg.key" exists.
File "portable\package_index.json" exists.
File "portable\package_index.json.sig" exists.
Date Modified: timestamp(package_index.json.sig) > timestamp(package_index.json).
Seems to be failing in the [GPGDetachedSignatureVerifier.verify](https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/contributions/GPGDetachedSignatureVerifier.java#L52)() method which is called by the [SignatureVerifier.isSigned](https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/contributions/SignatureVerifier.java#L39)() method. This suggests that the PGP fingerprint does not match but I don't know why. All files including the key/json/sig files have the same contents on both hosts.
Contributor guide
Research direction
Start with arduino-core/src/cc/arduino/contributions/GPGDetachedSignatureVerifier.java at verify(), then follow SignatureVerifier.isSigned() and the ContributionsIndexer.parseIndex() stack trace. Compare signature verification for the copied portable files on both Windows hosts; done means the portable installation no longer crashes with SignatureVerificationFailedException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100