Skip to content

Commit 14bcf1c

Browse files
committed
Added flag to allow ignoring signature check on package_index.json
1 parent fe02dcb commit 14bcf1c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Diff for: arduino-core/src/cc/arduino/contributions/packages/ContributionsIndexer.java

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

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

Diff for: 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)