Skip to content

Commit

Permalink
Added flag to allow ignoring signature check on package_index.json
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaglie committed Apr 8, 2016
1 parent 48cf016 commit 95f5b52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public ContributionsIndexer(File preferencesFolder, Platform platform, Signature

public void parseIndex() throws Exception {
File defaultIndexFile = getIndexFile(Constants.DEFAULT_INDEX_FILE_NAME);
if (!signatureVerifier.isSigned(defaultIndexFile)) {
if (!PreferencesData.getBoolean("allow_insecure_packages") && !signatureVerifier.isSigned(defaultIndexFile)) {
throw new SignatureVerificationFailedException(Constants.DEFAULT_INDEX_FILE_NAME);
}
index = parseIndex(defaultIndexFile);
Expand Down
7 changes: 7 additions & 0 deletions build/shared/lib/preferences.txt
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,10 @@ serial.debug_rate=9600

# default chosen language (none for none)
editor.languages.current =

# Debugging/Development Preferences
# ---------------------------------

# Disable signature check on packages_index.json, use only for
# development/debugging purposes. Do not enable in production.
#allow_insecure_packages=true

0 comments on commit 95f5b52

Please sign in to comment.