instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
tox-dev__tox__2413
tox-dev/tox
2,413
defect
d18459072dc7bf00689a048c6399c4e4068b6959
e4ea7b065b751c5c1443603b4e2b7b2e5aaf8190
Display registered plugins with --version
Ref #2358 Hi! First time contributing here. I tried to display the registered plugins when calling `tox --version`, by looking at how it was done on [master](https://github.com/tox-dev/tox/blob/master/src/tox/config/__init__.py#L359). Looks like this works, however the formatter used by `argparse` removes `\n` ...
diff --git a/src/tox/session/cmd/version_flag.py b/src/tox/session/cmd/version_flag.py index 52797b6e25..329bb6c4ff 100644 --- a/src/tox/session/cmd/version_flag.py +++ b/src/tox/session/cmd/version_flag.py @@ -7,6 +7,7 @@ from tox.config.cli.parser import ToxParser from tox.plugin import impl +from tox.plugin.mana...
6
6
4
[{"id": "G0", "claim": "tox v3 shows nothing when no plugins are installed, so the plugin information should only be shown when a plugin is installed instead of always printing a plugins section.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The CI runs...
null
tox-dev__tox__2554
tox-dev/tox
2,554
defect
c669b4eba943ec54e6f9f40d8f75973ceb807a43
f0d5bd18df028d0ab9626f7a5ec072af8c4b68ef
Allow installing relative paths that go outside tox root folder
Fixes: #2366 which is caused by https://github.com/python/cpython/issues/67271 ## Thanks for contributing a pull request! If you are contributing for the first time or provide a trivial fix don't worry too much about the checklist - we will help you get started. ## Contribution checklist: (also see [CONTRI...
diff --git a/docs/changelog/2366.bugfix.rst b/docs/changelog/2366.bugfix.rst new file mode 100644 index 0000000000..dd75df8ed3 --- /dev/null +++ b/docs/changelog/2366.bugfix.rst @@ -0,0 +1 @@ +Allow installing relative paths that go outside tox root folder. - by :user:`ssbarnea`. diff --git a/src/tox/tox_env/python/pip...
2
1
1
[{"id": "G0", "claim": "Guard the try/except ValueError workaround in RequirementsFile.__init__ with a version filter so it is remembered for removal once a CPython fix lands in the lowest supported version.", "category": "maintainability", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "c...
null
tox-dev__tox__2861
tox-dev/tox
2,861
defect
793132d79bbfa158d416977fde280f14550525ec
9329377e9e64d0b44e7e26a8584cf3adf3a33bf1
Rewrite substitution parser
* Fix issue #2732 by rewriting the regex-based substitution expression parser with a recursive-style parser. * Substitutions are processed left to right, inner-most to outer-most. * After a replacement is made in a string, the replaced part of the string will NOT affect characters after it. the result of a replacemen...
diff --git a/docs/changelog/2372.bugfix.rst b/docs/changelog/2372.bugfix.rst new file mode 100644 index 0000000000..4e410354bf --- /dev/null +++ b/docs/changelog/2372.bugfix.rst @@ -0,0 +1,7 @@ +Rewrite substitution replacement parser - by :user:`masenf` + +* ``\`` acts as a proper escape for ``\`` in ini-style substit...
4
2
0
[{"id": "G0", "claim": "The change is more a feature than a bugfix since it alters the substitution logic, so the changelog entry should not be filed as a bugfix.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "MatchError should have a docstring in...
null
tox-dev__tox__2865
tox-dev/tox
2,865
defect
7ccd0f10c72bfbddb5c62636dfa6d4c02ecc591c
3dad658b0c615056abfd22d95e498d440b41e7af
Provision: ignore other test environments
When running provision, ignore other environments, since their configuration might not be valid until running in the provisioned environment. When creating provision environment, seed the loader early via `memory_seed_loader` to ensure it's available when the environment is created. The provision environment must be...
diff --git a/docs/changelog/2862.bugfix.rst b/docs/changelog/2862.bugfix.rst new file mode 100644 index 0000000000..f8d56b3c71 --- /dev/null +++ b/docs/changelog/2862.bugfix.rst @@ -0,0 +1,3 @@ +Always use ``VirtualEnvRunner`` to evaluate the provision environment triggered by +``minversion`` or ``requires`` mismatch. ...
4
3
2
[{"id": "G0", "claim": "The provision environment's runner is hardcoded to VirtualEnvRunner via add_constant; it should instead be a default that users can override in the .tox testenv section.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The provision...
null
tox-dev__tox__3044
tox-dev/tox
3,044
defect
40411cffa93c95e8484c9ff5ba2377392fa15e8c
a67dc933fd13bf52ac967d02dd69a47d2137862f
Ensure `get_requires*` hook is called before `prepare_metadata*`
<!-- Thank you for your contribution! Please, make sure you address all the checklists (for details on how see [development documentation](http://tox.readthedocs.org/en/latest/development.html#development))! --> As described in #3043, it seems that for some circumstances the `prepare_metadata*` hook is not calle...
diff --git a/docs/changelog/3043.bugfix.rst b/docs/changelog/3043.bugfix.rst new file mode 100644 index 0000000000..e1bb887e3a --- /dev/null +++ b/docs/changelog/3043.bugfix.rst @@ -0,0 +1 @@ +Ensure that ``get_requires*`` build hooks are called before ``prepare_metadata*`` diff --git a/src/tox/tox_env/python/virtual_e...
4
3
2
[{"id": "G0", "claim": "The pull request should include a test that defines an inline build backend which fails prepare_metadata when get_requires was not called first, triggered via a no-test run.", "category": "testing", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The chan...
null
tox-dev__tox__3076
tox-dev/tox
3,076
defect
5e28aff15cea3873ec4c999c852071482e8394d1
5b829ab4949ea4ac7d27f32a4e622b8b0e4280f4
Make --hashseed default to PYTHONHASHSEED, if defined
The main motivation for this is to able to set the hash seed when building the documentation with "tox -e docs", and thus avoid embedding a random value in the tox documentation for --help. This caused documentation builds to fail to build reproducibly. Fixes #2942 <!-- Thank you for your contribution! Please...
diff --git a/docs/changelog/2942.feature.rst b/docs/changelog/2942.feature.rst new file mode 100644 index 0000000000..271ee78ca0 --- /dev/null +++ b/docs/changelog/2942.feature.rst @@ -0,0 +1,5 @@ +Make --hashseed default to PYTHONHASHSEED, if defined - by :user:`paravoid`. +The main motivation for this is to able to s...
2
1
1
[{"id": "G0", "claim": "The pull request's new --hashseed-from-PYTHONHASHSEED behaviour ships with no tests and gaborbernat asks that tests be added.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "The new PYTHONHASHSEED default may duplicate what `env T...
null
tox-dev__tox__3099
tox-dev/tox
3,099
defect
29b5e42fe187556d10f8e0e9feddb0c93ee19e9e
fe1365ed9f9cdd35a49daa34ac29e256d1102301
Accept environments with defined factors or of python selector form - suggest closest
Fixes: #3096 The `4.9.0` introduced a regression to valid environments: Hyphenated environments: ```ini [tox] env_list=a-b ... ``` Combined environments: ```ini [tox] env_list=a commands = with: python -c 'print("with")' !with: python -c 'print("without")' ``` - [X] ran the linter t...
diff --git a/src/tox/session/env_select.py b/src/tox/session/env_select.py index 9b14a4ac45..bed5dd876b 100644 --- a/src/tox/session/env_select.py +++ b/src/tox/session/env_select.py @@ -4,7 +4,7 @@ import re from collections import Counter from dataclasses import dataclass -from itertools import chain +from itertoo...
3
2
2
[{"id": "G0", "claim": "Environments of bare python version selector form such as 3.9 or 3.11 should also be handled as an exception and accepted, e.g. via a regex.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Matching env names against two-factor...
null
tox-dev__tox__3122
tox-dev/tox
3,122
defect
381e37aa9205686ea1276e94c1955d128c7a5146
e5282a6b6ddac8caaa840380c5a6a8a72784ebbc
Fix error caused by a bad `base_python` path
<!-- Thank you for your contribution! Please, make sure you address all the checklists (for details on how see [development documentation](http://tox.readthedocs.org/en/latest/development.html#development))! --> Resolves #3105 by catching the `FileNotFoundError` that gets raised when `usedevelop=true` in combina...
diff --git a/docs/changelog/3105.bugfix.rst b/docs/changelog/3105.bugfix.rst new file mode 100644 index 0000000000..dd87507cd4 --- /dev/null +++ b/docs/changelog/3105.bugfix.rst @@ -0,0 +1 @@ +Handle ``FileNotFoundError`` when the ``base_python`` interpreter doesn't exist diff --git a/src/tox/tox_env/python/virtual_env...
1
1
0
[{"id": "G0", "claim": "The new test should assign the tox.ini content to an `ini` variable and pass it on a single line (`project = tox_project({\"tox.ini\": ini})`) instead of the multi-line dict literal.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tox-dev__tox__3172
tox-dev/tox
3,172
defect
383845adaadfe79f645d80ec6e2ee329ca6ffd7e
e9c339bb76509cb04d6f9a97676487152c9228f0
Always pass FORCE_COLOR & NO_COLOR to the environment
The environment variables `FORCE_COLOR` and `NO_COLOR`are a popular way to force or disable color output. An example usage is pytest being run under a CI system. - [x] ran the linter to address style issues (`tox -e fix`) - [x] wrote descriptive pull request text - [x] ensured there are test(s) validating the fix ...
diff --git a/docs/changelog/3171.feature.rst b/docs/changelog/3171.feature.rst new file mode 100644 index 0000000000..1527d0f4fe --- /dev/null +++ b/docs/changelog/3171.feature.rst @@ -0,0 +1 @@ +Always ``PY_COLORS`` to the environment diff --git a/src/tox/tox_env/api.py b/src/tox/tox_env/api.py index 45bbc5ce1c..2be6f...
4
4
3
[{"id": "G0", "claim": "The core default pass_env should use the standard env vars FORCE_COLOR and NO_COLOR instead of the app-specific PY_COLORS.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "FORCE_COLOR and NO_COLOR are only handled by the config CLI ...
null
tox-dev__tox__3288
tox-dev/tox
3,288
defect
406f80887f757ba430c79280ad767492cf046296
c60aab899ae21eb47ffc7461b3a2d4bab7ed0a60
Allow `ConfigSet.add_config` to receive parameterized generics for `of_type`.
Allow `ConfigSet.add_config` to receive parameterized generics for `of_type`. Fixes: #3287 <!-- Thank you for your contribution! Please, make sure you address all the checklists (for details on how see [development documentation](http://tox.readthedocs.org/en/latest/development.html#development))! --> - [x...
diff --git a/docs/changelog/3288.bugfix.rst b/docs/changelog/3288.bugfix.rst new file mode 100644 index 0000000000..bae1e504e8 --- /dev/null +++ b/docs/changelog/3288.bugfix.rst @@ -0,0 +1 @@ +Allow ``ConfigSet.add_config`` to receive parameterized generics for ``of_type``. diff --git a/src/tox/config/loader/convert.py...
1
1
1
[{"id": "G0", "claim": "The pull request cannot be accepted without tests covering its new parameterized-generic conversion behaviour.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
tox-dev__tox__3321
tox-dev/tox
3,321
defect
add99edff0ac34520d637d0ce60f8902b1a95b55
87cb1a8f524cdaaec70c311653f76d483344d737
Fix #3318 - Suppress spinner in parallel runs in CI
Suppress spinner in parallel run in CI (not legacy though).
diff --git a/docs/changelog/3318.feature.rst b/docs/changelog/3318.feature.rst new file mode 100644 index 0000000000..eaa5ba3508 --- /dev/null +++ b/docs/changelog/3318.feature.rst @@ -0,0 +1 @@ +Suppress spinner in parallel runs in CI - by :user:`ziima`. diff --git a/src/tox/session/cmd/run/parallel.py b/src/tox/sessi...
1
1
0
[{"id": "G0", "claim": "The new CI tests should use the project's already practiced test tooling - pytest-mock's mocker fixture for patching objects and pytest's built-in monkeypatch fixture for patching os.environ - instead of unittest.mock and patch.dict.", "category": "testing", "verdict": "supported", "priority": "...
null
tox-dev__tox__3325
tox-dev/tox
3,325
defect
add99edff0ac34520d637d0ce60f8902b1a95b55
860b3ef16b252e2fe3911d8c2493c6fac3d0bacb
Fix absolute base python paths conflicting
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4802b3502c..4505e10767 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: push: branches: ["main"] - tags-ignore: [ "**" ] + tags-ignore: ["**"] pull_request: ...
3
2
2
[{"id": "G0", "claim": "Adding new abstract methods to the Python base class breaks third-party extensions that implement this abstract class, as reported by tox-current-env issue 77.", "category": "design", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The bitness check `sys.ma...
null
tox-dev__tox__3327
tox-dev/tox
3,327
defect
dde496464b25484720ea4327429ae17cafcf1131
ef418319e76affd8bea7c7c8737bf075f7c4f41c
Fixup the spec string for sys.executable
The previous spec string was: namespace(name='cpython', cache_tag='cpython-313', version=sys.version_info(major=3, minor=13, micro=0, releaselevel='candidate', serial=1), hexversion=51183809, _multiarch='x86_64-linux-gnu')313-True When it was supposed to be: cpython313-64 Fixes https://github.com/to...
diff --git a/src/tox/tox_env/python/api.py b/src/tox/tox_env/python/api.py index d27ca45d9a..003014317e 100644 --- a/src/tox/tox_env/python/api.py +++ b/src/tox/tox_env/python/api.py @@ -157,6 +157,14 @@ def extract_base_python(cls, env_name: str) -> str | None: return next(iter(candidates)) retur...
4
3
1
[{"id": "G0", "claim": "The `bits` value can be an int here rather than a string literal.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new `python_spec_for_sys_executable` classmethod should be made private.", "category": "design", "verdic...
null
tox-dev__tox__3426
tox-dev/tox
3,426
defect
ab51e14610ee5018f5e9756c13139ad2cebd90c4
4e18a4f3cf5d78dcb8be5513c741036be320f559
Adds ability to configure stderr output color
This feature will allow users to control the coloring of stderr with tox, including ability to avoiding adding colors to it, while still using colors as many tools are already producing colored output. Please, make sure you address all the checklists (for details on how see [development documentation](http://tox.re...
diff --git a/src/tox/config/cli/parser.py b/src/tox/config/cli/parser.py index 45ede3cdc0..c265f012f3 100644 --- a/src/tox/config/cli/parser.py +++ b/src/tox/config/cli/parser.py @@ -11,6 +11,8 @@ from pathlib import Path from typing import TYPE_CHECKING, Any, Callable, Dict, List, Literal, Optional, Sequence, Tuple,...
2
2
2
[{"id": "G0", "claim": "Do not add the '0' choice to --stderr-color for disabling coloring, since the existing NO_COLOR environment variable already covers disabling color.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "The build is failing, so there is ...
null
tox-dev__tox__3446
tox-dev/tox
3,446
defect
dbbb04360a4f35be6d3119ce742d9c0cd215b477
602de5b822c029a518750ccdf0e1e84e64590890
feat: adding a json schema command
Started on a `schema` command that produces a JSONSchema. Includes a `--strict` mode that doesn't allow extra unknown commands. Mostly respects and supports plugins (tox-gh and tox-uv tested locally). <!-- Thank you for your contribution! Please, make sure you address all the checklists (for details on how see [...
diff --git a/docs/changelog/3446.feature.rst b/docs/changelog/3446.feature.rst new file mode 100644 index 0000000000..6edb4c852f --- /dev/null +++ b/docs/changelog/3446.feature.rst @@ -0,0 +1,3 @@ +Add a ``schema`` command to produce a JSON Schema for tox and the current plugins. + +- by :user:`henryiii` diff --git a/s...
2
2
1
[{"id": "G0", "claim": "The generated schema should be validated in CI using python-jsonschema (as ansible-lint already does for ~20 schemas), so that an invalid schema is caught.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Keeping a continually rend...
null
tox-dev__tox__3521
tox-dev/tox
3,521
defect
4a8e50e2cdd420d0b058b747092dbfc72192db51
06da3465c4975307cf846ce6aec1c32f5afed0fe
Fix for tox4 regression issue with setenv file and substitutions (#2435)
This PR contains fix for the issue #2435. (https://github.com/tox-dev/tox/issues/2435#issuecomment-1825747833) Please, make sure you address all the checklists (for details on how see [development documentation](http://tox.readthedocs.org/en/latest/development.html#development))! --> - [+ ] ran the linter to add...
diff --git a/src/tox/config/set_env.py b/src/tox/config/set_env.py index 0686200c32..339e8f702b 100644 --- a/src/tox/config/set_env.py +++ b/src/tox/config/set_env.py @@ -34,8 +34,8 @@ def __init__( # noqa: C901, PLR0912 return for line in raw.splitlines(): # noqa: PLR1702 if line.s...
4
2
0
[{"id": "G0", "claim": "No single letter variables outside of comprehensions — the loop variables k and v added in __iter__ must be renamed.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks for an explanation of the change at set...
null
tox-dev__tox__3530
tox-dev/tox
3,530
defect
7c3fae80cf4a68e126a3ae222ceebdc82cc44b68
6859b3bf13c74e81e696aaee39d3f2e710b00509
Prevent Tox from hanging with `--installpkg` sdist due to orphaned build backend
See the discussion on the issue (#3512) for the detailed explanation of the problem. Fixes #3512. <!-- Thank you for your contribution! Please, make sure you address all the checklists (for details on how see [development documentation](http://tox.readthedocs.org/en/latest/development.html#development))! --> ...
diff --git a/src/tox/tox_env/python/virtual_env/package/pyproject.py b/src/tox/tox_env/python/virtual_env/package/pyproject.py index 4b4be011f9..b1a287f842 100644 --- a/src/tox/tox_env/python/virtual_env/package/pyproject.py +++ b/src/tox/tox_env/python/virtual_env/package/pyproject.py @@ -118,8 +118,15 @@ def root(sel...
5
5
3
[{"id": "G0", "claim": "The pull request needs a test and a changelog entry.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "The pull request's CI needs to be fixed.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "unclear...
null
tox-dev__tox__3543
tox-dev/tox
3,543
defect
c5dccb89fcbb51be7d4935cd9582c3b4f328a81e
e26b6757b44a355f4dfff23e58bd13c7c200a4e7
Log environment variables sorted by key while redacting values of unsafe ones
Improves logging of environment variables by sorting them by key and redacting the values for the ones that are likely to contain secrets. Fixes: #3542 <!-- Thank you for your contribution! Please, make sure you address all the checklists (for details on how see [development documentation](http://tox.readthed...
diff --git a/docs/changelog/3542.bugfix.rst b/docs/changelog/3542.bugfix.rst new file mode 100644 index 0000000000..b608564c6c --- /dev/null +++ b/docs/changelog/3542.bugfix.rst @@ -0,0 +1,2 @@ +Improves logging of environment variables by sorting them by key and redacting +the values for the ones that are likely to co...
4
4
2
[{"id": "G0", "claim": "The parametrized redaction test added in S1 covers only some of the patterns matched by the secret-detection regex; it should test all of them.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "All the secret-redaction patterns shou...
null
tox-dev__tox__3578
tox-dev/tox
3,578
defect
7d4cb4e92650545cd4eb45501320d2e2eb6ac2d2
1953e4f8e9b98dc43fb5bf9e707bec77f951c9ec
fix: provide clear messaging about config file loading
Fix bug where tox is silently ignoring loading pyproject.toml files that failed be loaded by tomllint and falling back to other config. - if pyproject.toml does not have one of the two expected sections it will be logged, so it would be visible with `-v` - make pyproject.toml failure to load a fatal error with clear...
diff --git a/docs/changelog/3578.bugfix.rst b/docs/changelog/3578.bugfix.rst new file mode 100644 index 0000000000..236ab29210 --- /dev/null +++ b/docs/changelog/3578.bugfix.rst @@ -0,0 +1,2 @@ +Makes the error message more clear when pyproject.toml file cannot be loaded +or is missing expected keys. diff --git a/src/t...
2
1
0
[{"id": "G0", "claim": "Do not use single-letter variable names (such as the `e` in the new except blocks) outside of comprehensions.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "This change may have caused a regression: when a setup.cfg exist...
null
tox-dev__tox__3591
tox-dev/tox
3,591
defect
eceba31061fb01f6077f5cd1a93a5b1f01175591
d0c37b1bb90d75dc65fff7381f7a61590c3b19a7
Expose a new `tox_extend_envs` hook in plugins API
This patch adds a new hook point in the tox lifecycle that lets plugin authors declare additional environment names dynamically. This can be used to provide extra tox environments shipped as installable plugins. Resolves #3510. - [x] ran the linter to address style issues (`tox -e fix`) - [x] wrote descriptive p...
diff --git a/src/tox/config/main.py b/src/tox/config/main.py index 6e734191bc..ff264ea21c 100644 --- a/src/tox/config/main.py +++ b/src/tox/config/main.py @@ -2,8 +2,9 @@ import os from collections import OrderedDict, defaultdict +from itertools import chain from pathlib import Path -from typing import TYPE_CHECKI...
1
1
1
[{"id": "G0", "claim": "The reviewer accepts the new tox_extend_envs hook only if a test demonstrating it is added.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
tox-dev__tox__3726
tox-dev/tox
3,726
defect
0ee48ce38cf4be891b6b317040328fda2ffa0d4c
de4ee92d5b7802bc311b90f6ac6d58e5b925108c
Fix deps with ~= version specifier treated as local paths
## Summary - Fix `deps = pre-commit ~= 4` being treated as a local path instead of an invalid requirement - Root cause: `packaging.Requirement()` rejects `~=` with single-segment versions (PEP 440 requires 2+ segments), then tox's fallback treats the `~` as a tilde home directory path - Fix: detect PEP 440 version spec...
diff --git a/docs/changelog/3447.bugfix.rst b/docs/changelog/3447.bugfix.rst new file mode 100644 index 0000000000..487a90b635 --- /dev/null +++ b/docs/changelog/3447.bugfix.rst @@ -0,0 +1,2 @@ +Fix ``deps`` entries with ``~=`` version specifier being incorrectly treated as local paths instead of being passed +through ...
1
1
0
[{"id": "G0", "claim": "Inline the small _looks_like_version_specifier helper instead of keeping it as a separate function.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tox-dev__tox__3770
tox-dev/tox
3,770
defect
a514a12d2572aea323eb9fa48cdcfa7a427ac30c
d3793b54171aabbe4eef69b14751487884d5a759
Create .gitignore in work_dir and info file directories
Automatically create a .gitignore file containing * in tox-managed directories so users don't need to manually add .tox (or other work directories) to their project's .gitignore. Fixes; #2530 <!-- Thank you for your contribution! Please, make sure you address all the checklists (for details on how see [devel...
diff --git a/docs/changelog/2530.feature.rst b/docs/changelog/2530.feature.rst new file mode 100644 index 0000000000..a4f5947a71 --- /dev/null +++ b/docs/changelog/2530.feature.rst @@ -0,0 +1,2 @@ +Automatically create a ``.gitignore`` file containing ``*`` in the tox work directory (typically ``.tox/``) and in +enviro...
2
2
0
[{"id": "G0", "claim": "Rewrite ensure_gitignore to assign the .gitignore path and test its existence in a single walrus expression instead of two statements.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The info file directory already sits in...
null
tox-dev__tox__3810
tox-dev/tox
3,810
defect
02e9ed73da6a0f97f9167e957e1168d6116942ce
3bebc83c45a6a10f384dc417e79ecbb0079082d1
fix: cross-section substitution resolves to empty when no factors match
## Summary Fixes #3809 Cross-section substitution `{[section]key}` now correctly resolves to empty string when the referenced value contains only factor-conditional lines and no factors match the requesting environment. **Before:** `{[devpisettings]storagebackend}` remained as a literal unresolved reference when no ...
diff --git a/docs/changelog/3809.bugfix.rst b/docs/changelog/3809.bugfix.rst new file mode 100644 index 000000000..ea429552c --- /dev/null +++ b/docs/changelog/3809.bugfix.rst @@ -0,0 +1,3 @@ +Fix cross-section substitution ``{[section]key}`` resolving to a literal unresolved reference instead of empty string +when the...
1
1
0
[{"id": "G0", "claim": "The ini configuration in the newly added test should be written as a multiline string instead of a parenthesized concatenation of newline-escaped strings.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tox-dev__tox__3815
tox-dev/tox
3,815
defect
8d16fdbcd86685e89da9382b921b8012a54d98fa
e9500408946cad9ca65977d3da7f1359826204c9
Add architecture (ISA) awareness to Python discovery
This change makes tox aware of the CPU architecture (ISA) when discovering and validating Python interpreters. It closes #3069 and addresses the consolidated requests in #3320, #3137, and #2535. For context: On machines that can run multiple architectures — like Apple Silicon running both arm64 and x86_64 thr...
diff --git a/docs/changelog/3069.feature.rst b/docs/changelog/3069.feature.rst new file mode 100644 index 000000000..8a9500ddb --- /dev/null +++ b/docs/changelog/3069.feature.rst @@ -0,0 +1,5 @@ +Add architecture (ISA) awareness to Python discovery. tox now propagates the ``machine`` field (e.g. ``arm64``, +``x86_64``)...
4
3
2
[{"id": "G0", "claim": "The ``.. versionadded::`` directives added by the PR (docs/how-to/usage.rst and docs/reference/config.rst) should say 4.45 instead of the placeholder 4.x.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The PR should have a ...
null
tox-dev__tox__3899
tox-dev/tox
3,899
defect
140f8ae1d9fae9951bf9b83b679d8b2a60c03fe0
7f810c8a2ea890d50e99492973591628a11f1d6b
Add `base_python_file` config option
Adds a new `base_python_file` configuration option that reads the base Python version from a file (e.g. `.python-version`), similar to GitHub Actions' `python-version-file`. Fixes #3894 <!-- Thank you for your contribution! Please, make sure you address all the checklists (for details on how see [development d...
diff --git a/docs/changelog/3894.feature.rst b/docs/changelog/3894.feature.rst new file mode 100644 index 0000000000..c6d7377f9b --- /dev/null +++ b/docs/changelog/3894.feature.rst @@ -0,0 +1,2 @@ +Add ``base_python_file`` configuration option to read the base Python version from a file (e.g. ``.python-version``), +sim...
7
7
3
[{"id": "G0", "claim": "base_python_file should be a list of version files mirroring base_python, with the first available file being the one used.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "It should not be allowed to set base_python and base_python...
null
tox-dev__tox__852
tox-dev/tox
852
defect
dbbeb6799fd5b3f2ec62d5820f64c2f1f777796b
29b89d8333d0cabdccd2784425c98e290e27d3ae
[WIP] wheel support (and transitively PEP-518), plus pipe display failed commands
#850 PEP-518 support: provide a tox configuration flag ``build`` which can be either ``sdist`` or ``wheel``. For ``sdist`` (default) we build the package as before by using ``python setup.py sdist``. However, when ``wheel`` is enabled now we'll use ``pip wheel`` to build it, and we'll also install wheels in these case ...
diff --git a/changelog/850.feature.rst b/changelog/850.feature.rst new file mode 100644 index 0000000000..8091aaec98 --- /dev/null +++ b/changelog/850.feature.rst @@ -0,0 +1 @@ +PEP-518 support: provide a tox configuration flag ``build`` which can be either ``sdist`` or ``wheel``. For ``sdist`` (default) we build the p...
8
4
2
[{"id": "G0", "claim": "The docs should say the sdist is built \"using setup.py sdist\" instead of attributing the build to distutils, since setuptools is what actually runs.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The documented wheel buil...
null
tpm-rs__tpm-rs__104
tpm-rs/tpm-rs
104
defect
843842aabcf968a4b88f00629337d323eb7e2a05
92e5488fe1cd496c31b3c8637846b31563a835f9
Remove client-features folder and content.
Removal of client-features folder, to avoid having function wrappers for TPM API interface. The user should instead create the Cmd structure, and call the run_command() - or run_command_with_handles(). FIXES #103
diff --git a/Cargo.toml b/Cargo.toml index 2f728b82..fb005663 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,6 @@ resolver = "2" members = [ "base", "client", - "client-features", "errors", "marshalable", "marshalable-derive", @@ -28,7 +27,6 @@ zerocopy = { version = "0.7.0", features ...
3
3
1
[{"id": "G0", "claim": "The new simulator tests do not build and do not pass (e.g. `assert!(let ...)` is invalid Rust), they only run manually via docker compose, and the PR should not be re-reviewed until the author gets them passing.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "int...
null
tpm-rs__tpm-rs__130
tpm-rs/tpm-rs
130
defect
3bad98816100fc8f948208d8318cae9de71fefa6
9fe96d38898d2b199cedd81b816d3f101a553425
sever: Perform some renamings to improve clarity
ServiceDeps -> TpmContextDeps CommandContext -> CommandHandler service(module) -> tpmctx Service -> TpmContext
diff --git a/server/src/handler/mod.rs b/server/src/handler/mod.rs index e221452a..ee7bb962 100644 --- a/server/src/handler/mod.rs +++ b/server/src/handler/mod.rs @@ -1,12 +1,12 @@ use crate::{ - platform::{CryptoRandom, ServiceDeps, TpmBuffers}, + platform::{CryptoRandom, TpmBuffers, TpmContextDeps}, req_r...
1
1
0
[{"id": "G0", "claim": "The doc comment on `TpmContextDeps` still says `Service` and should be updated to say tpm context (or similar).", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tpm-rs__tpm-rs__136
tpm-rs/tpm-rs
136
defect
1a41656fbf2a96bc28ad6d962f4b0ff032ba9215
fdf19ff1a4ceed80f5cd210b62c607ed3456b139
server: Replace CryptoRandom with Drbg + Entropy
This patch adds new traits for interfacing with deterministic random bit generators.
diff --git a/server/src/handler/mod.rs b/server/src/handler/mod.rs index 2de182bf..3c3ed1dd 100644 --- a/server/src/handler/mod.rs +++ b/server/src/handler/mod.rs @@ -1,5 +1,8 @@ use crate::{ - platform::{CryptoRandom, TpmBuffers, TpmContextDeps}, + platform::{ + drbg::{Drbg, Entropy}, + TpmBuffers...
20
9
3
[{"id": "G0", "claim": "The helper functions may break NIST SP 800-90A compliance because additional input is fed to the internal DRBG state on every primitive call, so a single logical generation is split into multiple state updates where the spec expects the input mixed only before/after generation (at best the RNG e...
null
tpm-rs__tpm-rs__137
tpm-rs/tpm-rs
137
defect
1a41656fbf2a96bc28ad6d962f4b0ff032ba9215
5b2af6d808a4aed113bb17b910b75449baf22bfa
Add structures for TPM2_GetRandom command.
- Add test crude test to catch entirely random data. - Ordered tests into sub modules matching TPM command chapters. - Fixes https://github.com/tpm-rs/tpm-rs/issues/118
diff --git a/base/src/commands/random.rs b/base/src/commands/random.rs index 1e1bd725..39e69f52 100644 --- a/base/src/commands/random.rs +++ b/base/src/commands/random.rs @@ -1,7 +1,27 @@ //! [TPM2.0 1.83] 16 Random Number Generator +use crate::commands::{Marshalable, TpmCommand}; +use crate::constants::TpmCc; +use ...
13
12
4
[{"id": "G0", "claim": "As an optional cleanup for a separate PR, the TPM simulator lifetime could be folded into the returned TpmSim (e.g. TpmSim implementing the Tpm trait) so get_started_tpm() needs to hand back only one value.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"...
null
tpm-rs__tpm-rs__213
tpm-rs/tpm-rs
213
defect
2fda70a602b7c2ed68cb21d648c80ed9f9bb2bb4
6d939d279057b4d825723d8e758bff372beaf7a2
Allow for the creation of multiple TcpSimulators.
- The TCG reference simulator writes the ports it uses to `command.port` and `platform.port` in the directory of the spawned simulator process. Rather than assume default ports, the TcpConnection associated with the simulator now parses those files for the ports to use. - Combine that with the use of a temporary direc...
diff --git a/Cargo.toml b/Cargo.toml index 305522b..e60144d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,7 @@ proc-macro2 = "1" quote = "1" safe-discriminant = "0.2.0" syn = { version = "2", features = ["full"] } +tempfile = "3.25.0" trybuild = { version = "1.0.89", features = ["diff"] } zerocopy = { vers...
4
4
1
[{"id": "G0", "claim": "Remove the simulator-IP helper and its default constant and just use Ipv4Addr::LOCALHOST inline inside spawn_simulator_and_connect, since the multithreaded testing is not compatible with an externally running simulator.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "...
null
tpm-rs__tpm-rs__40
tpm-rs/tpm-rs
40
defect
158ef64c094cf276cd1f60ed21f50c06658b3f3a
cb6c0ef2725a11d98ba753639d809a244fb98bdb
Add initial service implementation
This implementation includes the following: * Ability to handle separate TPM request and response object * Ability to handle in-place TPM request and response * Zero cost dependency injection paradigm that allows for easy unit testing * Unit tests for service * Fakes for crypto * Fleshes out common hand...
diff --git a/Cargo.toml b/Cargo.toml index 9b05d6a7..45f4687f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,7 @@ [workspace] members = [ "base", - "marshal_derive", "client", + "marshal_derive", + "service", ] diff --git a/service/Cargo.toml b/service/Cargo.toml new file mode 100644 index 00...
17
8
1
[{"id": "G0", "claim": "The new service TpmError should be deduplicated with the existing base/src/errors.rs implementation rather than keeping two error implementations that can diverge.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The const ...
null
tpm-rs__tpm-rs__41
tpm-rs/tpm-rs
41
defect
72e86aeaa29034a6338222780137a1b3eab642bc
1a3a3711ecdb8501a50a3c7ec4d1087a7b1450fa
Add client integration tests against TPM simulator
This adds support to grab the TPM simulator source from https://github.com/microsoft/ms-tpm-20-ref and builds/runs it in a docker container and runs a new set of client integration tests against it. To facilitate this, it also adds a TCP transport for talking to and starting up the simulator, and an example helper m...
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc6e1b76..6b18f934 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,19 @@ jobs: - uses: actions-rs/cargo@v1 with: command: test + + integration_test: + name: Client Integration Test S...
2
2
0
[{"id": "G0", "claim": "The simulator-generated port files (client/command.port and client/platform.port) should not be checked into the repository; they should be added to .gitignore instead.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Optio...
null
tpm-rs__tpm-rs__51
tpm-rs/tpm-rs
51
defect
cbfa3d3904fca3b9c2b1a4d7a149762e8f347ce3
537871795186b9566b0acbbed95b0c6f8dbcf5c8
Refactor TpmError into TpmRcError and TssRcError
Break out the two different layers of errors and make each of the layer convertible into the top-level `TpmError` that can represent an error from any layer.
diff --git a/base/src/lib.rs b/base/src/lib.rs index a5c52bc0..7581ecfd 100644 --- a/base/src/lib.rs +++ b/base/src/lib.rs @@ -959,7 +959,8 @@ macro_rules! impl_try_marshalable_tpm2b_simple { fn from_bytes(buffer: &[u8]) -> TpmResult<Self> { // Overflow check if buffer.len...
2
2
1
[{"id": "G0", "claim": "Marshal-side overflow errors (e.g. from_bytes' TSS2_MU_RC_BAD_SIZE) should return the server/TPM_RC error space instead of the client/TSS space, converting to client-space only where the client lib wraps them.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "intro...
null
tpm-rs__tpm-rs__62
tpm-rs/tpm-rs
62
defect
9a13572973661840c18f30a17af85772966fc1ff
8a415d4183661880dc9d2dd267fc6db75b068d51
FIX #55: Delegate size calculation for TPMU* to rust compiler
Recreating the #59 since it was closed after making tpm-rs public
diff --git a/Cargo.toml b/Cargo.toml index b9a635d5..95001e01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ members = [ "marshal", "marshal/derive", "service", + "unionify" ] [workspace.dependencies] @@ -17,9 +18,9 @@ hex-literal = { version = "0.4.1" } open-enum = "0.4.1" proc-macro2...
4
4
0
[{"id": "G0", "claim": "Replace calls to TpmtHa::union_size() with size_of::<TpmuHaUnion>() directly and get rid of the hand-written union_size impl blocks here and for the other enums, as slightly simpler.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "...
null
tpm-rs__tpm-rs__95
tpm-rs/tpm-rs
95
defect
7927a874af4862f33f53e1630a38dc348f809415
f0bfaa2ddf280df512e6d4d87f42cbd0e975158f
sessions implementation 1
A Draft implementation loosely following https://github.com/tpm-rs/tpm-rs/issues/87 This is definitely missing lots of documentation, but it is there just as POC
diff --git a/client/src/lib.rs b/client/src/lib.rs index 1949190e..c9c5d2a8 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -1,7 +1,9 @@ #![forbid(unsafe_code)] #![cfg_attr(not(test), no_std)] +pub mod sessions; + use core::mem::size_of; -use sessions::CmdSessions; +use sessions::{AuthorizationArea, Sessio...
18
11
1
[{"id": "G0", "claim": "In sessions/mod.rs the `pub use` re-exports should be placed right after their `mod` declarations to keep them located closely together.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The module doc should read 'a collect...
null
tpm2-software__tpm2-tools__1022
tpm2-software/tpm2-tools
1,022
defect
bee4b4239d69a620490f4ed45b0b3154a822e7db
9af8ce733949df1add9e22a88dda450d4767403f
Import work
Updated: 5/1/2018 @ 11:43AM Pacific Adds tests for import that: * Sign with the tpm and verify with openssl * Sign with openssl and verify with the tpm * Required -r raw support to be fixed * Required conversion routine from plain signature to tss Additional Changes: * Changes private key input to openss...
diff --git a/lib/tpm2_convert.c b/lib/tpm2_convert.c index 9b09c81b65..ebc5a23577 100644 --- a/lib/tpm2_convert.c +++ b/lib/tpm2_convert.c @@ -214,3 +214,38 @@ bool tpm2_convert_sig(TPMT_SIGNATURE *signature, tpm2_convert_sig_fmt format, co return false; } } + +bool sig_load(const char *path, TPMI_ALG_SI...
9
4
1
[{"id": "G0", "claim": "The RSASSA case body in sig_load, which declares a variable, should be enclosed in brackets.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new sig_load helper should be declared static since it is internal to the fil...
null
tpm2-software__tpm2-tools__1255
tpm2-software/tpm2-tools
1,255
defect
161fee77ab0316516ac25b601d375c8924354df0
e85572fb0d2e0ac6719fad1c1ff847fd32b9c949
Various tweaks
A few minor changes from my esapi-integration branch which aren't ESAPI related
diff --git a/.travis.yml b/.travis.yml index 55c857d9ae..1a416a2daf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,3 +13,6 @@ env: - secure: gTif84rZ6XT6ouay6FxO8GY2RSpjVIXOf38G2OH1RFhzrvLa3r4tnE6QRSv7/af2BgM+rhXHUZA5eua6LiS4zIK/UGoBNmeCpdsQYIBqUptYt4sIlYbl1Hwimcd5FqUD19/mokP2snAmnB+s2Z9zC4Y668dV28OAdPf6pOKjW1ivs...
3
1
0
[{"id": "G0", "claim": "The function routines should be renamed from tpm_kdfa to tpm2_kdfa to be truly consistent.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Something fails silently when it should instead be fixed to fail.", "category": "co...
null
tpm2-software__tpm2-tools__1275
tpm2-software/tpm2-tools
1,275
defect
88956e75684499a8186d517cc1ce0f68590c328a
49a777b4abc7ebcd9f92ba148cecf1029cbd7f28
lib/tpm2_auth_util: add support for reading auth passwords from a file
Add support for reading an authorisation password from a file. This helps keep the authorisation information private from UNIX utilities such as ps. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md index b7a957952e..e01714c4ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## Changelog ### next + * Add support for reading authorisation passwords from a file * tpm2_createek: now saves a context file for the generated primary's handle to disk. * t...
2
2
1
[{"id": "G0", "claim": "The new sentence in man/common/authorizations.md should read \"string, hex-string and a file\" — it is missing the article \"a\" before \"file\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The changeauth integration tes...
null
tpm2-software__tpm2-tools__1372
tpm2-software/tpm2-tools
1,372
defect
722f008c06ff010110d1b85c9d02e3059d160fd9
b4817fee3b09c552a50ce34116c06cb762644d52
tools/tpm2_testparms: Add a tool to check if an algorithm suite is supported
No implementation issue was opened but this tool might be handy in some situation (like migration or tests) - Added command to makefile - Added manual entry for tpm2_selftest - Added command relying on ESAPI - Added integration test for coverage Signed-off-by: sebastien le stum <lestums@gmail.com>
diff --git a/Makefile.am b/Makefile.am index 48aeabbbe6..c2d244009b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -114,6 +114,7 @@ bin_PROGRAMS = \ tools/tpm2_startauthsession \ tools/tpm2_startup \ tools/tpm2_stirrandom \ + tools/tpm2_testparms \ tools/tpm2_unseal \ tools/tpm2_verifysignatu...
7
6
1
[{"id": "G0", "claim": "Declare the algorithm struct with a zero initializer (TPM2B_PUBLIC algorithm = { 0 };) instead of an uninitialized declaration followed by an explicit memset.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Tighten pointer...
null
tpm2-software__tpm2-tools__1384
tpm2-software/tpm2-tools
1,384
defect
0f47ba5046b8ddbd265e8dfa1c691d3a901810b6
f07a27f99773d90f97e9ff777ed32c163f5032c2
tools/tpm2_gettestresult: Add tool to get status on tests made by TPM
- Added command to makefile - Added manual entry for tpm2_selftest - Added command relying on ESAPI - Added integration test for coverage Signed-off-by: sebastien le stum <lestums@gmail.com>
diff --git a/Makefile.am b/Makefile.am index c2d244009b..2e8921ab77 100644 --- a/Makefile.am +++ b/Makefile.am @@ -72,6 +72,7 @@ bin_PROGRAMS = \ tools/tpm2_createprimary \ tools/tpm2_dictionarylockout \ tools/tpm2_getcap \ + tools/tpm2_gettestresult \ tools/tpm2_encryptdecrypt \ tools/tpm2_...
5
5
0
[{"id": "G0", "claim": "The man page NOTES wording should read \"few commands to be ...\" instead of \"the one of the few command\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The tool's tpm2_tool_output strings should not be capitalized and s...
null
tpm2-software__tpm2-tools__1385
tpm2-software/tpm2-tools
1,385
defect
0f47ba5046b8ddbd265e8dfa1c691d3a901810b6
e04a30e47517206ac6a4cc0d5ca15091d8c3bd09
tools/tpm2_incrementalselftest: Add tool to test specific algorithms
- Added command to makefile - Added manual entry for tpm2_selftest - Added command relying on ESAPI - Added integration test for coverage Signed-off-by: sebastien le stum <lestums@gmail.com>
diff --git a/Makefile.am b/Makefile.am index c2d244009b..fac2b7558a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -80,6 +80,7 @@ bin_PROGRAMS = \ tools/tpm2_hash \ tools/tpm2_hmac \ tools/tpm2_import \ + tools/tpm2_incrementalselftest \ tools/tpm2_listpersistent \ tools/tpm2_load \ tool...
2
1
0
[{"id": "G0", "claim": "The tool's output (algorithms tested and scheduled/remaining to be tested) should be made YAML compliant and machine parsable.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asks whether the flow is to call this tool ...
null
tpm2-software__tpm2-tools__1498
tpm2-software/tpm2-tools
1,498
defect
5b96ac3983407fa273b4455a091a399ee15f6b48
b55e4356ba301e994f48bb5e595822eeafed8458
test_tpm2_auth_util.c: Remove foobar file created as part of tpm2_auth_util unit test run
A foobar file is created but not cleaned at end of tpm2_auth_util unit test. This fixes the issue #1496 Signed-off-by: Imran Desai <imran.desai@intel.com>
diff --git a/Makefile.am b/Makefile.am index c7c5b5adf..f7c3c1b72 100644 --- a/Makefile.am +++ b/Makefile.am @@ -204,7 +204,12 @@ test_unit_test_pcr_LDADD = $(CMOCKA_LIBS) $(LDADD) test_unit_test_tpm2_auth_util_CFLAGS = $(AM_CFLAGS) $(CMOCKA_CFLAGS) test_unit_test_tpm2_auth_util_LDFLAGS = -Wl,--wrap=Esys_TR_S...
5
4
0
[{"id": "G0", "claim": "Add a file_fopen() wrapper that calls the real fopen() so file operations can be safely mocked and the test does not actually hit the disk.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Remove the spaces between function names an...
null
tpm2-software__tpm2-tools__1588
tpm2-software/tpm2-tools
1,588
defect
1666c83fafcb55db3e917be5b71b2d0cb3a76095
44eb764b36fd9f4e00a061836944a86c84287864
lib/tpm2_hierarchy: Add filtering for NV Indices
Progresses #1462 Progresses #880 1. Add filter for checking handle is in valid NV index range 2. Add option to specify NV indices simply as an offset. Eg. 1 for NV index @ 01000001 3. Add unit tests for the added functionality. Signed-off-by: Imran Desai <imran.desai@intel.com>
diff --git a/lib/tpm2_hierarchy.c b/lib/tpm2_hierarchy.c index ed5422ab00..fc639e473b 100644 --- a/lib/tpm2_hierarchy.c +++ b/lib/tpm2_hierarchy.c @@ -29,6 +29,82 @@ * @return * True on success, False otherwise. */ + +static bool filter_hierarchy_handles(TPMI_RH_PROVISION *hierarchy, + tpm2_hierarchy_flags fl...
3
3
1
[{"id": "G0", "claim": "filter_hierarchy_handles receives hierarchy by pointer although it only reads it, so the helper should take the handle by value.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In filter_handles, case 0 adds TPM2_HR_NV_INDEX to *hi...
null
tpm2-software__tpm2-tools__1610
tpm2-software/tpm2-tools
1,610
defect
0e2fd98191b28e6cdb84506361743d13a3bdbd6a
4d156000ba65e377df66af2e550d1b1e06573a92
Adjust headers with deheader
Add required headers and remove unused headers Fixes:#1444
diff --git a/lib/files.c b/lib/files.c index e96f3ed3e4..b30fe5d947 100644 --- a/lib/files.c +++ b/lib/files.c @@ -6,16 +6,16 @@ #include <limits.h> #include <stdbool.h> #include <stdio.h> +#include <stdlib.h> #include <string.h> +#include <strings.h> -#include <tss2/tss2_esys.h> #include <tss2/tss2_mu.h> #in...
1
1
0
[{"id": "G0", "claim": "Keep the per-file own header include (e.g. \"tpm2.h\" for lib/tpm2.c, \"tpm2_capability.h\" for lib/tpm2_capability.c) that the pull request removed, since keeping the <thisfile>.h is a good idea to ensure alignment of function declarations in header and implementations.", "category": "maintaina...
null
tpm2-software__tpm2-tools__2093
tpm2-software/tpm2-tools
2,093
defect
876e5d57efb48cce4225bdb738704c5cd48aa312
4706488aa754042d20b30eca5eb28596b8cece99
tpm2_eventlog: compute PCR values based on the events
This patch computes the PCR values for the sha1 and sha256 hashes based on the events in the log and outputs an additional yaml section with the predicted PCRs to make it easy to compare to the attested quote.
diff --git a/lib/tpm2_eventlog.c b/lib/tpm2_eventlog.c index b7bea61244..824f3ba185 100644 --- a/lib/tpm2_eventlog.c +++ b/lib/tpm2_eventlog.c @@ -2,6 +2,10 @@ #include <stdlib.h> #include <tss2/tss2_tpm2_types.h> +#include <openssl/buffer.h> +#include <openssl/evp.h> +#include <openssl/sha.h> + #include "log.h" ...
20
12
3
[{"id": "G0", "claim": "The new PCR tracking and the tpm2_eventlog_ctx_t struct/helpers should be moved out of the yaml layer into the non-yaml eventlog code (e.g. behind a separate internal header) with a callback for processing the PCRs at the end, so the tests can exercise them and checkquote can reuse them to valid...
null
tpm2-software__tpm2-tools__2114
tpm2-software/tpm2-tools
2,114
defect
a9199d4b403345b7d82e8292d41dd28af0e7540b
2f5af11a2c31832499731356d0b8200b689ae3ec
tpm2_checkquote: Add option to input PCR-digest without TPML_PCR_SELECTION header
Fixes #2072 Signed-off-by: Imran Desai <imran.desai@intel.com>
diff --git a/man/tpm2_checkquote.1.md b/man/tpm2_checkquote.1.md index 6a12a9e645..a557b51436 100644 --- a/man/tpm2_checkquote.1.md +++ b/man/tpm2_checkquote.1.md @@ -13,7 +13,13 @@ **tpm2_checkquote**(1) - Uses the public portion of the provided key to validate a quote generated by a TPM. This will validate the sign...
2
2
1
[{"id": "G0", "claim": "scan-build flags the write through pcrs->pcr_values[0].digests[pcrs->pcr_values[0].count] as an undefined subscript because the digest count can grow past 8, the max size of the digests field, and is not reset across pcr_select iterations.", "category": "correctness", "verdict": "supported", "pr...
null
tpm2-software__tpm2-tools__213
tpm2-software/tpm2-tools
213
defect
c28b753b66180791d91f42857e5142bcf6ecc2d7
eda39cc45f700e63c5ea7cda3e5e8777a826d037
introduce file io routines with unit tests
Introduce routines in string-bytes.h for detecting endianess and converting endianess. Introduce generic file-io routines that save multibyte 16,32 and 64 bit values as big endian to a FILE stream as well as raw byte read/write routines. Additionally, have routines for reading and writing a file specific header...
diff --git a/.travis.yml b/.travis.yml index b0f26e6c92..49d62db636 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,6 @@ addons: apt: packages: - autoconf-archive - - libcmocka0 - - libcmocka-dev - openssl - libssl-dev - libcurl4-openssl-dev @@ -27,6 +25,12 @@ install: - p...
5
4
0
[{"id": "G0", "claim": "ChangeEndian.h should be killed off during this PR as a separate commit.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The file-header magic constant is missing a nibble and should be 0xBADCC0DE instead of 0xBADC0DE.",...
null
tpm2-software__tpm2-tools__2172
tpm2-software/tpm2-tools
2,172
defect
86fe82c6ed82464338549c1c863a38eccf5e3821
96db293665ca36a1537394d6f1df8d98b851e17e
Fixes for ECC ecdaa signing scheme
Fixes #2071 - [x] Fix the default value for ecdaa commit counter — Should be 0. - [x] Add a ECC ecdaa signing test - [x] Add more tests to check signing with commit-counter values other than default 0. - [x] Sanitize **tpm2_sign** input options — Do not allow -f when ecdaa chosen. - [x] Sanitize commit-counter v...
diff --git a/lib/tpm2_alg_util.c b/lib/tpm2_alg_util.c index 2a88d964c7..8acb08124a 100644 --- a/lib/tpm2_alg_util.c +++ b/lib/tpm2_alg_util.c @@ -204,12 +204,12 @@ static alg_parser_rc handle_scheme_sign(const char *scheme, } else if (!strncmp(scheme, "ecdaa", 5)) { do_scheme_halg(scheme, 5, TPM2...
2
2
1
[{"id": "G0", "claim": "Generate the test digest with an `openssl dgst -sha256 -binary` one-liner instead of the shasum/awk/xxd pipeline.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Verify the new ecdaa signing test and add coverage that sign...
null
tpm2-software__tpm2-tools__2228
tpm2-software/tpm2-tools
2,228
defect
e875ff4852767d550f531e5cf8870b8837ae79a9
96fbfc1738f23746831c80ae14541c9ee7b61689
Fix tpm2_checkquote when run on a big endian system
Various PCR related structures read by tpm2_checkquote are written in little endian format, which needs to be taken into account when run on a big endian system. Although little endian is unusual for TPM, it is better to leave these data structures in little endian format to not disrupt existing systems. Signed-...
diff --git a/lib/pcr.c b/lib/pcr.c index 54cc8d1d54..319755cc41 100644 --- a/lib/pcr.c +++ b/lib/pcr.c @@ -8,6 +8,7 @@ #include "log.h" #include "pcr.h" +#include "systemdeps.h" #include "tpm2.h" #include "tpm2_tool.h" #include "tpm2_alg_util.h" @@ -177,6 +178,59 @@ static bool pcr_unset_pcr_sections(TPML_PCR_SE...
2
2
0
[{"id": "G0", "claim": "Standalone // line comments in the new little-endian helpers in lib/pcr.c and lib/tpm2_openssl.c should be written as /* */ block comments, with the skip comment placed on its continue line.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id":...
null
tpm2-software__tpm2-tools__2308
tpm2-software/tpm2-tools
2,308
defect
3272b0fe78b1ae8b46925c4086f74eb19ddae37a
d079320a0e33094e53964dd7746c7136726742af
tpm2_eventlog: parse secureboot variable
`SecureBoot` is a variable that appears in every eventlog. This PR makes it more "obvious" what various numeric values mean. Instead of ``` UnicodeName: SecureBoot VariableData: "01" ``` it spells it out as ``` UnicodeName: SecureBoot VariableData: Enabled:'Yes' ```
diff --git a/lib/tpm2_eventlog.c b/lib/tpm2_eventlog.c index bd3224c581..ce48d275a6 100644 --- a/lib/tpm2_eventlog.c +++ b/lib/tpm2_eventlog.c @@ -273,7 +273,8 @@ bool foreach_sha1_log_event(tpm2_eventlog_context *ctx, TCG_EVENT const *eventhd /* event data callback */ if (ctx->event2_cb != NULL) { ...
12
7
3
[{"id": "G0", "claim": "Parsing the SecureBoot VariableData changes the YAML output in a way that would break existing consumers, and since tool output must stay stable for downstream consumers, the new parsing (and the similar recently merged changes) should only be active behind an explicitly versioned YAML output fo...
null
tpm2-software__tpm2-tools__2747
tpm2-software/tpm2-tools
2,747
defect
69213cda484c0b90bc012720ca7de85a1db43b85
6cf041e596da655e56ecbf05e576e05aeb16274e
tpm2_eventlog: Format partitions correctly
Fixes #2746 Now each partition is printed separately, and we correctly display the UTF16 strings in the partition names. This change required creating a helper struct: ```c typedef struct { char16_t c; } PACKED UTF16_CHAR; ``` so that we could pass the address of our UFT16 buffer to a helper function w...
diff --git a/lib/efi_event.h b/lib/efi_event.h index c07ed59a20..ddc4b74468 100644 --- a/lib/efi_event.h +++ b/lib/efi_event.h @@ -66,11 +66,16 @@ typedef struct { /* TCG_EVENT2 comes next */ } PACKED TCG_EVENT_HEADER2; +/* Helper structure for dealing with unaligned char16_t */ +typedef struct { + char16_t c; ...
2
2
0
[{"id": "G0", "claim": "Add the eventlog binary the author tested on to the integration test fixtures and update the integration tests to use it.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Document what the magic number 36 in PartitionName[36] means...
null
tpm2-software__tpm2-tools__2810
tpm2-software/tpm2-tools
2,810
defect
318926d05b7d5013d7bed09ebdc445058fd572b1
0a59bf18e53b610be147a70ef751ef36bce710f6
Convert deprecated digesters to EVP_Digest
Before, two approaches were used for digest calculation: 1) `tpm2_openssl_halg_from_tpmhalg` and the EVP_Digest 2) `tpm2_openssl_halg_to_digester` and (deprecated) digesters such as SHA256 or SHA384 After this PR, only a single approach is used: `tpm2_openssl_md_from_tpmhalg` and the EVP_Digest. The function name...
diff --git a/lib/tpm2_identity_util.c b/lib/tpm2_identity_util.c index 5c2b8da3e9..ddce7bf081 100644 --- a/lib/tpm2_identity_util.c +++ b/lib/tpm2_identity_util.c @@ -134,7 +134,7 @@ static bool share_secret_with_tpm2_rsa_public_key(TPM2B_DIGEST *protection_seed, unsigned char encoded[TPM2_MAX_DIGEST_BUFFER]; ...
1
1
0
[{"id": "G0", "claim": "Function returns should not be hidden in conditionals (e.g. `if (!EVP_Digest(...))`); use an explicit return-code variable instead, and do so at every place in this pull request.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
tpm2-software__tpm2-tools__2976
tpm2-software/tpm2-tools
2,976
defect
f338bf20ece9b47db8b13072af6f74e5aa1f4ab5
a3199f9966a286bba38c815ca7d3b8ce508e489c
Adding new event types to tpm2_eventlog
Patch set for handling of new event types in tpm2_eventlog: EV_EFI_PLATFORM_FIRMWARE_BLOB2, EV_EFI_HANDOFF_TABLES2, EV_EFI_VARIABLE_BOOT2 Found the need for handling newer entry types while looking at the UEFI boot event logs on recent HW acquisitions in IBM cloud. Reference: https://trustedcomputinggroup.org/wp-...
diff --git a/lib/efi_event.h b/lib/efi_event.h index 0136e32b2..cc2ffc983 100644 --- a/lib/efi_event.h +++ b/lib/efi_event.h @@ -41,6 +41,10 @@ #define EV_EFI_ACTION EV_EFI_EVENT_BASE + 0x7 #define EV_EFI_PLATFORM_FIRMWARE_BLOB EV_EFI_EVENT_BASE + 0x8 #define EV_EFI_HANDOFF_TABLES EV...
1
1
0
[{"id": "G0", "claim": "In yaml_uefi_platfwblob2 the pointer offset should use sizeof(data->BlobDescriptionSize) instead of sizeof(UINT8) when skipping the blob description size field, for code clarity.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tpm2-software__tpm2-tools__3298
tpm2-software/tpm2-tools
3,298
defect
e7526e1ce1e190fb6f33bc38c7f84440cf774758
67d1e21b8df871ca2fdd3a823fe2db5726268fb1
Save Context: Add the possibility for autoflush.
If the environment variable TPM2TOOLS_AUTOFLUSH exists transient objects will be removed after they were saved and stored to disk. Also a transient parent will be removed if a context file for this parent was used by this command. For the commands which will check the autoflush also an option -R is added to enable the...
diff --git a/lib/files.c b/lib/files.c index 7773cb6b2..f39bd89b8 100644 --- a/lib/files.c +++ b/lib/files.c @@ -273,11 +273,11 @@ bool files_save_context(TPMS_CONTEXT *context, FILE *stream) { } tool_rc files_save_tpm_context_to_file(ESYS_CONTEXT *ectx, ESYS_TR handle, - FILE *stream) { + FILE *strea...
2
2
2
[{"id": "G0", "claim": "The TPM2TOOLS_AUTOFLUSH environment variable should be activated only by explicit values such as \"yes\" or \"true\", not by any non-empty value.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G2", "claim": "The path-existence checks (files...
null
tpm2-software__tpm2-tools__3505
tpm2-software/tpm2-tools
3,505
defect
eff962d1eeac98dd191e5b499a15761327022541
9a091da614983c87dd9bb8c3333be12248ba9778
tpm2_quote/checkquote: Fix usage of little endian serialization.
little endian is used for the pcr serialization (-F serialized) by tpm2_pcrread, tpm2_quote, and tpm2_checkpublic. After reading a pcr file the format was not adapted. Also on big endian platforms still the little endian values are used. To fix this problem new functions were added: pcr_print_pcr_struct_le, tpm2_open...
diff --git a/lib/pcr.c b/lib/pcr.c index f9e3de5c4..04775b73d 100644 --- a/lib/pcr.c +++ b/lib/pcr.c @@ -13,6 +13,8 @@ #include "tpm2_tool.h" #include "tpm2_alg_util.h" #include "tpm2_util.h" +#include "tss2_common.h" +#include "tss2_mu.h" #define MAX(a,b) ((a>b)?a:b) @@ -232,58 +234,6 @@ static bool pcr_unset_...
1
1
0
[{"id": "G0", "claim": "The break added in case 'F' of tpm2_checkquote.c makes the following LOG_WARN(\"DEPRECATED: Format ignored\") statement unreachable dead code.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tpm2-software__tpm2-tools__370
tpm2-software/tpm2-tools
370
defect
ab0e9eaa9e1e69d88a23ff4c2824829daa49d879
598266c09f49dae1b6e90d15aa229c7c700e53f0
Use identical types in comparison
Without this change, the compiler complains about a comparison between signed and unsigned integer expressions (filesize != expected_pcr_input_file_size) and aborts the compilation (due to Werror). Since expected_pcr_input_file_size exists only to be compared to filesize, its type can simply be changed to match that of...
diff --git a/tools/tpm2_createpolicy.c b/tools/tpm2_createpolicy.c index eee2ef6888..ea15c67731 100644 --- a/tools/tpm2_createpolicy.c +++ b/tools/tpm2_createpolicy.c @@ -112,7 +112,7 @@ static bool evaluate_populate_pcr_digests(create_policy_ctx *pctx, TPML_DIGEST * //total pcr indices per algorithm/ bank. Typica...
1
1
1
[{"id": "G0", "claim": "The interface for getting the file size should change to unsigned long, since file sizes are never expected to be negative (negative ftell() returns are already checked as errors).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
tpm2-software__tpm2-tools__640
tpm2-software/tpm2-tools
640
defect
72a759b5a4ffdf29e2ee5e483a3c13e3364c6e0d
f891aca150d06592eaedca7ab5e5a6808bce0a85
master-serialization-fixes
Looking through the source for bad casts on files_save_bytes yields no hits after these patches. ```grep -n files_save_bytes *.c | grep UINT8``` Hopefully this puts all serialization issues to bed #639 . I deleted tpm2_akparse and will update the CHANGELOG with it when it's merged. There was no reason to keep th...
diff --git a/CHANGELOG.md b/CHANGELOG.md index de3b1eaf98..3da1d44de7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ ## Changelog ### next + * tpm2_getmanufec: -O as a flag for -f has changed. -O is for existing EK public structure + and -f is only for generated EK public output. * tpm2_nvlis...
3
3
0
[{"id": "G0", "claim": "files_save_public seems like a better name for the new helper, and probably all the new *_pubkey serialization helpers should be renamed to *_public.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new files_{save,load...
null
tpm2-software__tpm2-totp__53
tpm2-software/tpm2-totp
53
defect
fe09aa8934562886c1a08f4faeafc93c67833801
d892948a013273dcb1e2741d8964b07135c1a64d
Use tss2-tctildr
Since https://github.com/tpm2-software/tpm2-tss/pull/1470 has been merged upstream, we can now switch to tss2-tctildr and remove our own TCTI handling code. This relies on the not yet released tpm2-tss 2.3, so I guess we could hold off merging this at least until the first release candidate for 2.3 is tagged. Fixes:...
diff --git a/.travis.yml b/.travis.yml index 3aa82df..3ff0701 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,11 +53,14 @@ install: - cp autoconf-archive-2017.09.28/m4/ax_is_release.m4 m4/ - cp autoconf-archive-2017.09.28/m4/ax_add_fortify_source.m4 m4/ # TPM2-TSS - - git clone --depth=1 -b 2.1.0 https://gith...
1
1
0
[{"id": "G0", "claim": "Change the Travis CI clone of tpm2-tss from the master branch to the 2.3.x branch once the 2.3.0 release candidate is out.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tpm2-software__tpm2-tss__1001
tpm2-software/tpm2-tss
1,001
defect
7fdd7c99164dd6084b54a2da6ee35d7196216f58
e065032a58489af371805bfc6d57ffb0384573b1
Test
* fix test build issue * cleanup global data in tpmclient * cleanup util function names * add param encrypt-decrytp test * remove encryp-decrypt test from tpmclient
diff --git a/Makefile-test.am b/Makefile-test.am index 8a5e8cf114..b4f716bc7f 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -91,7 +91,7 @@ if ENABLE_INTEGRATION noinst_LTLIBRARIES += test/integration/libtest_utils.la TESTS_INTEGRATION = \ test/integration/sapi-asymmetric-encrypt-decrypt.int \ - test...
4
2
2
[{"id": "G0", "claim": "Shrinking levelString to a 32-byte buffer while strncpy() still copies up to LEVEL_STRING_SIZE (50) characters allows buffer overflows.", "category": "correctness", "verdict": "opposed", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The rval parameter should be enclosed in par...
null
tpm2-software__tpm2-tss__1055
tpm2-software/tpm2-tss
1,055
defect
847234899fa6522bd96376f0e2e7ad906b283ef1
e2120125eefb29a76cc9ec4f5220050fa26e523b
Fix indentation problems
According to the [coding standard](https://github.com/tpm2-software/tpm2-tss/blob/master/doc/coding_standard_c.md#whitespace), all indentation must be multiples of 4 spaces (and not tabs). Fixes #1053
diff --git a/src/tss2-esys/esys_iutil.c b/src/tss2-esys/esys_iutil.c index feeb924a33..1cdb7a5f83 100644 --- a/src/tss2-esys/esys_iutil.c +++ b/src/tss2-esys/esys_iutil.c @@ -200,8 +200,8 @@ iesys_compute_encrypt_nonce(ESYS_CONTEXT * esys_context, if (session->rsrc.misc.rsrc_session. sessi...
1
1
0
[{"id": "G0", "claim": "The newly indented lines in iesys_compute_encrypt_nonce (the 'Encrypt nonce already found' block) do not align with the surrounding indentation.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tpm2-software__tpm2-tss__1103
tpm2-software/tpm2-tss
1,103
defect
4ed7f26fda654059746827d46ddf515529157620
03b9f8f802b7ee698811445e9d75ce5f5dec94af
TEST ESYS: Enable tests for physical TPM.
* To enable tests with a physical TPM the configure options: --with-ptpm=[device] --with-ptpmtests=[test cases] were added. To compile the integration tests --enable-integration has to be used. The test cases are a comma separated list of: mandatory, optional and destructive. The default is ma...
diff --git a/Doxyfile.in b/Doxyfile.in index 8012b3a3e3..3df1354f68 100644 --- a/Doxyfile.in +++ b/Doxyfile.in @@ -827,6 +827,7 @@ INPUT = @top_srcdir@/doc/coding_standard_c.md \ @top_srcdir@/test/integration/esys-policy-nv-undefine-special.int.c \ @t...
2
1
0
[{"id": "G0", "claim": "The commit message misstates the TPM 2.0 spec - it says the exponent is mandatory where it should say the exponent of zero is mandatory - and cites Part 2 12.2.3.4 TPMS_ASYM_PARMS instead of 12.2.3.5 TPMS_RSA_PARMS.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope"...
null
tpm2-software__tpm2-tss__1121
tpm2-software/tpm2-tss
1,121
defect
bb3fef3dd69916d659a4fc40a74dbf3a21d93d3c
88e3d15fb2b9163dc9b52dde39aea0d097f9b3bd
tcti-device: change device tcti to nonblocking mode
Change device tcti to nonblocking mode of operation.
diff --git a/configure.ac b/configure.ac index 34f6f91cae..e412a11133 100644 --- a/configure.ac +++ b/configure.ac @@ -64,13 +64,22 @@ AC_ARG_ENABLE([esapi], [enable_esapi=$enableval], [enable_esapi=yes]) - AC_ARG_ENABLE([esapi], AS_HELP_STRING([--disable-esapi], [Enable TSS ESYS API ...
7
6
2
[{"id": "G0", "claim": "The whitespace-only blank-line removal in configure.ac is good cleanup but unrelated to this PR's feature and should not be part of it.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The enable_tcti_device_async variable ...
null
tpm2-software__tpm2-tss__1357
tpm2-software/tpm2-tss
1,357
defect
1451d4d90774a685bfa29263e4112c06efa16e05
f1cba052784a3ee015400130380c0cd208dd47b3
Restore original PCR allocations in test and detect TPM state changes
Fixes a PCR allocation test. Also adds some code to detect TPM state changes during tests, such as NV, objects, sessions and theoretically PCR allocations. PCR allocation changes only take effect after reboot, so they are not really discovered now. Future TODO: We need to figure out, how to make the tpm-simulator ...
diff --git a/.gitignore b/.gitignore index 0c48448938..910da17084 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,5 @@ config.h* # ignore fuzzing files Makefile-fuzz-generated.am test/fuzz/*.fuzz* +test/helper/tpm_dumpstate +stamp-h1 diff --git a/Makefile-test.am b/Makefile-test.am index 7facc8f1cd..6086276517...
3
1
1
[{"id": "G0", "claim": "The test/integration/*.int_state[2|1] files created by the new dumpstate calls need to be added to $CLEANFILES, otherwise make distcheck will complain.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Using diff instead of comp...
null
tpm2-software__tpm2-tss__1418
tpm2-software/tpm2-tss
1,418
defect
010ec6016dd3957d35951cb2a8ebf95658812b13
efc3efee30a90649fef3c36b50f9cb06644517c0
ESYS: Fix computation of session name in Esys_StartAuthSession.
* The session name was no added to meta data in StartAuthSession. * This caused an error in HMAC computation for policy sessions. Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de>
diff --git a/src/tss2-esys/api/Esys_StartAuthSession.c b/src/tss2-esys/api/Esys_StartAuthSession.c index 4dcb8b78d5..479a6d9b69 100644 --- a/src/tss2-esys/api/Esys_StartAuthSession.c +++ b/src/tss2-esys/api/Esys_StartAuthSession.c @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: BSD-2-Clause */ +/* SPDX-License-Identifier:...
2
2
2
[{"id": "G0", "claim": "A test that triggers the session-name computation issue should be added so it will not happen again in the future.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The change of the license header from 'BSD-2-Clause' to 'BSD-2' in ...
null
tpm2-software__tpm2-tss__1445
tpm2-software/tpm2-tss
1,445
defect
c885eff0a18500676ba86eb821d3adc6cc0a9d28
613aabf6c694f5b772aa937c140c84eab1057258
tss2-rc: add TSS2_RC decoding library
This library implements the TCG spec: -https://trustedcomputinggroup.org/wp-content/uploads/TCG_TSS_RC_v1p0_r12_pub.pdf This library allows for the conversion of TSS2_RC's from numerical form to a standardized human readable text string. Fixes: #1444 Signed-off-by: William Roberts <william.c.roberts@intel....
diff --git a/Makefile-test.am b/Makefile-test.am index b2e9bfaf93..02c9c878d3 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -62,7 +62,8 @@ TESTS_UNIT = \ test/unit/TPML-marshal \ test/unit/TPMT-marshal \ test/unit/TPMU-marshal \ - test/unit/sys-execute + test/unit/sys-execute \ + test...
13
12
2
[{"id": "G0", "claim": "sys_err_handler marks its rc parameter as unused with UNUSED(rc) although the handler uses rc to look up the error strings.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The else-if condition (!name || !handler) in Tss2_...
null
tpm2-software__tpm2-tss__1460
tpm2-software/tpm2-tss
1,460
defect
b55b642fc48b5a5cdbbf21e46397e5c8c2ecafcb
c42ebc9d696be7d8513f9408f5378ad7045010b6
TCTI: Fix the default locality value of tcti-mssim.
* The default value should be 0 instead of 3. * The integration tests relying on locality 3 (extend pcr 17, pcr event pcr 18) were adapted. * The locality is reset to 0 at the end of the locality integration test. Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de>
diff --git a/src/tss2-tcti/tcti-mssim.c b/src/tss2-tcti/tcti-mssim.c index be6b2be84a..b54cb083ee 100644 --- a/src/tss2-tcti/tcti-mssim.c +++ b/src/tss2-tcti/tcti-mssim.c @@ -489,7 +489,7 @@ tcti_mssim_init_context_data ( TSS2_TCTI_SET_LOCALITY (tcti_common) = tcti_mssim_set_locality; TSS2_TCTI_MAKE_STICKY (t...
2
1
0
[{"id": "G0", "claim": "Changing the tcti-mssim default locality from 3 to 0 may require downstream user-space applications to update their code to set locality 3 explicitly.", "category": "design", "verdict": "opposed", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The commit message should justify ...
null
tpm2-software__tpm2-tss__1494
tpm2-software/tpm2-tss
1,494
defect
e05d28ecafbed4613fe07a1eca789defa38a3d8e
e24490478194676d96fb3ff8a2d634b48cc4bc5a
esys: Fix HMAC generation for policy sessions
Policy sessions which do not include TPM2_PolicyAuthValue should not include authValue in their HMAC computation. Signed-off-by: Jeffrey Ferreira <jeffpferreira@gmail.com>
diff --git a/Doxyfile.in b/Doxyfile.in index 81fd17ba2d..76b662abc5 100644 --- a/Doxyfile.in +++ b/Doxyfile.in @@ -792,6 +792,7 @@ INPUT = @top_srcdir@/doc/coding_standard_c.md \ @top_srcdir@/test/integration/esys-commit.int.c \ @top_srcdir@/test/inte...
2
2
1
[{"id": "G0", "claim": "Add a test to the test suite that fails without the patch but succeeds with it.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The second patch needs the author's Signed-off-by tag.", "category": "documentation", "verdict": "supp...
null
tpm2-software__tpm2-tss__1531
tpm2-software/tpm2-tss
1,531
defect
76641c1e6b016979973fead7a24bb8fca4ee8325
4c201d01da8ddfd418b73337755e527d30b8c9ff
esys: change the hierarchy type according to the spec
There is a discrepancy between ESYS specification v0.90 rev4 and the ESYS implementation, where the specification defines hierarchy as ESYS_TR type and the implementation uses TPMI_RH_HIERARCHY type. The affected functions include: Esys_Hash(), Esys_HierarchyControl(), Esys_LoadExternal(), and Esys_SequenceComplete...
diff --git a/include/tss2/tss2_esys.h b/include/tss2/tss2_esys.h index 880b829ddd..9cd928126d 100644 --- a/include/tss2/tss2_esys.h +++ b/include/tss2/tss2_esys.h @@ -409,7 +409,7 @@ Esys_LoadExternal( ESYS_TR shandle3, const TPM2B_SENSITIVE *inPrivate, const TPM2B_PUBLIC *inPublic, - TPMI_RH_HIERARCH...
3
1
1
[{"id": "G0", "claim": "This change breaks the command line options interface of the tools and will require a 5.0 release, so the PR should be put on hold unless it is immediately needed for a reported bug.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "...
null
tpm2-software__tpm2-tss__1549
tpm2-software/tpm2-tss
1,549
defect
30afabfc81496bc8a225e67b4d090ba1e169a22a
7ac57f97672d5998aa192a8bf152f83b85c404cd
Disable optimizations for tctildr unit test (Fixes: #1547)
Optimizations on this unit test cause segmentation faults on s390x. The problem is only caught on "releases" though because of policy selected in `configure.ac`. Ideally after (or something similar) this is merged, it should backport to `2.3.x` branch as well.
diff --git a/Makefile-test.am b/Makefile-test.am index b0e23e3e41..161cb5f556 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -253,7 +253,7 @@ test_unit_tctildr_CFLAGS = $(CMOCKA_CFLAGS) $(TESTS_CFLAGS) test_unit_tctildr_LDADD = $(CMOCKA_LIBS) $(libutil) test_unit_tctildr_LDFLAGS = -Wl,--wrap=calloc,--wrap=fr...
2
2
0
[{"id": "G0", "claim": "In both test_conf_parse_bad_length and tctildr_init_conf_fail_test, replace the manual for-loop that fills name[] with memset(&name[0], 'a', sizeof(name)); name[PATH_MAX] = '\\0'; for readability.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, ...
null
tpm2-software__tpm2-tss__1576
tpm2-software/tpm2-tss
1,576
defect
b678b635cf5f1d6aeff939637656fb3903311536
f9ce6f7aeb2530c6bd24e1b8873516d111fd31f3
tcti: try to open /dev/tpmrm0 before /dev/tpm0 during tcti-device init
The tctildr library tries to open `/dev/tpmrm0` before `/dev/tpm0` if no tcti was specified. Previously, if the tcti `device` was specified, the tcti-device module would try to open `/dev/tpm0` only. To streamline the loading behavior, have tcti-device try to open `/dev/tpmrm0` and fallback to `/dev/tpm0`. Fixes ...
diff --git a/Makefile-test.am b/Makefile-test.am index 531e0459e0..915262d6fc 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -239,7 +239,8 @@ CLEANFILES += \ if UNIT test_unit_tcti_device_CFLAGS = $(CMOCKA_CFLAGS) $(TESTS_CFLAGS) test_unit_tcti_device_LDADD = $(CMOCKA_LIBS) $(libtss2_mu) $(libutil) -test...
2
2
1
[{"id": "G0", "claim": "The pull request makes the gcc builds fail because the new __wrap_open mocks every open() call, which gcov needs for code coverage collection; it should be fixed by mocking only the device files needed for the unit tests and passing the real open() through otherwise.", "category": "correctness",...
null
tpm2-software__tpm2-tss__1648
tpm2-software/tpm2-tss
1,648
defect
2aea7940895118b344948cb9115c09ee56cdcd32
b821c4211257cd873f9fde2011f06c013717f499
Tpm_clear auth
After tpm2_clear command is executed it sets all ownerAuth, endorsementAuth, and lockoutAuth to the Empty Buffer and then this is used for a response auth calculation. This requires to recalculate the esys session auth value after tpm2_clear is executed or the calculated response HMAC value will be invalid. Fixes: ...
diff --git a/Makefile-test.am b/Makefile-test.am index 5ccdd4a14c..e619d98add 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -145,6 +145,7 @@ if ESAPI ESYS_TESTS_INTEGRATION_DESTRUCTIVE = \ test/integration/esys-change-eps.int \ test/integration/esys-clear.int \ + test/integration/esys-tpm-clear-...
4
4
1
[{"id": "G0", "claim": "Esys_Clear_Finish should not delete the resource list (e.g. by ending the session or via Esys_TRSess_SetAttributes), so the still-open session can be flushed after the clear instead of being left unflushable with a deleted resource list.", "category": "design", "verdict": "supported", "priority"...
null
tpm2-software__tpm2-tss__1664
tpm2-software/tpm2-tss
1,664
defect
67e9d43dc291df765d53979654d7b877c51cef16
37c5f240bd32336c0281986bff105b5a8f5dd410
Esys_TestParams: silence expected errors
The TestParams code is used to test paramters against the TPM to understand if a specific algorithm and scheme is supported. Thus, certain errors are expected. The expected errors are: 1. From any layer 2. Are Format 1 errors 3. Are P1 or Parameter 1 errors 4 are one of: - RC_CURVE - RC_VALUE - RC_ASSYME...
diff --git a/src/tss2-esys/api/Esys_TestParms.c b/src/tss2-esys/api/Esys_TestParms.c index e64521e9b8..9b5bffa8b1 100644 --- a/src/tss2-esys/api/Esys_TestParms.c +++ b/src/tss2-esys/api/Esys_TestParms.c @@ -92,9 +92,11 @@ Esys_TestParms( /* Restore the timeout value to the original value */ esysContext->tim...
3
2
0
[{"id": "G0", "claim": "The redundant #include \"tss2_common.h\" should be dropped from aux_util.h since tss2_tpm2_types.h already includes it.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The static helper tss2_is_expected_error should maybe ...
null
tpm2-software__tpm2-tss__1690
tpm2-software/tpm2-tss
1,690
defect
3fe4cc103afccd7daa55d0a861c5215f333c2efb
bbab96026030b8fc142c37f277a8ed2982384ec7
tcti: fix invalid error code in case of wrong magic
The commit bc70b83 changed TCTIs to return TSS2_TCTI_RC_BAD_REFERENCE instead of TSS2_TCTI_RC_BAD_CONTEXT when the ctx was NULL, to make it spec compliant. After that another problem was found, where the tcti cast functions still didn't handle it correctly. The problem was that if the magic number was wrong a NULL ...
diff --git a/src/tss2-tcti/tcti-common.c b/src/tss2-tcti/tcti-common.c index 9c2c38ea7c..a4476acc00 100644 --- a/src/tss2-tcti/tcti-common.c +++ b/src/tss2-tcti/tcti-common.c @@ -38,12 +38,17 @@ tcti_common_down_cast (TSS2_TCTI_COMMON_CONTEXT *ctx) TSS2_RC tcti_common_cancel_checks ( - TSS2_TCTI_COMMON_CONTEXT *...
1
1
1
[{"id": "G0", "claim": "The destructive magic overwrite in the TCTI context-cast functions irrevocably corrupts any context whose magic does not match, leaving it unusable even with its own TCTI's functions, and since TCTI_BAD_MAGIC is never compared it serves no purpose; it should be removed, with a magic check added ...
null
tpm2-software__tpm2-tss__1719
tpm2-software/tpm2-tss
1,719
defect
86b8bc3f3256be75d36e4a00f925b0e8655b9b61
1fd8aafcb5cb290ba21052c22d799d96092ed1ef
Fapi change callback API
* For callbacks instead of the FAPI context the object path of the object to be authorized will be passed and callback parameters which should not be changed are declared const. * The integration tests were adapted. Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de>
diff --git a/include/tss2/tss2_fapi.h b/include/tss2/tss2_fapi.h index cc474b7a14..c10afd297a 100644 --- a/include/tss2/tss2_fapi.h +++ b/include/tss2/tss2_fapi.h @@ -676,9 +676,9 @@ TSS2_RC Fapi_NvSetBits_Finish( FAPI_CONTEXT *context); typedef TSS2_RC (*Fapi_CB_Auth)( - FAPI_CONTEXT *context, + char...
3
3
0
[{"id": "G0", "claim": "Please remove the two extra empty lines at the end of ifapi_keystore_load_finish's error_cleanup block in src/tss2-fapi/ifapi_keystore.c.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The parameters of signatureCallback ...
null
tpm2-software__tpm2-tss__1740
tpm2-software/tpm2-tss
1,740
defect
b6f6e48e84d42184bb51ea4187048abbc119ab6d
78a6b439aed68cf6195fb1416c307facd3851072
Fapi backport fixes part2
* Several FAPI fixes which also should be back ported to 2.4.x. * Fix return code for event parsing errors. * Fix computation of the random value for object sealing. * Check whether SRK deletion is possible in Fapi_Delete. * Check whether pathnames are valid. * Fix missing authentication for hierarchy in Fapi_Dele...
diff --git a/src/tss2-fapi/api/Fapi_Delete.c b/src/tss2-fapi/api/Fapi_Delete.c index a448202094..fcfcdad844 100644 --- a/src/tss2-fapi/api/Fapi_Delete.c +++ b/src/tss2-fapi/api/Fapi_Delete.c @@ -23,6 +23,226 @@ #include "util/log.h" #include "util/aux_util.h" +/** Move a certain path to the beginning of a path arra...
2
1
1
[{"id": "G0", "claim": "The first strncmp in move_path_to_top should also be compared with 0 like the second one, since it is not clear from the comment above.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The normalization in expand_path changes t...
null
tpm2-software__tpm2-tss__1745
tpm2-software/tpm2-tss
1,745
defect
a6acaa72d3fa06a22dfd04703509d334866c93ff
8477c64a6bf3e116ff4ffba899fee5352d127821
dev-tcti: remove build-time flags for async and partial read modes
Enable async mode and partial reads by default for 3.0 This has been implemented for some time already and is supported by the kernel driver since 4.20 AFAICR. Currently the kernel is at 5.7 so that should make it safe to assume that most of distros will have that driver changes. One could always disable this at c...
diff --git a/configure.ac b/configure.ac index 58d5889fa1..692d83a9e1 100644 --- a/configure.ac +++ b/configure.ac @@ -126,7 +126,7 @@ AC_ARG_ENABLE([tcti-device-async], AS_HELP_STRING([--enable-tcti-device-async], [Enable asynchronus operation on TCTI device (note: This needs to be supported b...
1
1
1
[{"id": "G0", "claim": "Detect the TCTI's async and partial-read support at run time (e.g. via uname or options in the TCTI config) and drop the configure-time flags, because defaulting them on at build time breaks callers and existing build flows on kernels whose driver lacks support (e.g. ubuntu-16.04/18.04).", "cate...
null
tpm2-software__tpm2-tss__1786
tpm2-software/tpm2-tss
1,786
defect
ebfe77b41e677de6cd808e3155fe43d606951143
86d9db8205fddd0853a4591bec59c6f5d104cd50
Better logs in FAPI
- Add FAPI_RC_ALREADY_PROVISIONED for Fapi_Provision - Add some hints in logging for certain common errors
diff --git a/include/tss2/tss2_common.h b/include/tss2/tss2_common.h index e21036a37c..3c9a040901 100644 --- a/include/tss2/tss2_common.h +++ b/include/tss2/tss2_common.h @@ -120,6 +120,7 @@ typedef uint32_t TSS2_RC; #define TSS2_BASE_RC_BAD_KEY 50U #define TSS2_BASE_RC_NO_HANDLE 51U...
1
1
0
[{"id": "G0", "claim": "The new error log in Fapi_Encrypt.c should be reworded from \"Maybe the data to be encrypted is too large...\" to \"The data to be encrypted might be too large...\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tpm2-software__tpm2-tss__1838
tpm2-software/tpm2-tss
1,838
defect
387515a5f6eae9314a1a64031fb75a507c7d3251
0ae4b50c4f26b2639bb96cc99541516357b07d24
tcti: fix collisions with multi-threading
When multiple instances of tcti-pcap are writing to the same file at the same time collisions can appear. Fix the following three issues: * The random host is seeded by the unix epoch in seconds. If multiple threads start roughly at the same time, their packages are associated with the same connection. Move to nanos...
diff --git a/src/tss2-tcti/tcti-pcap-builder.c b/src/tss2-tcti/tcti-pcap-builder.c index 59f93b349d..068efc2b91 100644 --- a/src/tss2-tcti/tcti-pcap-builder.c +++ b/src/tss2-tcti/tcti-pcap-builder.c @@ -24,14 +24,6 @@ #define LOGMODULE tcti #include "util/log.h" -/** - * the host port is chosen randomly to enable h...
1
1
1
[{"id": "G0", "claim": "The pull request fails the Cirrus (FreeBSD) build with \"use of undeclared identifier 'CLOCK_MONOTONIC_RAW'\" and needs a fix for it (include <time.h>, and on FreeBSD define CLOCK_MONOTONIC_RAW as CLOCK_MONOTONIC instead of the _POSIX_C_SOURCE defines tried).", "category": "correctness", "verdic...
null
tpm2-software__tpm2-tss__1872
tpm2-software/tpm2-tss
1,872
defect
29c46f0d27942146a909f7f12c0f8f65c45bec93
fbea24517054ba94c7b5f3c7e4617ff81e42e6fc
Fapi: Fix setting of the written flag of NV objects in FAPI NV commands
* The written flag was not set for increment, set bits, and extend, which caused wrong computation of NV name after deserialization. * For PolicyNV the WRITTEN bit is set during policy calculations, because during policy execution it will be set. * To check whether the nv written flag was set correctly afte...
diff --git a/Makefile-test.am b/Makefile-test.am index d971713d2d..c36423ca0f 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -311,6 +311,7 @@ FAPI_TESTS_INTEGRATION = \ test/integration/fapi-key-create-policy-signed.fint \ test/integration/fapi-key-create-policy-signed-ecc.fint \ test/integratio...
1
1
0
[{"id": "G0", "claim": "PolicyNV calculation should assume the NV WRITTEN bit — the reviewer asks what happens for a key referencing a counter (or extend index) created before the first write, whose policy would carry a cleared NVWRITTEN bit and fail, and suggests assuming WRITTEN for counters during PolicyNV_calculate...
null
tpm2-software__tpm2-tss__1941
tpm2-software/tpm2-tss
1,941
defect
3608708970a4fd9207a94d5296cb0cf172f46d18
b312a288a2c002b3acc202fc1e1e69216659df11
FAPI: Improve integration tests.
* The asserts which are activated by --enable-debug are replaced with ASSERT, which is always active, to ensure that for FAPI integration tests the asserts are always fulfilled. * For JSON encoded results, if possible, the complete JSON value will be checked. If parts of the JSON object are variable only se...
diff --git a/test/data/fapi/policy/pol_pcr16_read.json b/test/data/fapi/policy/pol_pcr16_read.json index 5bd51ee8d1..3936b54651 100644 --- a/test/data/fapi/policy/pol_pcr16_read.json +++ b/test/data/fapi/policy/pol_pcr16_read.json @@ -4,7 +4,7 @@ "policy":[ { "type":"POLICYPCR", - ...
5
5
0
[{"id": "G0", "claim": "The line `SAFE_FREE(json_policy);` added in test_fapi_key_create_policy_pcr_sign is indented with three spaces instead of four, misaligned with the surrounding code.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "In fapi-...
null
tpm2-software__tpm2-tss__2008
tpm2-software/tpm2-tss
2,008
defect
edca7b2a27230a108ec1aafcaad98a8d6eb99525
745ce6928e9c6133b2a7142624f736b5478e24b5
FAPI: Support ~ in paths.
* $HOME and ~ in files defined in the FAPI config file will be interpreted as home directory. Fixes #1980 * The unit test fapi-config was adapted to check this expansion. * The unnecessary expansion in ifapi_keystore_initialize was removed. Signed-off-by: Juergen Repp <juergen.repp@sit.fraunhofer.de>
diff --git a/src/tss2-fapi/ifapi_config.c b/src/tss2-fapi/ifapi_config.c index 712587faf7..0e68e3d1e5 100644 --- a/src/tss2-fapi/ifapi_config.c +++ b/src/tss2-fapi/ifapi_config.c @@ -153,6 +153,49 @@ ifapi_config_initialize_async(IFAPI_IO *io) return TSS2_RC_SUCCESS; } +/** + * Expand user symbol in path. + * +...
4
2
0
[{"id": "G0", "claim": "The doc comment should also document the TSS2_FAPI_RC_BAD_PATH return value for expand_home.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "expand_home should get a belts-and-suspenders NULL check on path even though caller...
null
tpm2-software__tpm2-tss__2044
tpm2-software/tpm2-tss
2,044
defect
9288970a3e657cdee85d08d3813199ec864de3ad
d262a1e7af20ae692c880c0c13f577b22307f85f
Add unused and maybe_unused macros
* Add a CI build with --with-maxloglevel=none configuration * Add unused and maybe_unused macros * Change the tss lib code to use the new macros * Change test code to use the new macros
diff --git a/.ci/docker.run b/.ci/docker.run index 62f1772e66..f4f0c97521 100755 --- a/.ci/docker.run +++ b/.ci/docker.run @@ -66,7 +66,7 @@ fi if [ "$SCANBUILD" == "yes" ]; then scan-build --status-bugs ../configure --enable-unit --enable-self-generated-certificate --enable-integration --with-crypto=$WITH_CRYPTO $...
1
1
1
[{"id": "G0", "claim": "The MAYBE_UNUSED macro should not unconditionally mark variables as unused (and should use COMPILER_ATTR(unused)); it should be conditional on the log level / debug build (e.g. #ifndef NDEBUG or MAXLOGLEVEL == LOGL_NONE) so it does not hide legitimate unused-variable warnings.", "category": "des...
null
tpm2-software__tpm2-tss__2050
tpm2-software/tpm2-tss
2,050
defect
c15a977e759002d59161f40319bb6e99e4babc93
4ea2aee8b69134d3f498368a43523173c9cffbef
fix issues with MAYBE_UNUSED
Corrects: - src/util/aux_util: drop NDEBUG from MAYBE_UNUSED_MACRO - test: conditionally include primaryHandle_AuthSession - test: simplify conditional compilation expression - test: fix preprocessor if statements - fapi: remove UNUSED variables - tpms-types.c: mark param as UNUSED not MAYBE_UNUSED
diff --git a/src/util/aux_util.h b/src/util/aux_util.h index c3d473c2d8..71b0bddb37 100644 --- a/src/util/aux_util.h +++ b/src/util/aux_util.h @@ -28,7 +28,7 @@ extern "C" { #endif #define UNUSED(x) (void)(x) -#if (MAXLOGLEVEL == LOGL_NONE) || defined(NDEBUG) +#if (MAXLOGLEVEL == LOGL_NONE) || !defined(NDEBUG) /* ...
4
2
1
[{"id": "G0", "claim": "Variables previously silenced with (void) var; should be marked with UNUSED(var); instead of relying on MAYBE_UNUSED, starting with the (void) casts in tpms-types.c.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}, {"id": "G1", "claim": "The invert...
null
tpm2-software__tpm2-tss__2072
tpm2-software/tpm2-tss
2,072
defect
86758a4af1d026fc5a4a692523c73a6d96970279
a75e0b4f6bab8552e118af1bc7871d963ba26ed6
Fapi fix file locking
* According to RFC PR #2070 unnecessary function calls were removed. * According to the recommendation of the lockf man page fcntl was used instead of lockf to lock files to assure that the code is portable. * The usage of lockf was replaced with usage of fcntl in the corresponding unit test. Signed-off-by: ...
diff --git a/Makefile-test.am b/Makefile-test.am index 020b6680e4..8b45f4619d 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -639,7 +639,6 @@ test_unit_fapi_io_CFLAGS = $(CMOCKA_CFLAGS) $(TESTS_CFLAGS) test_unit_fapi_io_LDADD = $(CMOCKA_LIBS) $(TESTS_LDADD) test_unit_fapi_io_LDFLAGS = $(TESTS_LDFLAGS) $(JSO...
1
1
0
[{"id": "G0", "claim": "Use a zero initializer (struct flock flock = { 0 }) instead of declaring the struct and then zeroing it with a separate memset call.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tpm2-software__tpm2-tss__2254
tpm2-software/tpm2-tss
2,254
defect
849310c65e94e7ab0b2e9e358feb007c5a8e3b1f
611788c084dd3c9f16b63a0810ed22b193574740
FAPI: Fix the authorization of hierarchy objects.
The default policy "policy secret" for the endorsement key is defined for the endorsement hierarchy. The corresponding object had to be searched in the keystore during policy execution. This search did not work, due to various bugs. * A erroneous cleanup of the EK was executed where the policy was deleted. * The n...
diff --git a/Makefile-test.am b/Makefile-test.am index 76e5f8ec79..9a531da091 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -322,6 +322,7 @@ FAPI_TESTS_INTEGRATION = \ test/integration/fapi-get-random.fint \ test/integration/fapi-platform-certificates.fint \ test/integration/fapi-key-create-sig...
1
1
0
[{"id": "G0", "claim": "The sentence in the new set_name_hierarchy_object doc comment (\"The TPM will be computed from the esys handle and the name will be computed from the TPM handle\") appears weird and should be reworded.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"...
null
tpm2-software__tpm2-tss__228
tpm2-software/tpm2-tss
228
defect
daeb5bb8112a0fc8ea1bc5e8b2fa72bef4626ee9
66cd68215667a2359e490d205e2e1010763f7590
No sapi client
This patch set removes the last remnants of the SAPI_CLIENT macro.
diff --git a/ChangeLog b/ChangeLog index 91fc59d449..b9d42fe28e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ Unreleased Changed * Move default compiler flags to config.site file. +* Removed SAPI_CLIENT macro tests. 2015-07-28 Will Arthur <will.c.arthur@intel.com> * 0.98 release diff --git a/Makefile.am...
1
1
1
[{"id": "G0", "claim": "Removing the SAPI_CLIENT/level branching from GetCommands means the RM's call to it will return the wrong error level.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
tpm2-software__tpm2-tss__2396
tpm2-software/tpm2-tss
2,396
defect
84fad9025b3dfeb0e16cdc138348e685fa5bbc48
18c7cf3cd305692ce05d53ed384649a3b815af02
fapi: Fix json encoding of policies with complex TPM2Bs.
The json spec states that complex TPM2Bs do not have a JSON representation. Currently it's possible to use the the representation of a complex TPM2B in policy authorize nv, in policy duplication select, policy template. The usage of the embedded TPMT or TPMS JSON representation, as required by the spec, can't be us...
diff --git a/src/tss2-fapi/ifapi_json_deserialize.h b/src/tss2-fapi/ifapi_json_deserialize.h index 74e99d1c9d..8d80da2550 100644 --- a/src/tss2-fapi/ifapi_json_deserialize.h +++ b/src/tss2-fapi/ifapi_json_deserialize.h @@ -25,6 +25,29 @@ return_if_error2(r, "Bad value for field \"%s\".", json_name); \ } ...
3
3
1
[{"id": "G0", "claim": "Fix the misspelling of \"embedde\" to \"embedded\" in the new comment in src/tss2-fapi/ifapi_json_deserialize.h.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new complex-TPM2B/TPMS policy JSON handling is currently no...
null
tpm2-software__tpm2-tss__2455
tpm2-software/tpm2-tss
2,455
defect
6c7f9dcbede7edd8bf487fa4b1f1a01c52c9af14
c49d9e86853747cf0240a6551590028e5ada88bc
Fuzz additions
- Fix fuzzing targets still being built with CPP, no need C is fine. - tcti spi helper, make the structure of fn pointers a pointer and not pass by value - tcti spi helper check that size is to a big enough block of memory - fuzz transfer interface within the tcti spi framework
diff --git a/Makefile-fuzz.am b/Makefile-fuzz.am index 3d5459dc82..805f8f7f13 100644 --- a/Makefile-fuzz.am +++ b/Makefile-fuzz.am @@ -7,7 +7,7 @@ FUZZ_LOG_COMPILER = $(srcdir)/script/fuzz-log-compiler.sh INCLUDE_DIRS += -I$(srcdir)/test/fuzz/tcti TESTS_LIBADD = $(lib_LTLIBRARIES) $(libtss2_mu) $(libtss2_sys) $(libut...
1
1
0
[{"id": "G0", "claim": "The stray `-I bill` include flag left over from makefile debugging should be removed from test_fuzz_tcti_spi_helper_fuzz_test_CFLAGS.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tpm2-software__tpm2-tss__2475
tpm2-software/tpm2-tss
2,475
defect
10a5e226607bf54bc6554e74976464448a24ca9e
4273cd947ba1898fa792b7969b5c3c2adb230660
FAPI: Allow keyedhash keys in PolicySigned.
* The attribute sign is now possible for sealed objects, to enable the usage of the sealed object as HMAC key in policy signed. * Instead of the base64 encoded public key now the name of the sealed object will be passed (base64 encoded) to the signature callback * An integration test is added. Fixes #2445 Signe...
diff --git a/Makefile-test.am b/Makefile-test.am index af27e96c03..7c76f52bf3 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -382,6 +382,7 @@ FAPI_TESTS_INTEGRATION = \ test/integration/fapi-key-create-policy-pcr-sign.fint \ test/integration/fapi-key-create-policy-signed.fint \ test/integration/...
1
1
0
[{"id": "G0", "claim": "Put the indentation-only hunk (the re-indent of statecase(cb_ctx->cb_state, POL_CB_READ_OBJECT) in src/tss2-fapi/ifapi_policy_callbacks.c) on its own patch/commit instead of bundling it with the functional change, so that reverting the functional commit would not revert the whitespace fix.", "ca...
null
tpm2-software__tpm2-tss__2479
tpm2-software/tpm2-tss
2,479
defect
dd42fc51f3be5c71eacfb35d3d4f25b0b3111d47
2bd97b132622e7493b4f80c8ad9901ee595d5533
TCTI: Add USB TPM (LetsTrust-TPM2Go) TCTI module
Bringing up a TCTI module to support the LetsTrust-TPM2Go, a USB TPM from @PaulKissinger. It's a combined effort and resources are taken from: - @PeterHuewe: https://github.com/PeterHuewe/tpm2-tss/tree/letstrust2go, https://github.com/PeterHuewe/tpm2-tss/tree/letstrust2go-wo-waitstates - @tobyp: https://gist.github.c...
diff --git a/.cirrus.yml b/.cirrus.yml index f7d49a4862..f565cded71 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -3,6 +3,7 @@ task: CFLAGS: "-I/usr/local/include -I/usr/local/openssl/include" LDFLAGS: -L/usr/local/lib ibmtpm_name: ibmtpm1637 + libusb_version: v1.0.26 freebsd_instance: matrix:...
6
4
1
[{"id": "G0", "claim": "The libusb dependency should be installed via pkg on FreeBSD rather than cloned and built from source in .cirrus.yml (reviewer asks why it is built from source).", "category": "maintainability", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Drop the lt2go...
null
tpm2-software__tpm2-tss__2496
tpm2-software/tpm2-tss
2,496
defect
34bf7bff93793ae9d91069bf1fb58b41832f5e73
fd1d469b415cfc26ea6701642935f094c6bca721
esys_iutil.c: Adding range for ACs
Signed-off-by: malikabhi05 <abhishek.malik@intel.com>
diff --git a/Makefile-test.am b/Makefile-test.am index 6ad5c542d8..6b48e11767 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -305,6 +305,7 @@ ESYS_TESTS_INTEGRATION_MANDATORY = \ test/integration/esys-tr-fromTpmPublic-nv.int \ test/integration/esys-tr-fromTpmPublic-session.int \ test/integration...
2
2
2
[{"id": "G0", "claim": "AC handles in the ESYS_TR_RH_AC_FIRST..ESYS_TR_RH_AC_LAST range must map to TPM2_NV_AC_FIRST, but iesys_handle_to_tpm_handle uses TPM2_RH_ACT_0, and the test's expected TPM handle and marshaled name likewise use ACT constants instead of TPM2_NV_AC_FIRST (_ACT_ != _AC_).", "category": "correctnes...
null
tpm2-software__tpm2-tss__2540
tpm2-software/tpm2-tss
2,540
defect
6c2f14c6d3af273d8ae243d0724e29cc7dfabf83
e89fec1f3afbcc292e9d91491af81ecf541c3223
FAPI: Fix event logging for big endian machines.
* For eventlogs in little endian format on big endian machines the data will be converted to big endian. That can occur if the option --ima_canonical_fmt is used. * The tests with system events are skipped because the test data uses little endian. * For the IMA test files in little endian format the little endian num...
diff --git a/afl-fuzzing/fuzz-ima.sh b/afl-fuzzing/fuzz-ima.sh index 988f49db8b..55aa91cfb9 100755 --- a/afl-fuzzing/fuzz-ima.sh +++ b/afl-fuzzing/fuzz-ima.sh @@ -7,9 +7,14 @@ function stop() { killall afl-fuzz } - trap stop +test_endian=$(echo -n I | od -to2 | awk 'FNR==1{ print substr($2,6,1)}') +if [ ...
1
1
1
[{"id": "G0", "claim": "The variable pcr may be used uninitialized at the add_header_cb call in ifapi_read_ima_event_log when the pcrList loop never assigns it.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
tpm2-software__tpm2-tss__2665
tpm2-software/tpm2-tss
2,665
defect
dcec28b11f0d479571a63d46d5e23cdc4ffe44e0
1badbb840f31cdcd2c2ac5afbc02ece60e4395a7
esys: remove trailing zeros in auth value.
When TPM Calulates the HMAC trailing zeros are rmoved. Therfore the trailing zeros are removed in Esys_TR_SetAuth, Esys_Create, Esys_CreateLoded, Esys_NV_DefineSpace, and Esys_CreatePrimary. The auth value is also adapted in the ChangeAuth programs Addresses #2664 Signed-off-by: Juergen Repp <juergen_repp@web...
diff --git a/Makefile-test.am b/Makefile-test.am index 827c4736ec..9c13229c28 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -254,6 +254,7 @@ ESYS_TESTS_INTEGRATION_MANDATORY = \ test/integration/esys-certify-creation.int \ test/integration/esys-certifyX509.int \ test/integration/esys-certify.in...
3
2
1
[{"id": "G0", "claim": "The auth values passed when creating remembered objects (Esys_Create, Esys_CreateLoaded, Esys_CreatePrimary, Esys_NV_DefineSpace) also need the trailing-zero handling.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The iesys_...
null
tpm2-software__tpm2-tss__2695
tpm2-software/tpm2-tss
2,695
defect
5412bca57b25c7e63da6dff0843cf9b5b655b447
ce9c2c19b88bad9c25cedf8e0fd7529f3c234fd4
tctildr: turn tctildr into a tcti
Currently the tctildr is *almost* a tcti. I stumbled upon that when I wanted to create an abstraction for tctis in Rust. * it misses the `Tss2_Tcti_Info` symbol which enables dynamic loading * it does not have a caller-allocated init function, only callee-allocated ones So I added the init function and the symbo...
diff --git a/Makefile-test.am b/Makefile-test.am index 827c4736ec..719185dffe 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -809,8 +809,6 @@ test_unit_esys_crypto_LDFLAGS = $(TESTS_LDFLAGS) $(TSS2_ESYS_LDFLAGS_CRYPTO) test_unit_esys_crypto_SOURCES = test/unit/esys-crypto.c \ ...
1
1
1
[{"id": "G0", "claim": "The call to tctildr_context_cast in tctildr_init_context_data does not check its result for null, unlike most other calls to that function, and the result is then dereferenced.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
tpm2-software__tpm2-tss__2696
tpm2-software/tpm2-tss
2,696
defect
d0632dabe8557754705f8d38ffffdafc9f4865d1
6dcffa75b4e2d7ef31aad29966fce68ccceb21ff
tcti: Add '/dev/tcm0' to default conf
A standard similar to TPM has been released in China, called TCM(Trusted Cryptography Module), and its device path is /dev/tcm0. The TCM standard is compatible with TPM, and TSS can be used to manage its device path.
diff --git a/doc/tcti.md b/doc/tcti.md index 90c029805..fd981159f 100644 --- a/doc/tcti.md +++ b/doc/tcti.md @@ -95,8 +95,9 @@ flowchart TD 2. `libtss2-tcti-tabrmd.so` 3. `libtss2-tcti-device.so.0:/dev/tpmrm0` 4. `libtss2-tcti-device.so.0:/dev/tpm0` - 5. `libtss2-tcti-swtpm.so` - 6. `libtss2-tcti-mssim.so` +...
2
1
1
[{"id": "G0", "claim": "The unit tests are still not working with the pull request's change and the author must fix them.", "category": "testing", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Please add a Signed-off-by tag to the commit message.", "category": "process", "verd...
null
tpm2-software__tpm2-tss__2715
tpm2-software/tpm2-tss
2,715
defect
ede63dd1ac1f0a46029d457304edcac2162bfab8
3536c2b706246edeb439a5ffff2ee14c05e6e86f
TCTI: Add tcti-spidev
Add a new TCTI module that can talk to TPMs connected via spidev to the host.
diff --git a/Makefile-test.am b/Makefile-test.am index 0cd3929c4c..a64367201c 100644 --- a/Makefile-test.am +++ b/Makefile-test.am @@ -158,6 +158,9 @@ endif if ENABLE_TCTI_SPI_LTT2GO TESTS_UNIT += test/unit/tcti-spi-ltt2go endif +if ENABLE_TCTI_SPIDEV +TESTS_UNIT += test/unit/tcti-spidev +endif if ENABLE_TCTI_SPI_F...
4
4
1
[{"id": "G0", "claim": "The global variable 'tr' is poorly named and should use a longer, more descriptive global name.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The filename doc/tcti-spidev.md is misleading because the file's content is ab...
null
tpm2-software__tpm2-tss__2768
tpm2-software/tpm2-tss
2,768
defect
48ce2d49cf26150b1863745f980fcde95cb4cdbc
c28a3748f9dfc2691d482cfd8576527501fe08c2
FAPI: Add new profiles P_RSA3072SHA384 P_ECCP384SHA384
* The new profiles are added to the dist directory. * The key size 3072 and 4092 is added to the json serialization and deserialization. * The integration tests are adapted to enable usage of P_RSA3072 as default profile. * The state handling in the state machines of the policy utilities is fixed. * The policy erro...
diff --git a/Makefile.am b/Makefile.am index 2327266f10..e556af01f9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -707,7 +707,9 @@ tpm2-tss-fapi.conf: dist/tmpfiles.d/tpm2-tss-fapi.conf.in fapiprofilesdir = @sysconfdir@/tpm2-tss/fapi-profiles fapiprofiles_DATA = dist/fapi-profiles/P_RSA2048SHA256.json \ - ...
1
1
0
[{"id": "G0", "claim": "ifapi_session_clean in src/tss2-fapi/fapi_util.c contains commented-out policy-session cleanup code that should be removed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
tpm2-software__tpm2-tss__2843
tpm2-software/tpm2-tss
2,843
defect
754304109cd0e9f5093030b16739d7c5168342f0
a3c0f8ca6c308dbe5040eae3b974e5a788b1c8d4
TCTI: Separate namespaces for internal struct
Some (dynamic) linkers seam to resolve internal symbols against the loading library in a dlopen() instead of its local symbols. Namely a tss2_tcti_info symbol ref of e.g. tcti-device would resolve against the symbol of tctildr. We protect against such situations by separating the names. Fixes: #2840
diff --git a/src/tss2-tcti/tcti-cmd.c b/src/tss2-tcti/tcti-cmd.c index 070670f090..8a3cdb7417 100644 --- a/src/tss2-tcti/tcti-cmd.c +++ b/src/tss2-tcti/tcti-cmd.c @@ -622,7 +622,7 @@ TSS2_RC Tss2_Tcti_Cmd_Init (TSS2_TCTI_CONTEXT *tctiContext, size_t *size, } /* public info structure */ -const TSS2_TCTI_INFO tss2_tc...
1
1
1
[{"id": "G0", "claim": "The per-file TSS2_TCTI_INFO info objects should be declared static so they get internal linkage instead of leaking internal symbols, which the reviewer argues is what enabled the original symbol-collision bug.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced...
null
tpm2-software__tpm2-tss__2871
tpm2-software/tpm2-tss
2,871
defect
3ec56d5f8fd2051ce741b90ce21238dd37782e3e
24e2f6a23eb76b4dd1d14a73df446a19f6a8a023
Fix tests with a physical tpm
* policy: Add check for sha384 in test policy execute. * FAPI: Fix tests with physical TPM using SHA384. * tcti mssim: Fix wrong cast on 32 bit systems. Fixed: #2873
diff --git a/src/tss2-tcti/tcti-mssim.c b/src/tss2-tcti/tcti-mssim.c index 751716de5f..11d405935e 100644 --- a/src/tss2-tcti/tcti-mssim.c +++ b/src/tss2-tcti/tcti-mssim.c @@ -330,6 +330,7 @@ tcti_mssim_receive ( TSS2_TCTI_MSSIM_CONTEXT *tcti_mssim = tcti_mssim_context_cast (tctiContext); TSS2_TCTI_COMMON_CONT...
1
1
1
[{"id": "G0", "claim": "Also fix the other two calls of socket_recv_buf() in tcti-mssim.c (they are even in the same receive function) the same way as the call the pull request already changed, while tcti-swtpm is fine as is.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null