Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::ForceMbedtlsUnsafeSetting Struct Reference

Public Types

using RETURN_TYPE = bool

Static Public Member Functions

static void SetGlobal (DatabaseInstance *db, DBConfig &config, const Value &parameter)
static void ResetGlobal (DatabaseInstance *db, DBConfig &config)
static Value GetSetting (const ClientContext &context)

Static Public Attributes

static constexpr const char * Name = "force_mbedtls_unsafe"
static constexpr const char * Description = "Enable mbedtls for encryption (WARNING: unsafe to use)"
static constexpr const char * InputType = "BOOLEAN"

Member Function Documentation

◆ SetGlobal()

void duckdb::ForceMbedtlsUnsafeSetting::SetGlobal ( DatabaseInstance * db,
DBConfig & config,
const Value & parameter )
static
302529 {
302530 config.options.force_mbedtls = input.GetValue<bool>();
302531
302532 if (!config.options.force_mbedtls) {
302533 // check if there are attached databases encrypted that are not read only
302534 bool encrypted_db_attached = false;
302535 for (auto &database : db->GetDatabaseManager().GetDatabases()) {
302536 if (database->HasStorageManager() && database->GetStorageManager().IsEncrypted() &&
302537 !database->IsReadOnly()) {
302538 encrypted_db_attached = true;
302539 break;
302540 };
302541 };
302542
302543 if (encrypted_db_attached) {
302544 // autoload httpfs if any attached db uses encryption
302545 if (!ExtensionHelper::TryAutoLoadExtension(*db, "httpfs")) {
302546 throw InvalidConfigurationException("Failed to autoload HTTPFS. Cannot disable MbedTLS, HTTPFS "
302547 "extension is required to write encrypted databases.");
302548 };
302549 }
302550 }
302551}
static DUCKDB_API bool TryAutoLoadExtension(DatabaseInstance &db, const string &extension_name) noexcept
Autoload an extension (depending on config, potentially a nop. Returns false on failure).
Definition duckdb.cpp:278501
db
bool force_mbedtls
Enable mbedtls explicitly (overrides OpenSSL if available).
Definition duckdb.hpp:40024
DBConfigOptions options
Database configuration options.
Definition duckdb.hpp:40090

◆ ResetGlobal()

void duckdb::ForceMbedtlsUnsafeSetting::ResetGlobal ( DatabaseInstance * db,
DBConfig & config )
static
302553 {
302554 // If encryption is initialized, httpfs will be attempted to autoload again
302555 SetGlobal(db, config, false);
302556}

◆ GetSetting()

Value duckdb::ForceMbedtlsUnsafeSetting::GetSetting ( const ClientContext & context)
static
302558 {
302559 auto &config = DBConfig::GetConfig(context);
302560 return Value::BOOLEAN(config.options.force_mbedtls);
302561}
static DUCKDB_API Value BOOLEAN(bool value)
Create a boolean Value from a specified value.
Definition duckdb.cpp:132118

The documentation for this struct was generated from the following file: