forked from keylime/keylime
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This ensures we verify the EK and AIK we get from the agent before trusting signatures by it. Advisory: GHSA-78f8-6c68-375m For details, see https://patrick.uiterwijk.org/blog/tpm2-attestation-keylime-vulnerability Signed-off-by: Patrick Uiterwijk <[email protected]> Signed-off-by: Michael Peters <[email protected]>
- Loading branch information
1 parent
6c9b0c5
commit 8e86e3d
Showing
11 changed files
with
215 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
keylime/migrations/versions/cc2630851a1f_receive_the_aik_tpm_from_the_agent.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
"""receive the aik_tpm from the agent | ||
Revision ID: cc2630851a1f | ||
Revises: a7a64155ab3a | ||
Create Date: 2021-02-08 18:06:26.520283 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'cc2630851a1f' | ||
down_revision = 'a7a64155ab3a' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(engine_name): | ||
globals()["upgrade_%s" % engine_name]() | ||
|
||
|
||
def downgrade(engine_name): | ||
globals()["downgrade_%s" % engine_name]() | ||
|
||
|
||
def upgrade_registrar(): | ||
with op.batch_alter_table('registrarmain') as batch_op: | ||
batch_op.drop_column('aik') | ||
batch_op.drop_column('ek') | ||
|
||
with op.batch_alter_table('registrarmain') as batch_op: | ||
batch_op.add_column(sa.Column('aik_tpm', sa.String(length=500), nullable=True)) | ||
batch_op.add_column(sa.Column('ek_tpm', sa.String(length=500), nullable=True)) | ||
|
||
|
||
def downgrade_registrar(): | ||
with op.batch_alter_table('registrarmain') as batch_op: | ||
batch_op.add_column(sa.Column('ek', sa.VARCHAR(length=500), nullable=True)) | ||
batch_op.add_column(sa.Column('aik', sa.VARCHAR(length=500), nullable=True)) | ||
|
||
with op.batch_alter_table('registrarmain') as batch_op: | ||
batch_op.drop_column('ek_tpm') | ||
batch_op.drop_column('aik_tpm') | ||
|
||
|
||
def upgrade_cloud_verifier(): | ||
pass | ||
|
||
|
||
def downgrade_cloud_verifier(): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.