vfs/tresor_trust_anchor: remove debug mode

The debug mode turned out to be unnecessry because the plugin can be simply
replaced with an <inline> file VFS plugin that has a content size of 32 bytes.

Ref #4819
This commit is contained in:
Martin Stein 2023-06-06 12:38:24 +02:00 committed by Norman Feske
parent 03d7258d33
commit 5800ab4961

View File

@ -30,7 +30,6 @@
enum { PRIVATE_KEY_SIZE = 32 };
enum { PASSPHRASE_HASH_SIZE = 32 };
enum { VERBOSE = 0 };
enum { DEBUG_MODE_STATIC_KEYS_OF_VALUE_0 = 0 };
namespace Vfs_tresor_trust_anchor {
@ -226,16 +225,10 @@ class Trust_anchor
class Bad_jitterentropy_io_buffer_size { };
throw Bad_jitterentropy_io_buffer_size { };
}
if (DEBUG_MODE_STATIC_KEYS_OF_VALUE_0) {
Genode::warning("DEBUG MODE active! "
"Using static keys of value 0!");
Genode::memset(key.value, 0,
_jitterentropy_io_job_buffer.size);
} else {
Genode::memcpy(key.value,
_jitterentropy_io_job_buffer.base,
_jitterentropy_io_job_buffer.size);
}
Genode::memcpy(key.value,
_jitterentropy_io_job_buffer.base,
_jitterentropy_io_job_buffer.size);
_job_state = Job_state::COMPLETE;
_job_success = true;
progress = true;
@ -342,18 +335,11 @@ class Trust_anchor
class Bad_private_key_io_buffer_size { };
throw Bad_private_key_io_buffer_size { };
}
if (DEBUG_MODE_STATIC_KEYS_OF_VALUE_0) {
Genode::warning("DEBUG MODE active! "
"Using static keys of value 0!");
Genode::memset(
_private_key.value, 0,
_private_key_io_job_buffer.size);
} else {
Genode::memcpy(
_private_key.value,
_private_key_io_job_buffer.base,
_private_key_io_job_buffer.size);
}
Genode::memcpy(
_private_key.value,
_private_key_io_job_buffer.base,
_private_key_io_job_buffer.size);
_key_io_job_buffer.size = Aes_256_key_wrap::CIPHERTEXT_SIZE;
Aes_256_key_wrap::wrap_key(
(unsigned char *)_key_io_job_buffer.base,