Skip to content

pcks11: use bytes.decode on stderr#911

Merged
williamcroberts merged 1 commit intotpm2-software:masterfrom
philiptaron:stderr-decode
Dec 18, 2025
Merged

pcks11: use bytes.decode on stderr#911
williamcroberts merged 1 commit intotpm2-software:masterfrom
philiptaron:stderr-decode

Conversation

@philiptaron
Copy link
Contributor

Before:

RuntimeError: Could not execute tpm2_create: b'WARNING:esys:src/tss2-esys/api/Esys_Create.c:399:Esys_Create_Finish() Received TPM Error \nERROR:esys:src/tss2-esys/api/Esys_Create.c:134:Esys_Create() Esys Finish ErrorCode (0x0000098e) \nERROR: Esys_Create(0x98E) - tpm:session(1):the authorization HMAC check failed and DA counter incremented\nERROR: Unable to run /nix/store/n9b9hqgmw2f08f8kdcp41pfbs06p9b8v-tpm2-tools-5.7/bin/tpm2_create\n'

After:

RuntimeError: Could not execute tpm2_create: WARNING:esys:src/tss2-esys/api/Esys_Create.c:399:Esys_Create_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_Create.c:134:Esys_Create() Esys Finish ErrorCode (0x0000098e)
ERROR: Esys_Create(0x98E) - tpm:session(1):the authorization HMAC check failed and DA counter incremented
ERROR: Unable to run /nix/store/n9b9hqgmw2f08f8kdcp41pfbs06p9b8v-tpm2-tools-5.7/bin/tpm2_create

From what I can tell, these lines date before the Python 3 transition.

Before:

```
RuntimeError: Could not execute tpm2_create: b'WARNING:esys:src/tss2-esys/api/Esys_Create.c:399:Esys_Create_Finish() Received TPM Error \nERROR:esys:src/tss2-esys/api/Esys_Create.c:134:Esys_Create() Esys Finish ErrorCode (0x0000098e) \nERROR: Esys_Create(0x98E) - tpm:session(1):the authorization HMAC check failed and DA counter incremented\nERROR: Unable to run /nix/store/n9b9hqgmw2f08f8kdcp41pfbs06p9b8v-tpm2-tools-5.7/bin/tpm2_create\n'
```

After:

```
RuntimeError: Could not execute tpm2_create: WARNING:esys:src/tss2-esys/api/Esys_Create.c:399:Esys_Create_Finish() Received TPM Error
ERROR:esys:src/tss2-esys/api/Esys_Create.c:134:Esys_Create() Esys Finish ErrorCode (0x0000098e)
ERROR: Esys_Create(0x98E) - tpm:session(1):the authorization HMAC check failed and DA counter incremented
ERROR: Unable to run /nix/store/n9b9hqgmw2f08f8kdcp41pfbs06p9b8v-tpm2-tools-5.7/bin/tpm2_create
```

Signed-off-by: Philip Taron <philip.taron@gmail.com>
@philiptaron
Copy link
Contributor Author

@williamcroberts mind taking a look at this simple PR?

@williamcroberts williamcroberts merged commit 8a37809 into tpm2-software:master Dec 18, 2025
13 checks passed
@philiptaron philiptaron deleted the stderr-decode branch December 18, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants