psptool 3.2.dev1__tar.gz → 3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. {psptool-3.2.dev1 → psptool-3.3}/.github/workflows/publish.yml +0 -23
  2. {psptool-3.2.dev1 → psptool-3.3}/PKG-INFO +1 -1
  3. {psptool-3.2.dev1 → psptool-3.3}/psptool/blob.py +3 -10
  4. {psptool-3.2.dev1 → psptool-3.3}/psptool/header_file.py +1 -1
  5. {psptool-3.2.dev1 → psptool-3.3}/.github/workflows/gha-metrics.yml +0 -0
  6. {psptool-3.2.dev1 → psptool-3.3}/.github/workflows/python-tests.yml +0 -0
  7. {psptool-3.2.dev1 → psptool-3.3}/.gitignore +0 -0
  8. {psptool-3.2.dev1 → psptool-3.3}/.gitmodules +0 -0
  9. {psptool-3.2.dev1 → psptool-3.3}/LICENSE +0 -0
  10. {psptool-3.2.dev1 → psptool-3.3}/README.md +0 -0
  11. {psptool-3.2.dev1 → psptool-3.3}/psptool/__init__.py +0 -0
  12. {psptool-3.2.dev1 → psptool-3.3}/psptool/__main__.py +0 -0
  13. {psptool-3.2.dev1 → psptool-3.3}/psptool/cert_tree.py +0 -0
  14. {psptool-3.2.dev1 → psptool-3.3}/psptool/crypto.py +0 -0
  15. {psptool-3.2.dev1 → psptool-3.3}/psptool/directory.py +0 -0
  16. {psptool-3.2.dev1 → psptool-3.3}/psptool/entry.py +0 -0
  17. {psptool-3.2.dev1 → psptool-3.3}/psptool/errors.py +0 -0
  18. {psptool-3.2.dev1 → psptool-3.3}/psptool/fet.py +0 -0
  19. {psptool-3.2.dev1 → psptool-3.3}/psptool/file.py +0 -0
  20. {psptool-3.2.dev1 → psptool-3.3}/psptool/firmware.py +0 -0
  21. {psptool-3.2.dev1 → psptool-3.3}/psptool/key_store_file.py +0 -0
  22. {psptool-3.2.dev1 → psptool-3.3}/psptool/microcode_file.py +0 -0
  23. {psptool-3.2.dev1 → psptool-3.3}/psptool/psptool.py +0 -0
  24. {psptool-3.2.dev1 → psptool-3.3}/psptool/pubkey_file.py +0 -0
  25. {psptool-3.2.dev1 → psptool-3.3}/psptool/rom.py +0 -0
  26. {psptool-3.2.dev1 → psptool-3.3}/psptool/utils.py +0 -0
  27. {psptool-3.2.dev1 → psptool-3.3}/pyproject.toml +0 -0
  28. {psptool-3.2.dev1 → psptool-3.3}/tests/__init__.py +0 -0
  29. {psptool-3.2.dev1 → psptool-3.3}/tests/create_metrics.sh +0 -0
  30. {psptool-3.2.dev1 → psptool-3.3}/tests/gha_metrics.py +0 -0
  31. {psptool-3.2.dev1 → psptool-3.3}/tests/integration/__init__.py +0 -0
  32. {psptool-3.2.dev1 → psptool-3.3}/tests/integration/test_psptrace.py +0 -0
  33. {psptool-3.2.dev1 → psptool-3.3}/tests/integration/test_rom_files.py +0 -0
  34. {psptool-3.2.dev1 → psptool-3.3}/tests/metrics.txt +0 -0
  35. {psptool-3.2.dev1 → psptool-3.3}/tests/unit/__init__.py +0 -0
  36. {psptool-3.2.dev1 → psptool-3.3}/tests/unit/test_cli.py +0 -0
@@ -49,26 +49,3 @@ jobs:
49
49
  path: dist/
50
50
  - name: Publish distribution to PyPI
51
51
  uses: pypa/gh-action-pypi-publish@release/v1
52
-
53
- publish-to-testpypi:
54
- name: >-
55
- Publish Python distribution to TestPyPI
56
- needs:
57
- - build
58
- runs-on: ubuntu-latest
59
- environment:
60
- name: testpypi
61
- url: https://test.pypi.org/p/psptool/
62
- permissions:
63
- id-token: write # important for trusted publishing
64
- steps:
65
- - name: Download all the dists
66
- uses: actions/download-artifact@v4
67
- with:
68
- name: python-package-distributions
69
- path: dist/
70
- - name: Publish distribution to TestPyPI
71
- uses: pypa/gh-action-pypi-publish@release/v1
72
- with:
73
- repository-url: https://test.pypi.org/legacy/
74
- verbose: true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: psptool
3
- Version: 3.2.dev1
3
+ Version: 3.3
4
4
  Summary: PSPTool is a tool for dealing with AMD binary blobs
5
5
  Author-email: Christian Werling <cwerling@posteo.de>
6
6
  License-File: LICENSE
@@ -179,13 +179,6 @@ class Blob(NestedBuffer):
179
179
  found_pkes += self._find_inline_pubkeys(key_id)
180
180
  return found_pkes
181
181
 
182
- def get_entries_by_type(self, type_) -> List[File]:
183
- entries = []
184
-
185
- for rom in self.roms:
186
- for _dir in rom.directories:
187
- for entry in _dir.entries:
188
- if entry.type == type_:
189
- entries.append(entry)
190
-
191
- return entries
182
+ def get_files_by_type(self, type_) -> List[File]:
183
+ all_files = self.unique_files()
184
+ return list(filter(lambda f: f.type == type_, all_files))
@@ -132,7 +132,7 @@ class HeaderFile(File):
132
132
  return '.'.join([hex(b)[2:].upper() for b in self.version])
133
133
 
134
134
  def get_ikek_md5sum(self) -> bytes:
135
- ikek = self.parent_buffer.get_entries_by_type(0x21)[0]
135
+ ikek = self.parent_buffer.get_files_by_type(0x21)[0]
136
136
  m = md5()
137
137
  m.update(ikek.get_bytes())
138
138
  return m.digest()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes