-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restructure tpm2.h to avoid external includes in public headers
- Loading branch information
1 parent
ed26467
commit 2ab6008
Showing
5 changed files
with
76 additions
and
29 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* TPM 2 internal utilities | ||
* (C) 2024 Jack Lloyd | ||
* (C) 2024 René Meusel, Amos Treiber - Rohde & Schwarz Cybersecurity GmbH | ||
* | ||
* Botan is released under the Simplified BSD License (see license.txt) | ||
*/ | ||
|
||
#ifndef BOTAN_TPM2_UTIL_H_ | ||
#define BOTAN_TPM2_UTIL_H_ | ||
|
||
#include <botan/tpm2.h> | ||
|
||
#include <tss2/tss2_rc.h> | ||
|
||
namespace Botan { | ||
|
||
inline void check_tss2_rc(std::string_view location, TSS2_RC rc) { | ||
if(rc != TSS2_RC_SUCCESS) { | ||
throw TPM2_Error(location, rc); | ||
} | ||
} | ||
} // namespace Botan | ||
|
||
#endif |