Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec: fix TPM_PT hex values #26

Merged
merged 2 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ on: [push]
jobs:
pytest:
runs-on: ubuntu-latest
container: ubuntu:24.04
steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt install -y libpcap-dev libtss2-dev
run: apt update && apt install -y libpcap-dev libtss2-dev gcc

- uses: actions/setup-python@v5
with:
Expand All @@ -35,13 +36,15 @@ jobs:

bats:
runs-on: ubuntu-latest
container: ubuntu:24.04
steps:
- run: apt update && apt install -y git
- uses: actions/checkout@v3
with:
submodules: 'true'

- name: Install dependencies
run: sudo apt install -y libpcap-dev bats
run: apt update && apt install -y libpcap-dev libtss2-dev gcc bats xxd

- uses: actions/setup-python@v5
with:
Expand All @@ -66,11 +69,12 @@ jobs:

linters:
runs-on: ubuntu-latest
container: ubuntu:24.04
steps:
- uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt install -y libpcap-dev
run: apt update && apt install -y libpcap-dev libtss2-dev gcc

- uses: actions/setup-python@v5
with:
Expand Down
96 changes: 49 additions & 47 deletions src/tpmstream/spec/structures/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,42 +345,44 @@ class TPM_PT(UINT32):
VENDOR_STRING_2 = 0x00000107
VENDOR_STRING_3 = 0x00000108
VENDOR_STRING_4 = 0x00000109
VENDOR_TPM_TYPE = 0x00000110
FIRMWARE_VERSION_1 = 0x00000111
FIRMWARE_VERSION_2 = 0x00000112
INPUT_BUFFER = 0x00000113
HR_TRANSIENT_MIN = 0x00000114
HR_PERSISTENT_MIN = 0x00000115
HR_LOADED_MIN = 0x00000116
ACTIVE_SESSIONS_MAX = 0x00000117
PCR_COUNT = 0x00000118
PCR_SELECT_MIN = 0x00000119
CONTEXT_GAP_MAX = 0x00000120
NV_COUNTERS_MAX = 0x00000122
NV_INDEX_MAX = 0x00000123
MEMORY = 0x00000124
CLOCK_UPDATE = 0x00000125
CONTEXT_HASH = 0x00000126
CONTEXT_SYM = 0x00000127
CONTEXT_SYM_SIZE = 0x00000128
ORDERLY_COUNT = 0x00000129
MAX_COMMAND_SIZE = 0x00000130
MAX_RESPONSE_SIZE = 0x00000131
MAX_DIGEST = 0x00000132
MAX_OBJECT_CONTEXT = 0x00000133
MAX_SESSION_CONTEXT = 0x00000134
PS_FAMILY_INDICATOR = 0x00000135
PS_LEVEL = 0x00000136
PS_REVISION = 0x00000137
PS_DAY_OF_YEAR = 0x00000138
PS_YEAR = 0x00000139
SPLIT_MAX = 0x00000140
TOTAL_COMMANDS = 0x00000141
LIBRARY_COMMANDS = 0x00000142
VENDOR_COMMANDS = 0x00000143
NV_BUFFER_MAX = 0x00000144
MODES = 0x00000145
MAX_CAP_BUFFER = 0x00000146
VENDOR_TPM_TYPE = 0x0000010A
FIRMWARE_VERSION_1 = 0x0000010B
FIRMWARE_VERSION_2 = 0x0000010C
INPUT_BUFFER = 0x0000010D
HR_TRANSIENT_MIN = 0x0000010E
HR_PERSISTENT_MIN = 0x0000010F
HR_LOADED_MIN = 0x00000110
ACTIVE_SESSIONS_MAX = 0x00000111
PCR_COUNT = 0x00000112
PCR_SELECT_MIN = 0x00000113
CONTEXT_GAP_MAX = 0x00000114
# gap
NV_COUNTERS_MAX = 0x00000116
NV_INDEX_MAX = 0x00000117
MEMORY = 0x00000118
CLOCK_UPDATE = 0x00000119
CONTEXT_HASH = 0x0000011A
CONTEXT_SYM = 0x0000011B
CONTEXT_SYM_SIZE = 0x0000011C
ORDERLY_COUNT = 0x0000011D
MAX_COMMAND_SIZE = 0x0000011E
MAX_RESPONSE_SIZE = 0x0000011F
MAX_DIGEST = 0x00000120
MAX_OBJECT_CONTEXT = 0x00000121
MAX_SESSION_CONTEXT = 0x00000122
PS_FAMILY_INDICATOR = 0x00000123
PS_LEVEL = 0x00000124
PS_REVISION = 0x00000125
PS_DAY_OF_YEAR = 0x00000126
PS_YEAR = 0x00000127
SPLIT_MAX = 0x00000128
TOTAL_COMMANDS = 0x00000129
LIBRARY_COMMANDS = 0x0000012A
VENDOR_COMMANDS = 0x0000012B
NV_BUFFER_MAX = 0x0000012C
MODES = 0x0000012D
MAX_CAP_BUFFER = 0x0000012E
# gap
PERMANENT = 0x00000200
STARTUP_CLEAR = 0x00000201
HR_NV_INDEX = 0x00000202
Expand All @@ -391,17 +393,17 @@ class TPM_PT(UINT32):
HR_TRANSIENT_AVAIL = 0x00000207
HR_PERSISTENT = 0x00000208
HR_PERSISTENT_AVAIL = 0x00000209
NV_COUNTERS = 0x00000210
NV_COUNTERS_AVAIL = 0x00000211
ALGORITHM_SET = 0x00000212
LOADED_CURVES = 0x00000213
LOCKOUT_COUNTER = 0x00000214
MAX_AUTH_FAIL = 0x00000215
LOCKOUT_INTERVAL = 0x00000216
LOCKOUT_RECOVERY = 0x00000217
NV_WRITE_RECOVERY = 0x00000218
AUDIT_COUNTER_0 = 0x00000219
AUDIT_COUNTER_1 = 0x00000220
NV_COUNTERS = 0x0000020A
NV_COUNTERS_AVAIL = 0x0000020B
ALGORITHM_SET = 0x0000020C
LOADED_CURVES = 0x0000020D
LOCKOUT_COUNTER = 0x0000020E
MAX_AUTH_FAIL = 0x0000020F
LOCKOUT_INTERVAL = 0x00000210
LOCKOUT_RECOVERY = 0x00000211
NV_WRITE_RECOVERY = 0x00000212
AUDIT_COUNTER_0 = 0x00000213
AUDIT_COUNTER_1 = 0x00000214


@tpm_enum
Expand Down
Loading