diff options
author | Jack Lloyd <[email protected]> | 2016-03-09 08:28:08 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-03-09 08:28:08 -0500 |
commit | eb86549ab43744103c901d56e4f5ff4d0c6e9b64 (patch) | |
tree | 7289a4e22c6076d44ba13d77a86ef480993af697 /src/lib/prov/tpm/tpm.cpp | |
parent | 58c89ae470c68bf300ea937740c233e2b5715535 (diff) |
Trivial warning fixes
Diffstat (limited to 'src/lib/prov/tpm/tpm.cpp')
-rw-r--r-- | src/lib/prov/tpm/tpm.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/prov/tpm/tpm.cpp b/src/lib/prov/tpm/tpm.cpp index 9a29be395..c0b265b98 100644 --- a/src/lib/prov/tpm/tpm.cpp +++ b/src/lib/prov/tpm/tpm.cpp @@ -56,13 +56,14 @@ TSS_FLAG bit_flag(size_t bits) } } +#if 0 bool is_srk_uuid(const UUID& uuid) { static const byte srk[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }; const std::vector<uint8_t>& b = uuid.binary_value(); return (b.size() == 16 && same_mem(b.data(), srk, 16)); } - +#endif #define TSPI_CHECK_SUCCESS(expr) do { \ TSS_RESULT res = expr; \ @@ -90,10 +91,11 @@ void set_policy_secret(TSS_HPOLICY policy, const char* secret) { if(secret) { + BYTE* as_b = const_cast<BYTE*>(reinterpret_cast<const BYTE*>(secret)); TSPI_CHECK_SUCCESS(::Tspi_Policy_SetSecret(policy, - TSS_SECRET_MODE_PLAIN, - std::strlen(secret), - (BYTE*)secret)); + TSS_SECRET_MODE_PLAIN, + std::strlen(secret), + as_b)); } else { |