Skip to content

Commit 0e471bc

Browse files
committed
Added flag to allow ignoring signature check on package_index.json
1 parent d3396e2 commit 0e471bc

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
@@ -269,3 +269,10 @@ serial.debug_rate=9600
269269

270270
# default chosen language (none for none)
271271
editor.languages.current =
272+
273+
# Debugging/Development Preferences
274+
# ---------------------------------
275+
276+
# Disable signature check on packages_index.json, use only for
277+
# development/debugging purposes. Do not enable in production.
278+
#allow_insecure_packages=true

0 commit comments

Comments
 (0)