aboutsummaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2024-01-15 12:55:31 +0100
committerTheCharlatan <seb.kung@gmail.com>2024-05-09 15:56:08 +0200
commit41eba5bd716bea47c8731d156d053afee92a7f12 (patch)
tree23a01431d9155d7c82ede876e20cd579f0fd8286 /src/kernel
parenta08d2b3cb971c68e9a50b991b2953fa4541cf48a (diff)
downloadbitcoin-41eba5bd716bea47c8731d156d053afee92a7f12.tar.xz
kernel: Remove key module from kernel library
The key module's functionality is not used by the kernel library, but currently kernel users are still required to initialize the key module's `secp256k1_context_sign` global as part of the `kernel::Context` through `ECC_Start`.
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/checks.cpp6
-rw-r--r--src/kernel/context.cpp7
-rw-r--r--src/kernel/context.h5
3 files changed, 1 insertions, 17 deletions
diff --git a/src/kernel/checks.cpp b/src/kernel/checks.cpp
index 45a5e25093..e4a13ee4cc 100644
--- a/src/kernel/checks.cpp
+++ b/src/kernel/checks.cpp
@@ -4,8 +4,8 @@
#include <kernel/checks.h>
-#include <key.h>
#include <random.h>
+#include <util/result.h>
#include <util/translation.h>
#include <memory>
@@ -14,10 +14,6 @@ namespace kernel {
util::Result<void> SanityChecks(const Context&)
{
- if (!ECC_InitSanityCheck()) {
- return util::Error{Untranslated("Elliptic curve cryptography sanity check failure. Aborting.")};
- }
-
if (!Random_SanityCheck()) {
return util::Error{Untranslated("OS cryptographic RNG sanity check failure. Aborting.")};
}
diff --git a/src/kernel/context.cpp b/src/kernel/context.cpp
index c60f1638d1..bfb17915fd 100644
--- a/src/kernel/context.cpp
+++ b/src/kernel/context.cpp
@@ -5,9 +5,7 @@
#include <kernel/context.h>
#include <crypto/sha256.h>
-#include <key.h>
#include <logging.h>
-#include <pubkey.h>
#include <random.h>
#include <string>
@@ -19,12 +17,7 @@ Context::Context()
std::string sha256_algo = SHA256AutoDetect();
LogPrintf("Using the '%s' SHA256 implementation\n", sha256_algo);
RandomInit();
- ECC_Start();
}
-Context::~Context()
-{
- ECC_Stop();
-}
} // namespace kernel
diff --git a/src/kernel/context.h b/src/kernel/context.h
index ff4df20473..159af12689 100644
--- a/src/kernel/context.h
+++ b/src/kernel/context.h
@@ -5,10 +5,6 @@
#ifndef BITCOIN_KERNEL_CONTEXT_H
#define BITCOIN_KERNEL_CONTEXT_H
-#include <util/signalinterrupt.h>
-
-#include <memory>
-
namespace kernel {
//! Context struct holding the kernel library's logically global state, and
//! passed to external libbitcoin_kernel functions which need access to this
@@ -19,7 +15,6 @@ namespace kernel {
//! should be stored to std::unique_ptr members pointing to opaque types.
struct Context {
Context();
- ~Context();
};
} // namespace kernel