Botan
3.7.1
Crypto and TLS for C&
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
Enumerator
c
d
f
i
m
n
r
s
t
Concepts
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
f
h
i
m
n
o
p
r
s
t
u
v
w
Enumerations
b
c
d
e
k
m
n
o
p
s
t
x
Enumerator
_
a
b
c
d
e
f
h
k
l
m
n
p
q
r
s
t
u
w
x
Related Symbols
b
c
d
e
f
k
o
p
s
t
x
Files
File List
File Members
All
_
a
b
c
d
e
f
i
k
m
n
o
p
q
s
t
u
w
x
y
z
Functions
b
c
Variables
Typedefs
b
c
e
p
t
Enumerations
Enumerator
b
c
d
e
k
n
Macros
_
a
b
c
f
m
n
q
s
t
w
src
lib
prov
tpm2
tpm2_crypto_backend
tpm2_crypto_backend.cpp
Go to the documentation of this file.
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
(
17
ESYS_CONTEXT* context,
const
std::shared_ptr<Botan::RandomNumberGenerator>& rng) {
18
auto
crypto_callback_state = std::make_unique<CryptoCallbackState>(
CryptoCallbackState
{.rng = rng});
19
set_crypto_callbacks
(context, crypto_callback_state.get());
20
return
crypto_callback_state;
21
}
16
std::unique_ptr<CryptoCallbackState>
use_botan_crypto_backend
( {
…
}
22
23
BOTAN_PUBLIC_API
(3, 7) bool
supports_botan_crypto_backend
() noexcept {
24
#if defined(BOTAN_TSS2_SUPPORTS_CRYPTO_CALLBACKS)
25
return
true
;
26
#else
27
return
false
;
28
#endif
29
}
23
BOTAN_PUBLIC_API
(3, 7) bool
supports_botan_crypto_backend
() noexcept {
…
}
30
31
}
// namespace Botan::TPM2
BOTAN_PUBLIC_API
#define BOTAN_PUBLIC_API(maj, min)
Definition
api.h:19
Botan::TPM2
Definition
tpm2_algo_mappings.h:24
Botan::TPM2::supports_botan_crypto_backend
bool supports_botan_crypto_backend() noexcept
Definition
tpm2_crypto_backend.cpp:23
Botan::TPM2::use_botan_crypto_backend
std::unique_ptr< CryptoCallbackState > use_botan_crypto_backend(ESYS_CONTEXT *context, const std::shared_ptr< Botan::RandomNumberGenerator > &rng)
Definition
tpm2_crypto_backend.cpp:16
Botan::TPM2::set_crypto_callbacks
void set_crypto_callbacks(ESYS_CONTEXT *ctx, void *callback_state)
Definition
tpm2_crypto_backend_impl.cpp:861
Botan::TPM2::CryptoCallbackState
Definition
tpm2_crypto_backend.h:28
Generated by
1.12.0