• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

randombit / botan / 11776564459

11 Nov 2024 10:18AM UTC coverage: 91.064% (-0.009%) from 91.073%
11776564459

Pull #4430

github

web-flow
Merge 9fcff47a2 into d35b793df
Pull Request #4430: Feature: Support external ESYS_CONTEXT in TPM2

90556 of 99442 relevant lines covered (91.06%)

9434091.67 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.71
/src/lib/prov/tpm2/tpm2_crypto_backend/tpm2_crypto_backend.cpp
1
/*
2
* TPM 2 TSS crypto callbacks backend interface
3
* (C) 2024 Jack Lloyd
4
* (C) 2024 René Meusel, Amos Treiber - Rohde & Schwarz Cybersecurity GmbH, financed by LANCOM Systems GmbH
5
*
6
* Botan is released under the Simplified BSD License (see license.txt)
7
*/
8

9
#include <botan/tpm2_crypto_backend.h>
10

11
#include <botan/internal/tpm2_crypto_backend_impl.h>
12
#include <botan/internal/tpm2_util.h>
13

14
namespace Botan::TPM2 {
15

16
std::unique_ptr<CryptoCallbackState> use_botan_crypto_backend(
12✔
17
   ESYS_CONTEXT* context, const std::shared_ptr<Botan::RandomNumberGenerator>& rng) {
18
   auto crypto_callback_state = std::make_unique<CryptoCallbackState>(CryptoCallbackState{.rng = rng});
12✔
19
   set_crypto_callbacks(context, crypto_callback_state.get());
12✔
20
   return crypto_callback_state;
12✔
21
}
×
22

23
BOTAN_PUBLIC_API(3, 7) bool supports_botan_crypto_backend() noexcept {
13✔
24
#if defined(BOTAN_TSS2_SUPPORTS_CRYPTO_CALLBACKS)
25
   return true;
13✔
26
#else
27
   return false;
28
#endif
29
}
30

31
}  // namespace Botan::TPM2
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc