Skip to content

Commit 95f5b52

Browse files
committed
Added flag to allow ignoring signature check on package_index.json
1 parent 48cf016 commit 95f5b52

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public ContributionsIndexer(File preferencesFolder, Platform platform, Signature
8080

8181
public void parseIndex() throws Exception {
8282
File defaultIndexFile = getIndexFile(Constants.DEFAULT_INDEX_FILE_NAME);
83-
if (!signatureVerifier.isSigned(defaultIndexFile)) {
83+
if (!PreferencesData.getBoolean("allow_insecure_packages") && !signatureVerifier.isSigned(defaultIndexFile)) {
8484
throw new SignatureVerificationFailedException(Constants.DEFAULT_INDEX_FILE_NAME);
8585
}
8686
index = parseIndex(defaultIndexFile);

build/shared/lib/preferences.txt

+7
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,10 @@ serial.debug_rate=9600
274274

275275
# default chosen language (none for none)
276276
editor.languages.current =
277+
278+
# Debugging/Development Preferences
279+
# ---------------------------------
280+
281+
# Disable signature check on packages_index.json, use only for
282+
# development/debugging purposes. Do not enable in production.
283+
#allow_insecure_packages=true

0 commit comments

Comments
 (0)