From 50fdd183c268381868c94a70e995459e1b4f092d Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 11 Nov 2020 14:43:09 +0100 Subject: [PATCH] ci: enable editorconfig checks, fix whitespace issues --- Makefile | 5 +- ci/hardware_tests/record_video.sh | 2 +- ci/hardware_tests/tpmb/arduino/tpmb.ino | 10 +- ci/hardware_tests/tpmb/model/README.md | 16 +- ci/hardware_tests/tpmb/model/base.scad | 8 +- ci/prebuild.yml | 5 + ci/shell.nix | 1 + common/README.md | 2 +- common/protob/messages-cardano.proto | 2 +- core/CHANGELOG.md | 6 +- core/README.md | 2 +- core/embed/firmware/startup.S | 2 +- core/emu.py | 2 +- core/src/apps/binance/README.md | 2 +- core/src/apps/cardano/README.md | 112 ++--- core/src/apps/monero/README.md | 2 +- core/tests/README.md | 2 +- core/tests/test_apps.binance.sign_tx.py | 6 +- core/tests/test_apps.cardano.utils.py | 6 +- core/tests/test_apps.nem.address.py | 2 +- .../codegen/fonts/PixelOperator-LICENSE.txt | 242 +++++------ .../fonts/PixelOperatorMono-LICENSE.txt | 242 +++++------ core/tools/codegen/fonts/Roboto-LICENSE.txt | 404 +++++++++--------- .../codegen/fonts/RobotoMono-LICENSE.txt | 404 +++++++++--------- core/tools/dialog-designer/index.html | 2 +- crypto/aes/aes_modes.c | 4 +- crypto/aes/aesopt.h | 2 +- crypto/aes/aestab.c | 2 +- crypto/aes/aestst.c | 2 +- crypto/bignum.c | 6 +- crypto/chacha20poly1305/ecrypt-config.h | 8 +- crypto/chacha20poly1305/ecrypt-portable.h | 4 +- crypto/chacha20poly1305/ecrypt-sync.h | 80 ++-- crypto/ed25519-donna/README.md | 38 +- .../ed25519-donna/ed25519-donna-impl-base.c | 4 +- crypto/ed25519-donna/ed25519.c | 2 +- crypto/groestl.h | 6 +- crypto/groestl_internal.h | 6 +- crypto/monero/base58.c | 14 +- crypto/monero/base58.h | 16 +- crypto/monero/int-util.h | 14 +- crypto/sha2.c | 4 +- docs/ci/index.md | 2 +- docs/ci/jobs.md | 4 +- .../passphrase-redesign-migration.md | 2 +- docs/common/communication/passphrase.md | 14 +- docs/common/index.md | 2 +- docs/core/build/emulator.md | 2 +- docs/core/misc/slip0039.md | 4 +- docs/index.md | 2 +- docs/legacy/index.md | 2 +- docs/misc/review.md | 6 +- docs/misc/update-wipes.md | 6 +- docs/tests/index.md | 4 +- legacy/README.md | 2 +- legacy/firmware/ethereum_tokens.c.mako | 2 +- legacy/firmware/lisk.c | 2 +- python/docs/transaction-format.md | 13 +- tests/fido_tests/u2f-tests-hid/LICENSE | 4 +- 59 files changed, 891 insertions(+), 883 deletions(-) diff --git a/Makefile b/Makefile index 01a55dc3a..3c6312c49 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ PY_FILES = $(shell find . -type f -name '*.py' | grep -f ./tools/style.py.incl C_FILES = $(shell find . -type f -name '*.[ch]' | grep -f ./tools/style.c.include | grep -v -f ./tools/style.c.exclude ) -style_check: pystyle_check cstyle_check changelog_check yaml_check ## run all style checks (C+Py) +style_check: pystyle_check cstyle_check changelog_check yaml_check editor_check ## run all style checks (C+Py) style: pystyle cstyle changelog ## apply all code styles (C+Py) @@ -45,6 +45,9 @@ changelog_check: ## check changelog format yaml_check: ## check yaml formatting yamllint . +editor_check: ## check editorconfig formatting + editorconfig-checker -exclude '.*\.(so|dat|toif|der)' + changelog: ## fill out issue links in changelog ./tools/linkify-changelogs.py diff --git a/ci/hardware_tests/record_video.sh b/ci/hardware_tests/record_video.sh index 860d544e2..44b8c5cee 100755 --- a/ci/hardware_tests/record_video.sh +++ b/ci/hardware_tests/record_video.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash if [ $# -ne 2 ] then echo "Usage: $0 commit_id [start|stop]" diff --git a/ci/hardware_tests/tpmb/arduino/tpmb.ino b/ci/hardware_tests/tpmb/arduino/tpmb.ino index edb347dbb..22a5bd0f1 100644 --- a/ci/hardware_tests/tpmb/arduino/tpmb.ino +++ b/ci/hardware_tests/tpmb/arduino/tpmb.ino @@ -12,22 +12,22 @@ Servo servo_left; void setup() { // Starting the serial console - Serial.begin(9600); - + Serial.begin(9600); + // Attaching both servos servo_right.attach(7); servo_left.attach(8); - + // Setting them un unpressed position servo_right.write(right_unpressed); servo_left.write(left_unpressed); Serial.println("Ready for commands, press my buttons!"); } - + void loop() { if(Serial.available()){ command = Serial.readStringUntil('\n'); - + if(command.equals("right press")){ Serial.println("Pressing right button."); servo_right.write(right_pressed); diff --git a/ci/hardware_tests/tpmb/model/README.md b/ci/hardware_tests/tpmb/model/README.md index 3f4415fbb..103a0dbee 100644 --- a/ci/hardware_tests/tpmb/model/README.md +++ b/ci/hardware_tests/tpmb/model/README.md @@ -1,8 +1,8 @@ -# 3D print model for tpmb - -This is pretty easy to print. First open ```base.scad``` with OpenSCAD and -export your ```.stl``` file with it. - -Open it with your slider, we are using -Original Priska i3 MK3 to print our models. 0.15mm quality setting with standard -PLA works fine for us. +# 3D print model for tpmb + +This is pretty easy to print. First open ```base.scad``` with OpenSCAD and +export your ```.stl``` file with it. + +Open it with your slider, we are using +Original Prusa i3 MK3 to print our models. 0.15mm quality setting with standard +PLA works fine for us. diff --git a/ci/hardware_tests/tpmb/model/base.scad b/ci/hardware_tests/tpmb/model/base.scad index afa7e82e8..524f9680a 100644 --- a/ci/hardware_tests/tpmb/model/base.scad +++ b/ci/hardware_tests/tpmb/model/base.scad @@ -2,9 +2,9 @@ // Horizontal wall difference() { - // Creating the base + // Creating the base cube([100,80,7]); - + // Cutting a hole for trezor to sit in translate([0,25,2]) cube([65,30,10]); @@ -17,13 +17,13 @@ difference() { // Cutting an opening for stuck trezor translate([0,26,-2]) cube([10,28,12]); - + // Creating opening for right servo translate([0,7-3,12]) cube([10,23,92]); translate([0,0,40]) cube([10,23,92]); - + // Creating opening for left servo translate([0,50+3,12]) cube([10,23,92]); diff --git a/ci/prebuild.yml b/ci/prebuild.yml index 2751e17ea..aa80f223f 100644 --- a/ci/prebuild.yml +++ b/ci/prebuild.yml @@ -17,6 +17,11 @@ gen prebuild: script: - nix-shell --run "poetry run make gen_check" +editor prebuild: + stage: prebuild + script: + - nix-shell --run "make editor_check" + yaml prebuild: stage: prebuild script: diff --git a/ci/shell.nix b/ci/shell.nix index 647448687..2b7cc72a1 100644 --- a/ci/shell.nix +++ b/ci/shell.nix @@ -37,6 +37,7 @@ stdenv.mkDerivation ({ bash check clang-tools + editorconfig-checker gcc gcc-arm-embedded git diff --git a/common/README.md b/common/README.md index a037362d0..9d00c8af7 100644 --- a/common/README.md +++ b/common/README.md @@ -1,7 +1,7 @@ # Trezor Common This project contains files shared among Trezor projects. All changes are happening inside the [Trezor Firmware repository](https://github.com/trezor/trezor-firmware). - + We also export this project to the [trezor-common repository](https://github.com/trezor/trezor-common) as a read-only copy so third parties may depend on that instead of the whole monorepo. It is meant to be used as a submodule using: ``` diff --git a/common/protob/messages-cardano.proto b/common/protob/messages-cardano.proto index 746cac6ad..3de19c88e 100644 --- a/common/protob/messages-cardano.proto +++ b/common/protob/messages-cardano.proto @@ -127,7 +127,7 @@ message CardanoSignTx { optional bytes prev_hash = 2; // hash of previous transaction output to spend by this input optional uint32 prev_index = 3; // index of previous output to spend // left as a comment so we know to skip the id 4 in the future - // optional uint32 type = 4; + // optional uint32 type = 4; } /** * Structure representing cardano transaction output diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 274e3429e..5c9e2e57e 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -61,13 +61,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Removed - Remove ETP, GIN, PTC, ZEL support. -- Drop support for signing Zcash v3 transactions. [#982] +- Drop support for signing Zcash v3 transactions. [#982] ### Fixed - CRW addresses are properly generated. [#1139] - Fix boot loop after uploading invalid homescreen. [#1118] - Allow 49/x not 49/x' for Casa. [#1190] -- Make sure Homescreen is properly initialized. [#1095] +- Make sure Homescreen is properly initialized. [#1095] ### Security - Show non-empty passphrase on device when it was entered on host. @@ -89,7 +89,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - `Features.pin_cached` renamed to `unlocked`. - Forbid all settings if the device is not yet initialized. [#1056] - Rewrite USB codec and Protobuf decoder to be more memory-efficient. [#1089] -- Allow compatibility namespaces for Casa and Green Address. +- Allow compatibility namespaces for Casa and Green Address. ### Deprecated - Deprecate `overwintered` field in `SignTx` and `TxAck`. diff --git a/core/README.md b/core/README.md index 5445b9c0c..2a337d2f2 100644 --- a/core/README.md +++ b/core/README.md @@ -1,5 +1,5 @@ # Trezor Core -Firmware currently running on Model T. +Firmware currently running on Model T. See `docs/core` for more info. diff --git a/core/embed/firmware/startup.S b/core/embed/firmware/startup.S index ee02a0181..62f01d6f2 100644 --- a/core/embed/firmware/startup.S +++ b/core/embed/firmware/startup.S @@ -7,7 +7,7 @@ reset_handler: // The following loading of VTOR address only works if T1 bootloader was built with MEMORY_PROTECT=0 -// or the firmware was properly signed. All other variants end up in hard fault due to MPU +// or the firmware was properly signed. All other variants end up in hard fault due to MPU // (cf mpu_config_firmware in legacy bootloader) #if TREZOR_MODEL == 1 diff --git a/core/emu.py b/core/emu.py index f1dc9173e..0eb781081 100755 --- a/core/emu.py +++ b/core/emu.py @@ -132,7 +132,7 @@ def cli( If -c is specified, extra arguments are treated as a command that is executed with the running emulator. This command can access the following environment variables: - + \b TREZOR_PROFILE_DIR - path to storage directory TREZOR_PATH - trezorlib connection string diff --git a/core/src/apps/binance/README.md b/core/src/apps/binance/README.md index 0ccac10cd..79cccbeab 100644 --- a/core/src/apps/binance/README.md +++ b/core/src/apps/binance/README.md @@ -22,4 +22,4 @@ Transfer ## Testing Mnemonic for recovering wallet used in binance sdk tests: -offer caution gift cross surge pretty orange during eye soldier popular holiday mention east eight office fashion ill parrot vault rent devote earth cousin \ No newline at end of file +offer caution gift cross surge pretty orange during eye soldier popular holiday mention east eight office fashion ill parrot vault rent devote earth cousin diff --git a/core/src/apps/cardano/README.md b/core/src/apps/cardano/README.md index 28340d827..cde412633 100644 --- a/core/src/apps/cardano/README.md +++ b/core/src/apps/cardano/README.md @@ -12,11 +12,11 @@ REVIEWER = Jan Matejek , Tomas Susanka signature]] # uint(0), array(2) - 0: [ - # array(2), bytes(32), bytes(64) - [h'D19...', h'F62...'], - # array(2), bytes(32), bytes(64) + 0: [ + # array(2), bytes(32), bytes(64) + [h'D19...', h'F62...'], + # array(2), bytes(32), bytes(64) [h'F1C...', h'7AC...'] - ] + ] }, - + # metadata # primitive(22) - null + null ] ``` diff --git a/core/src/apps/monero/README.md b/core/src/apps/monero/README.md index 45fdb7108..0a88347fc 100644 --- a/core/src/apps/monero/README.md +++ b/core/src/apps/monero/README.md @@ -197,7 +197,7 @@ Trezor computes spending keys, `TxinToKey`, `pseudo_out`, HMACs for offloaded da UTXOs have to be sorted by the key image in the valid blockchain transaction. This message caries permutation on the key images so they are sorted in the desired way. -In Client version 3+ sending the permutation is deprecated. Original sort index is sent from the host +In Client version 3+ sending the permutation is deprecated. Original sort index is sent from the host when needed (to verify HMACs built on the original ordering). Moreover, permutation correctness is checked by the set size, HMAC validity and strict ordering on the key images. diff --git a/core/tests/README.md b/core/tests/README.md index 3bf324715..a9fab826b 100644 --- a/core/tests/README.md +++ b/core/tests/README.md @@ -15,4 +15,4 @@ class TestSomething(unittest.TestCase): self.assertTrue(True) ``` -Usage of `assert` is discouraged because it is not evaluated in production code (when `PYOPT=1`). Use `self.assertXY` instead, see `unittest.py`. +Usage of `assert` is discouraged because it is not evaluated in production code (when `PYOPT=1`). Use `self.assertXY` instead, see `unittest.py`. diff --git a/core/tests/test_apps.binance.sign_tx.py b/core/tests/test_apps.binance.sign_tx.py index 7ca8fd3c1..a85fe1726 100644 --- a/core/tests/test_apps.binance.sign_tx.py +++ b/core/tests/test_apps.binance.sign_tx.py @@ -48,7 +48,7 @@ class TestBinanceSign(unittest.TestCase): self.assertEqual(signature, unhexlify(expected_signature)) def test_cancel_signature(self): - # source of testing data + # source of testing data # https://github.com/binance-chain/javascript-sdk/blob/master/__tests__/fixtures/cancelOrder.json json_msg = '{"account_number":"34","chain_id":"Binance-Chain-Nile","data":null,"memo":"","msgs":[{"refid":"BA36F0FAD74D8F41045463E4774F328F4AF779E5-29","sender":"tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd","symbol":"BCHSV.B-10F_BNB"}],"sequence":"33","source":"1"}' expected_signature = "d93fb0402b2b30e7ea08e123bb139ad68bf0a1577f38592eb22d11e127f09bbd3380f29b4bf15bdfa973454c5c8ed444f2e256e956fe98cfd21e886a946e21e5" @@ -74,8 +74,8 @@ class TestBinanceSign(unittest.TestCase): self.assertEqual(signature, unhexlify(expected_signature)) def test_transfer_signature(self): - # source of testing data - # https://github.com/binance-chain/javascript-sdk/blob/master/__tests__/fixtures/transfer.json + # source of testing data + # https://github.com/binance-chain/javascript-sdk/blob/master/__tests__/fixtures/transfer.json json_msg = '{"account_number":"34","chain_id":"Binance-Chain-Nile","data":null,"memo":"test","msgs":[{"inputs":[{"address":"tbnb1hgm0p7khfk85zpz5v0j8wnej3a90w709zzlffd","coins":[{"amount":1000000000,"denom":"BNB"}]}],"outputs":[{"address":"tbnb1ss57e8sa7xnwq030k2ctr775uac9gjzglqhvpy","coins":[{"amount":1000000000,"denom":"BNB"}]}]}],"sequence":"31","source":"1"}' expected_signature = "faf5b908d6c4ec0c7e2e7d8f7e1b9ca56ac8b1a22b01655813c62ce89bf84a4c7b14f58ce51e85d64c13f47e67d6a9187b8f79f09e0a9b82019f47ae190a4db3" public_key = "029729a52e4e3c2b4a4e52aa74033eedaf8ba1df5ab6d1f518fd69e67bbd309b0e" diff --git a/core/tests/test_apps.cardano.utils.py b/core/tests/test_apps.cardano.utils.py index 79a37539e..f70c6ca1a 100644 --- a/core/tests/test_apps.cardano.utils.py +++ b/core/tests/test_apps.cardano.utils.py @@ -8,9 +8,9 @@ if not utils.BITCOIN_ONLY: class TestCardanoUtils(unittest.TestCase): def test_variable_length_encode(self): test_vectors = [ - (0, bytes([0x00])), - (42, bytes([0x2A])), - (127, bytes([0x7F])), + (0, bytes([0x00])), + (42, bytes([0x2A])), + (127, bytes([0x7F])), (128, bytes([0x81, 0x00])), (129, bytes([0x81, 0x01])), (255, bytes([0x81, 0x7F])), diff --git a/core/tests/test_apps.nem.address.py b/core/tests/test_apps.nem.address.py index 945c24488..029205608 100644 --- a/core/tests/test_apps.nem.address.py +++ b/core/tests/test_apps.nem.address.py @@ -44,7 +44,7 @@ class TestNemAddress(unittest.TestCase): self.assertTrue(check_path([44 | HARDENED, 1 | HARDENED, 0 | HARDENED, 0 | HARDENED, 0 | HARDENED], NEM_NETWORK_TESTNET)) # short path (check_path does not validate pattern match): self.assertTrue(check_path([44 | HARDENED, 43 | HARDENED], NEM_NETWORK_MAINNET)) - + # testnet path on mainnet: self.assertFalse(check_path([44 | HARDENED, 1 | HARDENED, 0 | HARDENED, 0 | HARDENED, 0 | HARDENED], NEM_NETWORK_MAINNET)) # mainnet path on testnet: diff --git a/core/tools/codegen/fonts/PixelOperator-LICENSE.txt b/core/tools/codegen/fonts/PixelOperator-LICENSE.txt index 354f1e04f..0e259d42c 100644 --- a/core/tools/codegen/fonts/PixelOperator-LICENSE.txt +++ b/core/tools/codegen/fonts/PixelOperator-LICENSE.txt @@ -1,121 +1,121 @@ -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/core/tools/codegen/fonts/PixelOperatorMono-LICENSE.txt b/core/tools/codegen/fonts/PixelOperatorMono-LICENSE.txt index 354f1e04f..0e259d42c 100644 --- a/core/tools/codegen/fonts/PixelOperatorMono-LICENSE.txt +++ b/core/tools/codegen/fonts/PixelOperatorMono-LICENSE.txt @@ -1,121 +1,121 @@ -Creative Commons Legal Code - -CC0 1.0 Universal - - CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE - LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN - ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS - INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES - REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS - PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM - THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED - HEREUNDER. - -Statement of Purpose - -The laws of most jurisdictions throughout the world automatically confer -exclusive Copyright and Related Rights (defined below) upon the creator -and subsequent owner(s) (each and all, an "owner") of an original work of -authorship and/or a database (each, a "Work"). - -Certain owners wish to permanently relinquish those rights to a Work for -the purpose of contributing to a commons of creative, cultural and -scientific works ("Commons") that the public can reliably and without fear -of later claims of infringement build upon, modify, incorporate in other -works, reuse and redistribute as freely as possible in any form whatsoever -and for any purposes, including without limitation commercial purposes. -These owners may contribute to the Commons to promote the ideal of a free -culture and the further production of creative, cultural and scientific -works, or to gain reputation or greater distribution for their Work in -part through the use and efforts of others. - -For these and/or other purposes and motivations, and without any -expectation of additional consideration or compensation, the person -associating CC0 with a Work (the "Affirmer"), to the extent that he or she -is an owner of Copyright and Related Rights in the Work, voluntarily -elects to apply CC0 to the Work and publicly distribute the Work under its -terms, with knowledge of his or her Copyright and Related Rights in the -Work and the meaning and intended legal effect of CC0 on those rights. - -1. Copyright and Related Rights. A Work made available under CC0 may be -protected by copyright and related or neighboring rights ("Copyright and -Related Rights"). Copyright and Related Rights include, but are not -limited to, the following: - - i. the right to reproduce, adapt, distribute, perform, display, - communicate, and translate a Work; - ii. moral rights retained by the original author(s) and/or performer(s); -iii. publicity and privacy rights pertaining to a person's image or - likeness depicted in a Work; - iv. rights protecting against unfair competition in regards to a Work, - subject to the limitations in paragraph 4(a), below; - v. rights protecting the extraction, dissemination, use and reuse of data - in a Work; - vi. database rights (such as those arising under Directive 96/9/EC of the - European Parliament and of the Council of 11 March 1996 on the legal - protection of databases, and under any national implementation - thereof, including any amended or successor version of such - directive); and -vii. other similar, equivalent or corresponding rights throughout the - world based on applicable law or treaty, and any national - implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention -of, applicable law, Affirmer hereby overtly, fully, permanently, -irrevocably and unconditionally waives, abandons, and surrenders all of -Affirmer's Copyright and Related Rights and associated claims and causes -of action, whether now known or unknown (including existing as well as -future claims and causes of action), in the Work (i) in all territories -worldwide, (ii) for the maximum duration provided by applicable law or -treaty (including future time extensions), (iii) in any current or future -medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional -purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each -member of the public at large and to the detriment of Affirmer's heirs and -successors, fully intending that such Waiver shall not be subject to -revocation, rescission, cancellation, termination, or any other legal or -equitable action to disrupt the quiet enjoyment of the Work by the public -as contemplated by Affirmer's express Statement of Purpose. - -3. Public License Fallback. Should any part of the Waiver for any reason -be judged legally invalid or ineffective under applicable law, then the -Waiver shall be preserved to the maximum extent permitted taking into -account Affirmer's express Statement of Purpose. In addition, to the -extent the Waiver is so judged Affirmer hereby grants to each affected -person a royalty-free, non transferable, non sublicensable, non exclusive, -irrevocable and unconditional license to exercise Affirmer's Copyright and -Related Rights in the Work (i) in all territories worldwide, (ii) for the -maximum duration provided by applicable law or treaty (including future -time extensions), (iii) in any current or future medium and for any number -of copies, and (iv) for any purpose whatsoever, including without -limitation commercial, advertising or promotional purposes (the -"License"). The License shall be deemed effective as of the date CC0 was -applied by Affirmer to the Work. Should any part of the License for any -reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder -of the License, and in such case Affirmer hereby affirms that he or she -will not (i) exercise any of his or her remaining Copyright and Related -Rights in the Work or (ii) assert any associated claims and causes of -action with respect to the Work, in either case contrary to Affirmer's -express Statement of Purpose. - -4. Limitations and Disclaimers. - - a. No trademark or patent rights held by Affirmer are waived, abandoned, - surrendered, licensed or otherwise affected by this document. - b. Affirmer offers the Work as-is and makes no representations or - warranties of any kind concerning the Work, express, implied, - statutory or otherwise, including without limitation warranties of - title, merchantability, fitness for a particular purpose, non - infringement, or the absence of latent or other defects, accuracy, or - the present or absence of errors, whether or not discoverable, all to - the greatest extent permissible under applicable law. - c. Affirmer disclaims responsibility for clearing rights of other persons - that may apply to the Work or any use thereof, including without - limitation any person's Copyright and Related Rights in the Work. - Further, Affirmer disclaims responsibility for obtaining any necessary - consents, permissions or other rights required for any use of the - Work. - d. Affirmer understands and acknowledges that Creative Commons is not a - party to this document and has no duty or obligation with respect to - this CC0 or use of the Work. +Creative Commons Legal Code + +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. + +Statement of Purpose + +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). + +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. + +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. + +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: + + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. + +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or +equitable action to disrupt the quiet enjoyment of the Work by the public +as contemplated by Affirmer's express Statement of Purpose. + +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any +reason be judged legally invalid or ineffective under applicable law, such +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. + +4. Limitations and Disclaimers. + + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/core/tools/codegen/fonts/Roboto-LICENSE.txt b/core/tools/codegen/fonts/Roboto-LICENSE.txt index 75b52484e..d64569567 100644 --- a/core/tools/codegen/fonts/Roboto-LICENSE.txt +++ b/core/tools/codegen/fonts/Roboto-LICENSE.txt @@ -1,202 +1,202 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/core/tools/codegen/fonts/RobotoMono-LICENSE.txt b/core/tools/codegen/fonts/RobotoMono-LICENSE.txt index 75b52484e..d64569567 100644 --- a/core/tools/codegen/fonts/RobotoMono-LICENSE.txt +++ b/core/tools/codegen/fonts/RobotoMono-LICENSE.txt @@ -1,202 +1,202 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/core/tools/dialog-designer/index.html b/core/tools/dialog-designer/index.html index 2465f8c54..b31976c10 100644 --- a/core/tools/dialog-designer/index.html +++ b/core/tools/dialog-designer/index.html @@ -3,7 +3,7 @@ Trezor Dialog Designer - + diff --git a/crypto/aes/aes_modes.c b/crypto/aes/aes_modes.c index f69efcea3..3ee98d1c3 100644 --- a/crypto/aes/aes_modes.c +++ b/crypto/aes/aes_modes.c @@ -80,7 +80,7 @@ aligned_array(unsigned long, dec_hybrid_table, 12, 16) = NEH_DEC_HYBRID_DATA; #elif NEH_KEY_TYPE == NEH_HYBRID #define kd_adr(c) ((uint8_t*)(c)->ks + ((c)->inf.b[0] == 160 ? 160 : 0)) #else -#error no key type defined for VIA ACE +#error no key type defined for VIA ACE #endif #else @@ -117,7 +117,7 @@ AES_RETURN aes_test_alignment_detection(unsigned int n) /* 4 <= n <= 16 */ { uint8_t *qf = ALIGN_FLOOR(p + i, n), *qh = ALIGN_CEIL(p + i, n); - + if(qh == qf) ++count_eq; else if(qh == qf + n) diff --git a/crypto/aes/aesopt.h b/crypto/aes/aesopt.h index 4fa9841eb..550e6f469 100644 --- a/crypto/aes/aesopt.h +++ b/crypto/aes/aesopt.h @@ -193,7 +193,7 @@ Issue Date: 20/12/2007 assembler code will be used with an AESNI build, if it is then AES_REV_DKS must NOT be defined when the assembler files are built (the definition of USE_INTEL_AES_IF_PRESENT in the assembler - code files must match that here if they are used). + code files must match that here if they are used). */ #if 0 && defined( INTEL_AES_POSSIBLE ) && !defined( USE_INTEL_AES_IF_PRESENT ) diff --git a/crypto/aes/aestab.c b/crypto/aes/aestab.c index 0ad2f2f1e..cc8a24f9f 100644 --- a/crypto/aes/aestab.c +++ b/crypto/aes/aestab.c @@ -383,7 +383,7 @@ AES_RETURN aes_init(void) return EXIT_SUCCESS; } -/* +/* Automatic code initialisation (suggested by by Henrik S. Gaßmann) based on code provided by Joe Lowe and placed in the public domain at: http://stackoverflow.com/questions/1113409/attribute-constructor-equivalent-in-vc diff --git a/crypto/aes/aestst.c b/crypto/aes/aestst.c index bc54814be..9b8097c4e 100644 --- a/crypto/aes/aestst.c +++ b/crypto/aes/aestst.c @@ -58,7 +58,7 @@ void out_state(long s0, long s1, long s2, long s3) void oblk(char m[], unsigned char v[], unsigned long n) { unsigned long i; - + printf("\n%s", m); for(i = 0; i < n; ++i) diff --git a/crypto/bignum.c b/crypto/bignum.c index 2bb2e6663..f6e60e56b 100644 --- a/crypto/bignum.c +++ b/crypto/bignum.c @@ -646,9 +646,9 @@ void bn_multiply_reduce_step(uint32_t res[2 * BN_LIMBS], const bignum256 *prime, // clang-format off // acc == 1 << shift // Proof: - // acc - // == (1 << BITS_PER_LIMB * (LIMBS + 1) + shift) + res[d : d + LIMBS + 1] - coef * prime[:LIMBS] >> BITS_PER_LIMB * (LIMBS + 1) - // == (1 << BITS_PER_LIMB * (LIMBS + 1) + shift) + res[d : d + LIMBS + 1] - coef * prime >> BITS_PER_LIMB * (LIMBS + 1) + // acc + // == (1 << BITS_PER_LIMB * (LIMBS + 1) + shift) + res[d : d + LIMBS + 1] - coef * prime[:LIMBS] >> BITS_PER_LIMB * (LIMBS + 1) + // == (1 << BITS_PER_LIMB * (LIMBS + 1) + shift) + res[d : d + LIMBS + 1] - coef * prime >> BITS_PER_LIMB * (LIMBS + 1) // == (1 << BITS_PER_LIMB * (LIMBS + 1) + shift) + (res[d : d + LIMBS + 1] - coef * prime) >> BITS_PER_LIMB * (LIMBS + 1) // <= (1 << BITS_PER_LIMB * (LIMBS + 1) + shift) + (res[:d] + BASE**d * res[d : d + LIMBS + 1] - BASE**d * coef * prime)//BASE**d >> BITS_PER_LIMB * (LIMBS + 1) diff --git a/crypto/chacha20poly1305/ecrypt-config.h b/crypto/chacha20poly1305/ecrypt-config.h index 5c0d3810a..0749df730 100644 --- a/crypto/chacha20poly1305/ecrypt-config.h +++ b/crypto/chacha20poly1305/ecrypt-config.h @@ -9,7 +9,7 @@ /* Guess the endianness of the target architecture. */ -/* +/* * The LITTLE endian machines: */ #if defined(__ultrix) /* Older MIPS */ @@ -29,8 +29,8 @@ #elif defined(__INTEL_COMPILER) /* x86 (surely Intel compiler icl.exe) */ #define ECRYPT_LITTLE_ENDIAN -/* - * The BIG endian machines: +/* + * The BIG endian machines: */ #elif defined(__sparc) /* Newer Sparc's */ #define ECRYPT_BIG_ENDIAN @@ -41,7 +41,7 @@ #elif defined(__hppa) /* HP-PA */ #define ECRYPT_BIG_ENDIAN -/* +/* * Finally machines with UNKNOWN endianness: */ #elif defined (_AIX) /* RS6000 */ diff --git a/crypto/chacha20poly1305/ecrypt-portable.h b/crypto/chacha20poly1305/ecrypt-portable.h index da1a79f2a..e5276d846 100644 --- a/crypto/chacha20poly1305/ecrypt-portable.h +++ b/crypto/chacha20poly1305/ecrypt-portable.h @@ -5,8 +5,8 @@ * and should be used carefully. They should NOT be used with * parameters which perform some action. E.g., the following two lines * are not equivalent: - * - * 1) ++x; y = ROTL32(x, n); + * + * 1) ++x; y = ROTL32(x, n); * 2) y = ROTL32(++x, n); */ diff --git a/crypto/chacha20poly1305/ecrypt-sync.h b/crypto/chacha20poly1305/ecrypt-sync.h index 7b8467361..39be5c9bc 100644 --- a/crypto/chacha20poly1305/ecrypt-sync.h +++ b/crypto/chacha20poly1305/ecrypt-sync.h @@ -2,10 +2,10 @@ #define ECRYPT_API /* ecrypt-sync.h */ -/* +/* * Header file for synchronous stream ciphers without authentication * mechanism. - * + * * *** Please only edit parts marked with "[edit]". *** */ @@ -18,7 +18,7 @@ /* Cipher parameters */ -/* +/* * The name of your cipher. */ #define ECRYPT_NAME "ChaCha20" @@ -49,15 +49,15 @@ /* Data structures */ -/* +/* * ECRYPT_ctx is the structure containing the representation of the - * internal state of your cipher. + * internal state of your cipher. */ typedef struct { u32 input[16]; /* could be compressed */ - /* + /* * [edit] * * Put here all state variable needed during the encryption process. @@ -81,10 +81,10 @@ void ECRYPT_init(void); * above. */ void ECRYPT_keysetup( - ECRYPT_ctx* ctx, - const u8* key, - u32 keysize, /* Key size in bits. */ - u32 ivsize); /* IV size in bits. */ + ECRYPT_ctx* ctx, + const u8* key, + u32 keysize, /* Key size in bits. */ + u32 ivsize); /* IV size in bits. */ /* * IV setup. After having called ECRYPT_keysetup(), the user is @@ -93,7 +93,7 @@ void ECRYPT_keysetup( * IV's. */ void ECRYPT_ivsetup( - ECRYPT_ctx* ctx, + ECRYPT_ctx* ctx, const u8* iv); /* @@ -104,7 +104,7 @@ void ECRYPT_ivsetup( * (declared here) encrypts byte strings of arbitrary length, while * the ECRYPT_encrypt_blocks() function (defined later) only accepts * lengths which are multiples of ECRYPT_BLOCKLENGTH. - * + * * The user is allowed to make multiple calls to * ECRYPT_encrypt_blocks() to incrementally encrypt a long message, * but he is NOT allowed to make additional encryption calls once he @@ -124,7 +124,7 @@ void ECRYPT_ivsetup( * * ECRYPT_ivsetup(); * ECRYPT_encrypt_bytes(); - * + * * The following sequence is not: * * ECRYPT_keysetup(); @@ -135,22 +135,22 @@ void ECRYPT_ivsetup( */ void ECRYPT_encrypt_bytes( - ECRYPT_ctx* ctx, - const u8* plaintext, - u8* ciphertext, - u32 msglen); /* Message length in bytes. */ + ECRYPT_ctx* ctx, + const u8* plaintext, + u8* ciphertext, + u32 msglen); /* Message length in bytes. */ void ECRYPT_decrypt_bytes( - ECRYPT_ctx* ctx, - const u8* ciphertext, - u8* plaintext, - u32 msglen); /* Message length in bytes. */ + ECRYPT_ctx* ctx, + const u8* ciphertext, + u8* plaintext, + u32 msglen); /* Message length in bytes. */ /* ------------------------------------------------------------------------- */ /* Optional features */ -/* +/* * For testing purposes it can sometimes be useful to have a function * which immediately generates keystream without having to provide it * with a zero plaintext. If your cipher cannot provide this function @@ -172,7 +172,7 @@ void ECRYPT_keystream_bytes( /* Optional optimizations */ -/* +/* * By default, the functions in this section are implemented using * calls to functions declared above. However, you might want to * implement them differently for performance reasons. @@ -188,22 +188,22 @@ void ECRYPT_keystream_bytes( #define ECRYPT_USES_DEFAULT_ALL_IN_ONE /* [edit] */ void ECRYPT_encrypt_packet( - ECRYPT_ctx* ctx, + ECRYPT_ctx* ctx, const u8* iv, - const u8* plaintext, - u8* ciphertext, + const u8* plaintext, + u8* ciphertext, u32 msglen); void ECRYPT_decrypt_packet( - ECRYPT_ctx* ctx, + ECRYPT_ctx* ctx, const u8* iv, - const u8* ciphertext, - u8* plaintext, + const u8* ciphertext, + u8* plaintext, u32 msglen); /* * Encryption/decryption of blocks. - * + * * By default, these functions are defined as macros. If you want to * provide a different implementation, please undef the * ECRYPT_USES_DEFAULT_BLOCK_MACROS flag and implement the functions @@ -234,23 +234,23 @@ void ECRYPT_decrypt_packet( #else void ECRYPT_encrypt_blocks( - ECRYPT_ctx* ctx, - const u8* plaintext, - u8* ciphertext, - u32 blocks); /* Message length in blocks. */ + ECRYPT_ctx* ctx, + const u8* plaintext, + u8* ciphertext, + u32 blocks); /* Message length in blocks. */ void ECRYPT_decrypt_blocks( - ECRYPT_ctx* ctx, - const u8* ciphertext, - u8* plaintext, - u32 blocks); /* Message length in blocks. */ + ECRYPT_ctx* ctx, + const u8* ciphertext, + u8* plaintext, + u32 blocks); /* Message length in blocks. */ #ifdef ECRYPT_GENERATES_KEYSTREAM void ECRYPT_keystream_blocks( ECRYPT_ctx* ctx, const u8* keystream, - u32 blocks); /* Keystream length in blocks. */ + u32 blocks); /* Keystream length in blocks. */ #endif @@ -264,7 +264,7 @@ void ECRYPT_keystream_blocks( * significant difference and keep the number of variants * (ECRYPT_MAXVARIANT) as small as possible (definitely not more than * 10). Note also that all variants should have exactly the same - * external interface (i.e., the same ECRYPT_BLOCKLENGTH, etc.). + * external interface (i.e., the same ECRYPT_BLOCKLENGTH, etc.). */ #define ECRYPT_MAXVARIANT 1 /* [edit] */ diff --git a/crypto/ed25519-donna/README.md b/crypto/ed25519-donna/README.md index c62262ba3..73eadf8db 100644 --- a/crypto/ed25519-donna/README.md +++ b/crypto/ed25519-donna/README.md @@ -1,12 +1,12 @@ -[ed25519](https://ed25519.cr.yp.to) is an -[Elliptic Curve Digital Signature Algortithm](https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm), -developed by [Dan Bernstein](https://cr.yp.to/djb.html), -[Niels Duif](https://www.nielsduif.nl), -[Tanja Lange](https://hyperelliptic.org/tanja), -[Peter Schwabe](https://cryptojedi.org/peter), +[ed25519](https://ed25519.cr.yp.to) is an +[Elliptic Curve Digital Signature Algortithm](https://en.wikipedia.org/wiki/Elliptic_Curve_Digital_Signature_Algorithm), +developed by [Dan Bernstein](https://cr.yp.to/djb.html), +[Niels Duif](https://www.nielsduif.nl), +[Tanja Lange](https://hyperelliptic.org/tanja), +[Peter Schwabe](https://cryptojedi.org/peter), and [Bo-Yin Yang](https://www.iis.sinica.edu.tw/pages/byyang). -This project provides performant, portable 32-bit & 64-bit implementations. All implementations are +This project provides performant, portable 32-bit & 64-bit implementations. All implementations are of course constant time in regard to secret data. #### Performance @@ -52,16 +52,16 @@ are made. #### Compilation -No configuration is needed **if you are compiling against OpenSSL**. +No configuration is needed **if you are compiling against OpenSSL**. ##### Hash Options If you are not compiling aginst OpenSSL, you will need a hash function. -To use a simple/**slow** implementation of SHA-512, use `-DED25519_REFHASH` when compiling `ed25519.c`. +To use a simple/**slow** implementation of SHA-512, use `-DED25519_REFHASH` when compiling `ed25519.c`. This should never be used except to verify the code works when OpenSSL is not available. -To use a custom hash function, use `-DED25519_CUSTOMHASH` when compiling `ed25519.c` and put your +To use a custom hash function, use `-DED25519_CUSTOMHASH` when compiling `ed25519.c` and put your custom hash implementation in ed25519-hash-custom.h. The hash must have a 512bit digest and implement struct ed25519_hash_context; @@ -75,12 +75,12 @@ custom hash implementation in ed25519-hash-custom.h. The hash must have a 512bit If you are not compiling aginst OpenSSL, you will need a random function for batch verification. -To use a custom random function, use `-DED25519_CUSTOMRANDOM` when compiling `ed25519.c` and put your +To use a custom random function, use `-DED25519_CUSTOMRANDOM` when compiling `ed25519.c` and put your custom hash implementation in ed25519-randombytes-custom.h. The random function must implement: void ED25519_FN(ed25519_randombytes_unsafe) (void *p, size_t len); -Use `-DED25519_TEST` when compiling `ed25519.c` to use a deterministically seeded, non-thread safe CSPRNG +Use `-DED25519_TEST` when compiling `ed25519.c` to use a deterministically seeded, non-thread safe CSPRNG variant of Bob Jenkins [ISAAC](https://en.wikipedia.org/wiki/ISAAC_%28cipher%29) ##### Minor options @@ -144,27 +144,27 @@ To batch verify signatures: /* valid[i] will be set to 1 if the individual signature was valid, 0 otherwise */ int all_valid = ed25519_sign_open_batch(mp, ml, pkp, sigp, num, valid) == 0; -**Note**: Batch verification uses `ed25519_randombytes_unsafe`, implemented in -`ed25519-randombytes.h`, to generate random scalars for the verification code. +**Note**: Batch verification uses `ed25519_randombytes_unsafe`, implemented in +`ed25519-randombytes.h`, to generate random scalars for the verification code. The default implementation now uses OpenSSLs `RAND_bytes`. Unlike the [SUPERCOP](https://bench.cr.yp.to/supercop.html) version, signatures are -not appended to messages, and there is no need for padding in front of messages. -Additionally, the secret key does not contain a copy of the public key, so it is +not appended to messages, and there is no need for padding in front of messages. +Additionally, the secret key does not contain a copy of the public key, so it is 32 bytes instead of 64 bytes, and the public key must be provided to the signing function. ##### Curve25519 -Curve25519 public keys can be generated thanks to -[Adam Langley](https://www.imperialviolet.org/2013/05/10/fastercurve25519.html) +Curve25519 public keys can be generated thanks to +[Adam Langley](https://www.imperialviolet.org/2013/05/10/fastercurve25519.html) leveraging Ed25519's precomputed basepoint scalar multiplication. curved25519_key sk, pk; randombytes(sk, sizeof(curved25519_key)); curved25519_scalarmult_basepoint(pk, sk); -Note the name is curved25519, a combination of curve and ed25519, to prevent +Note the name is curved25519, a combination of curve and ed25519, to prevent name clashes. Performance is slightly faster than short message ed25519 signing due to both using the same code for the scalar multiply. diff --git a/crypto/ed25519-donna/ed25519-donna-impl-base.c b/crypto/ed25519-donna/ed25519-donna-impl-base.c index ed011f571..4598c3923 100644 --- a/crypto/ed25519-donna/ed25519-donna-impl-base.c +++ b/crypto/ed25519-donna/ed25519-donna-impl-base.c @@ -340,7 +340,7 @@ void ge25519_double_scalarmult_vartime2(ge25519 *r, const ge25519 *p1, const big ge25519_full_to_pniels(pre2, p2); for (i = 0; i < S1_TABLE_SIZE - 1; i++) ge25519_pnielsadd(&pre2[i+1], &dp, &pre2[i]); - + ge25519_set_neutral(r); i = 255; @@ -520,7 +520,7 @@ void ge25519_scalarmult_base_niels(ge25519 *r, const uint8_t basepoint_table[256 curve25519_add_reduce(r->y, t.xaddy, t.ysubx); memzero(r->z, sizeof(bignum25519)); curve25519_copy(r->t, t.t2d); - r->z[0] = 2; + r->z[0] = 2; for (i = 3; i < 64; i += 2) { ge25519_scalarmult_base_choose_niels(&t, basepoint_table, i / 2, b[i]); ge25519_nielsadd2(r, &t); diff --git a/crypto/ed25519-donna/ed25519.c b/crypto/ed25519-donna/ed25519.c index a7991b307..c2f988414 100644 --- a/crypto/ed25519-donna/ed25519.c +++ b/crypto/ed25519-donna/ed25519.c @@ -142,7 +142,7 @@ ED25519_FN(ed25519_sign_ext) (const unsigned char *m, size_t mlen, const ed25519 hash_512bits extsk = {0}, hashr = {0}, hram = {0}; /* we don't stretch the key through hashing first since its already 64 bytes */ - + memcpy(extsk, sk, 32); memcpy(extsk+32, skext, 32); diff --git a/crypto/groestl.h b/crypto/groestl.h index aeabf9442..7dd89d28a 100644 --- a/crypto/groestl.h +++ b/crypto/groestl.h @@ -7,7 +7,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -15,10 +15,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/crypto/groestl_internal.h b/crypto/groestl_internal.h index 193680146..3fdd710f0 100644 --- a/crypto/groestl_internal.h +++ b/crypto/groestl_internal.h @@ -19,7 +19,7 @@ * ==========================(LICENSE BEGIN)============================ * * Copyright (c) 2007-2010 Projet RNRT SAPHIR - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -27,10 +27,10 @@ * distribute, sublicense, and/or sell copies of the Software, and to * permit persons to whom the Software is furnished to do so, subject to * the following conditions: - * + * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. diff --git a/crypto/monero/base58.c b/crypto/monero/base58.c index ec6c4d779..6c49d1b24 100644 --- a/crypto/monero/base58.c +++ b/crypto/monero/base58.c @@ -1,21 +1,21 @@ // Copyright (c) 2014-2018, The Monero Project -// +// // All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: -// +// // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. -// +// // 2. Redistributions in binary form must reproduce the above copyright notice, this list // of conditions and the following disclaimer in the documentation and/or other // materials provided with the distribution. -// +// // 3. Neither the name of the copyright holder nor the names of its contributors may be // used to endorse or promote products derived from this software without specific // prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL @@ -25,7 +25,7 @@ // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #include diff --git a/crypto/monero/base58.h b/crypto/monero/base58.h index 628b38eb8..5486d673a 100644 --- a/crypto/monero/base58.h +++ b/crypto/monero/base58.h @@ -1,21 +1,21 @@ // Copyright (c) 2014-2018, The Monero Project -// +// // All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: -// +// // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. -// +// // 2. Redistributions in binary form must reproduce the above copyright notice, this list // of conditions and the following disclaimer in the documentation and/or other // materials provided with the distribution. -// +// // 3. Neither the name of the copyright holder nor the names of its contributors may be // used to endorse or promote products derived from this software without specific // prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL @@ -25,7 +25,7 @@ // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #ifndef __XMR_BASE58_H__ @@ -40,4 +40,4 @@ int xmr_base58_addr_decode_check(const char *addr, size_t sz, uint64_t *tag, voi bool xmr_base58_encode(char *b58, size_t *b58sz, const void *data, size_t binsz); bool xmr_base58_decode(const char *b58, size_t b58sz, void *data, size_t *binsz); -#endif \ No newline at end of file +#endif diff --git a/crypto/monero/int-util.h b/crypto/monero/int-util.h index c6fb225b4..9cba47a8b 100644 --- a/crypto/monero/int-util.h +++ b/crypto/monero/int-util.h @@ -1,21 +1,21 @@ // Copyright (c) 2014-2018, The Monero Project -// +// // All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without modification, are // permitted provided that the following conditions are met: -// +// // 1. Redistributions of source code must retain the above copyright notice, this list of // conditions and the following disclaimer. -// +// // 2. Redistributions in binary form must reproduce the above copyright notice, this list // of conditions and the following disclaimer in the documentation and/or other // materials provided with the distribution. -// +// // 3. Neither the name of the copyright holder nor the names of its contributors may be // used to endorse or promote products derived from this software without specific // prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL @@ -25,7 +25,7 @@ // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// // Parts of this file are originally copyright (c) 2012-2013 The Cryptonote developers #pragma once diff --git a/crypto/sha2.c b/crypto/sha2.c index b37e5cb41..f280e1fdd 100644 --- a/crypto/sha2.c +++ b/crypto/sha2.c @@ -71,7 +71,7 @@ * * And for little-endian machines, add: * - * #define BYTE_ORDER LITTLE_ENDIAN + * #define BYTE_ORDER LITTLE_ENDIAN * * Or for big-endian machines: * @@ -795,7 +795,7 @@ void sha256_Transform(const sha2_word32* state_in, const sha2_word32* data, sha2 s1 = sigma1_256(s1); /* Apply the SHA-256 compression function to update a..h */ - T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + + T1 = h + Sigma1_256(e) + Ch(e, f, g) + K256[j] + (W256[j&0x0f] += s1 + W256[(j+9)&0x0f] + s0); T2 = Sigma0_256(a) + Maj(a, b, c); h = g; diff --git a/docs/ci/index.md b/docs/ci/index.md index 281396dca..b6f34a115 100644 --- a/docs/ci/index.md +++ b/docs/ci/index.md @@ -2,6 +2,6 @@ The complete test suite is running on a public [GitLab CI](https://gitlab.com/satoshilabs/trezor/trezor-firmware). If you are an external contributor, we also have a [Travis instance](https://travis-ci.org/trezor/trezor-firmware) where a small subset of tests is running as well - mostly style and easy fast checks, which are quite common to fail for new contributors. -See this [list](jobs.md) of CI jobs descriptions for more info. +See this [list](jobs.md) of CI jobs descriptions for more info. The CI folder contains all the .yml GitLab files that are included in the main `.gitlab.yml` to provide some basic structure. All GitLab CI Jobs run inside a docker image, which is built using the present `Dockerfile`. This image is stored in the GitLab registry. diff --git a/docs/ci/jobs.md b/docs/ci/jobs.md index 6ee77273b..285081bba 100644 --- a/docs/ci/jobs.md +++ b/docs/ci/jobs.md @@ -4,8 +4,8 @@ ### Environment -Environment job builds the `ci/Dockerfile` and pushes the built docker image -into our GitLab registry. Since modifications of this Dockerfile are very rare +Environment job builds the `ci/Dockerfile` and pushes the built docker image +into our GitLab registry. Since modifications of this Dockerfile are very rare this si a _manual_ job which needs to be triggered on GitLab. Almost all CI jobs run inside this docker image. diff --git a/docs/common/communication/passphrase-redesign-migration.md b/docs/common/communication/passphrase-redesign-migration.md index 8616fa1b1..6c7edfdeb 100644 --- a/docs/common/communication/passphrase-redesign-migration.md +++ b/docs/common/communication/passphrase-redesign-migration.md @@ -145,5 +145,5 @@ both T1 and TT with both older and newer firmwares. of `state` as `stored_session_id`, and respond with `Deprecated_PassphraseStateAck` with no fields set. -Note: up to 64 bytes may be required to store the session ID. Firmwares < 2.3.0 use a +Note: up to 64 bytes may be required to store the session ID. Firmwares < 2.3.0 use a 64-byte value, newer firmwares use a 32-byte value. diff --git a/docs/common/communication/passphrase.md b/docs/common/communication/passphrase.md index 61e539069..7c51da4f4 100644 --- a/docs/common/communication/passphrase.md +++ b/docs/common/communication/passphrase.md @@ -1,7 +1,7 @@ -# Passphrase +# Passphrase As of 1.9.0 / 2.3.0 we have changed how [passphrase](https://wiki.trezor.io/Passphrase) is communicated between the host and the device. For migration information for existing Hosts communicating with Trezor please see this [document](passphrase-redesign-migration.md). - + Passphrase is very tightly coupled with _sessions_. The reader is encouraged to read on that topic first in the [sessions.md](sessions.md) section. ## Scheme @@ -9,11 +9,11 @@ Passphrase is very tightly coupled with _sessions_. The reader is encouraged to As soon as Trezor needs the passphrase to do BIP-39/SLIP-39 derivations it prompts the user for passphrase. ``` -GetAddress(...) +GetAddress(...) ---------> PassphraseRequest() <--------- PassphraseAck -(str passphrase, bool on_device) +(str passphrase, bool on_device) ---------> Address(...) <--------- ``` @@ -30,7 +30,7 @@ On an initialized device with passphrase enabled a common communication starts l Initialize() ---------> Features(..., session_id) <--------- -GetAddress(...) +GetAddress(...) ---------> PassphraseRequest() <--------- PassphraseAck(...) @@ -38,7 +38,7 @@ PassphraseAck(...) <--------- ``` -The device requested the passphrase since the BIP-39/SLIP-39 seed is not yet cached. After this workflow the seed is cached and the passphrase will therefore never be requested again unless the session is cleared*. +The device requested the passphrase since the BIP-39/SLIP-39 seed is not yet cached. After this workflow the seed is cached and the passphrase will therefore never be requested again unless the session is cleared*. Since we do not have sessions, the Host can not be sure that someone else has not used the device and applied another session id (e.g. changed the Passphrase). To work around this we send the session id again on every subsequent message. See more on that in [session.md](). @@ -46,7 +46,7 @@ Since we do not have sessions, the Host can not be sure that someone else has no Initialize(session_id) ---------> Features(..., session_id) <--------- -GetPublicKey(...) +GetPublicKey(...) ---------> PublicKey(...) <--------- ``` diff --git a/docs/common/index.md b/docs/common/index.md index 36b5be9b2..e09758e45 100644 --- a/docs/common/index.md +++ b/docs/common/index.md @@ -10,6 +10,6 @@ JSON coin definitions and support tables. Common Protobuf definitions for the Trezor protocol. Also see [Communication](communication/index.md). -## Tools +## Tools Tools for managing coin definitions and related data. diff --git a/docs/core/build/emulator.md b/docs/core/build/emulator.md index 1d893c4a6..0325956cb 100644 --- a/docs/core/build/emulator.md +++ b/docs/core/build/emulator.md @@ -1,6 +1,6 @@ # Build instructions for Emulator (Unix port) -First clone, initialize submodules, install Poetry and enter the Poetry shell as +First clone, initialize submodules, install Poetry and enter the Poetry shell as defined [here](index.md). **Do not forget you need to be in a `poetry shell` environment!** diff --git a/docs/core/misc/slip0039.md b/docs/core/misc/slip0039.md index f3deebd2d..7c81fd96e 100644 --- a/docs/core/misc/slip0039.md +++ b/docs/core/misc/slip0039.md @@ -44,7 +44,7 @@ SLIP-39 provides the following high-level API: * `generate_mnemonics(group parameters, master_secret, passphrase)`: Encrypt Master Secret with the provided passphrase, and split into a number of shares defined via - the group parameters. + the group parameters. Implemented using the following: - `encrypt(master_secret, passphrase, iteration_exponent, identifier)`: Encrypt the Master Secret with the given passphrase and parameters. @@ -52,7 +52,7 @@ SLIP-39 provides the following high-level API: Split the encrypted secret and encode the metadata into a set of shares defined via the group parameters. * `combine_mnemonics(set of shares, passphrase)`: Combine the given set of shares to - reconstruct the secret, then decrypt it with the provided passphrase. + reconstruct the secret, then decrypt it with the provided passphrase. Implemented using the following: - **`recover_ems(set of shares)`**: Combine the given set of shares to obtain the encrypted master secret, identifier and iteration exponent. diff --git a/docs/index.md b/docs/index.md index 60f62b5df..ecedafe4f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,7 +2,7 @@ _This documentation can also be found at [docs.trezor.io](https://docs.trezor.io) where it is available in a HTML-built version compiled using [mdBook](https://github.com/rust-lang/mdBook)._ -Welcome to the Trezor Firmware repository. This repository is so called _monorepo_, it contains several different yet very related projects that together form the Trezor Firmware ecosystem. +Welcome to the Trezor Firmware repository. This repository is so called _monorepo_, it contains several different yet very related projects that together form the Trezor Firmware ecosystem. ## Repository Structure diff --git a/docs/legacy/index.md b/docs/legacy/index.md index ad8e32042..d4e36fb73 100644 --- a/docs/legacy/index.md +++ b/docs/legacy/index.md @@ -99,7 +99,7 @@ Step 3 should produce the same fingerprint like your local build (for the same v **WARNING: This will erase the recovery seed stored on the device! You should never do this on Trezor that contains coins!** -Build with `MEMORY_PROTECT=0` or you will get a hard fault on your device. +Build with `MEMORY_PROTECT=0` or you will get a hard fault on your device. Switch your device to bootloader mode, then execute: ```sh diff --git a/docs/misc/review.md b/docs/misc/review.md index cc7000310..e5b70ca4c 100644 --- a/docs/misc/review.md +++ b/docs/misc/review.md @@ -20,7 +20,7 @@ `git commit --fixup [commithash]` which creates a new commit with the message "fixup! [orig_message]", where orig_message is the commit message of the `commithash` it "fixes". If the fixes are across multiple earlier commits, then they need to be split into multiple fixup commits. - 5. The author informs the reviewer with a simple comment "done" or similar to tell the reviewer + 5. The author informs the reviewer with a simple comment "done" or similar to tell the reviewer their comment was implemented. Bonus points for including a revision of the fixup commit. 6. The reviewer reviews the modifications and when they are finally satisfied they resolve the Github comment. @@ -35,7 +35,7 @@ If you find the description too difficult, then here is an example to make it more clear. Andrew tries to add a number of commits very well structured and with nice and consistent commit -messages. These will _not_ be squashed together. +messages. These will _not_ be squashed together. ![](review-1.png) @@ -43,7 +43,7 @@ Matějčík starts to review and finds something he would like to improve: ![](review-2.png) -Andrew responds with a commit hash 55d883b informing that he has accepted and implemented the +Andrew responds with a commit hash 55d883b informing that he has accepted and implemented the comment. This commit is a fixup commit. Since it is a new commit he does not have to force-push. In the diff --git a/docs/misc/update-wipes.md b/docs/misc/update-wipes.md index 24dc11003..9564b906f 100644 --- a/docs/misc/update-wipes.md +++ b/docs/misc/update-wipes.md @@ -8,7 +8,7 @@ update. The device gets **wiped**: - If the firmware to be installed is unsigned. - If the present firmware is unsigned. -- If the firmware to be installed has lower version than the current firmware's +- If the firmware to be installed has lower version than the current firmware's _fix_version_ [1]. The device gets **wiped on every reboot**: @@ -41,8 +41,8 @@ The device gets **wiped on every reboot**: ---- -[1] Firmware contains a _fix_version_, which is the lowest version to which that -particular firmware can be downgraded without wiping storage. This is typically used in +[1] Firmware contains a _fix_version_, which is the lowest version to which that +particular firmware can be downgraded without wiping storage. This is typically used in case the internal storage format is changed. For example, in version 2.2.0, we have introduced Wipe Code, which introduced some changes to storage that the older firmwares (e.g. 2.1.8) would not understand. It can also be used to enforce security fixes. diff --git a/docs/tests/index.md b/docs/tests/index.md index af59ca6a7..e09c2f1d2 100644 --- a/docs/tests/index.md +++ b/docs/tests/index.md @@ -6,7 +6,7 @@ These tests are doing a simple read/write operations on the device to see if the ## Device tests -Device tests are integration tests that can be run against either emulator or on an actual device. +Device tests are integration tests that can be run against either emulator or on an actual device. You are responsible to provide either an emulator or a device with Debug mode present. ### Device tests @@ -17,7 +17,7 @@ See [device-tests.md](device-tests.md) for instructions how to run it. ### UI tests -UI tests use device tests and take screenshots of every screen change and compare them against fixtures. Currently for model T only. +UI tests use device tests and take screenshots of every screen change and compare them against fixtures. Currently for model T only. See [ui-tests.md](ui-tests.md) for more info. diff --git a/legacy/README.md b/legacy/README.md index bb4e55a42..7ae74e077 100644 --- a/legacy/README.md +++ b/legacy/README.md @@ -1,5 +1,5 @@ # Trezor Legacy -Firmware currently running on Model One. If you are working on a new feature, you probably want to contribute this to Core. +Firmware currently running on Model One. If you are working on a new feature, you probably want to contribute this to Core. See [`docs/legacy`](../docs/legacy/index.md) for more info. diff --git a/legacy/firmware/ethereum_tokens.c.mako b/legacy/firmware/ethereum_tokens.c.mako index 277b3c310..a16d60da9 100644 --- a/legacy/firmware/ethereum_tokens.c.mako +++ b/legacy/firmware/ethereum_tokens.c.mako @@ -11,7 +11,7 @@ const TokenType tokens[TOKENS_COUNT] = { }; static const TokenType _UnknownToken = { 0, "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff", " UNKN", 0 }; -const TokenType *UnknownToken = &_UnknownToken; +const TokenType *UnknownToken = &_UnknownToken; const TokenType *tokenByChainAddress(uint32_t chain_id, const uint8_t *address) { diff --git a/legacy/firmware/lisk.c b/legacy/firmware/lisk.c index db08ef350..0b3d18a39 100644 --- a/legacy/firmware/lisk.c +++ b/legacy/firmware/lisk.c @@ -351,4 +351,4 @@ void layoutRequireConfirmMultisig(LiskTransactionAsset *asset) { layoutDialogSwipe(&bmp_icon_question, _("Cancel"), _("Confirm"), NULL, _("Confirm transaction"), keys_group_str, life_time_str, min_str, NULL, NULL); -} \ No newline at end of file +} diff --git a/python/docs/transaction-format.md b/python/docs/transaction-format.md index 1b033bb48..5d8ddceb8 100644 --- a/python/docs/transaction-format.md +++ b/python/docs/transaction-format.md @@ -92,7 +92,6 @@ message TxOutputType { optional MultisigRedeemScriptType multisig = 5; // multisig output definition optional bytes op_return_data = 6; // defines op_return data optional uint32 decred_script_version = 7; // only for Decred - ``` All outputs must have an `amount` and a `script_type`. @@ -190,13 +189,13 @@ Otherwise the encoding is identical: The JSON below encodes a transaction with the following inputs: -* [e9cec1644db8fa95fe639a9b503a63ea587d2f4e480d3847703e3ec73adf6b5a](https://btc5.trezor.io/tx/e9cec1644db8fa95fe639a9b503a63ea587d2f4e480d3847703e3ec73adf6b5a) - output **0** (P2PKH address 1Jw5FrKhi2aWbbF4h3QRWLog5AjsJYGswv) - at derivation path **m/44'/0'/0'/0/282** +* [e9cec1644db8fa95fe639a9b503a63ea587d2f4e480d3847703e3ec73adf6b5a](https://btc5.trezor.io/tx/e9cec1644db8fa95fe639a9b503a63ea587d2f4e480d3847703e3ec73adf6b5a) + output **0** (P2PKH address 1Jw5FrKhi2aWbbF4h3QRWLog5AjsJYGswv) + at derivation path **m/44'/0'/0'/0/282** amount **85 170** sat -* [1f545c0ca1f2c055e199c70457025c1e393edd013a274a976187115a5c601155](https://btc5.trezor.io/tx/1f545c0ca1f2c055e199c70457025c1e393edd013a274a976187115a5c601155) - output **0** (P2SH-SegWit address 3DEAk9KGrgvj2gHQ1hyfCXus9hZr9K8Beh) - at derivation path **m/49'/0'/0'/0/55** +* [1f545c0ca1f2c055e199c70457025c1e393edd013a274a976187115a5c601155](https://btc5.trezor.io/tx/1f545c0ca1f2c055e199c70457025c1e393edd013a274a976187115a5c601155) + output **0** (P2SH-SegWit address 3DEAk9KGrgvj2gHQ1hyfCXus9hZr9K8Beh) + at derivation path **m/49'/0'/0'/0/55** amount **500 000** sat And the following outputs: diff --git a/tests/fido_tests/u2f-tests-hid/LICENSE b/tests/fido_tests/u2f-tests-hid/LICENSE index cf78a508a..3b8c9094b 100644 --- a/tests/fido_tests/u2f-tests-hid/LICENSE +++ b/tests/fido_tests/u2f-tests-hid/LICENSE @@ -20,8 +20,8 @@ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.