From 89fa7d055860cd196ad2157e9be5d0541812974d Mon Sep 17 00:00:00 2001 From: Markus Pilman Date: Tue, 20 Jul 2021 18:27:16 -0600 Subject: [PATCH 1/2] remove unnecessary compile guards --- fdbclient/BackupContainerAzureBlobStore.actor.cpp | 4 ---- fdbclient/BackupContainerFileSystem.actor.cpp | 8 -------- fdbclient/BackupContainerFileSystem.h | 2 -- fdbclient/BackupContainerLocalDirectory.actor.cpp | 2 -- 4 files changed, 16 deletions(-) diff --git a/fdbclient/BackupContainerAzureBlobStore.actor.cpp b/fdbclient/BackupContainerAzureBlobStore.actor.cpp index e2733bf7ce..6018c4d5cb 100644 --- a/fdbclient/BackupContainerAzureBlobStore.actor.cpp +++ b/fdbclient/BackupContainerAzureBlobStore.actor.cpp @@ -19,9 +19,7 @@ */ #include "fdbclient/BackupContainerAzureBlobStore.h" -#if (!defined(TLS_DISABLED) && !defined(_WIN32)) #include "fdbrpc/AsyncFileEncrypted.h" -#emdif #include "flow/actorcompiler.h" // This must be the last #include. @@ -250,9 +248,7 @@ BackupContainerAzureBlobStore::BackupContainerAzureBlobStore(const NetworkAddres const std::string& containerName, const Optional& encryptionKeyFileName) : containerName(containerName) { -#if (!defined(TLS_DISABLED) && !defined(_WIN32)) setEncryptionKey(encryptionKeyFileName); -#endif std::string accountKey = std::getenv("AZURE_KEY"); auto credential = std::make_shared(accountName, accountKey); auto storageAccount = std::make_shared( diff --git a/fdbclient/BackupContainerFileSystem.actor.cpp b/fdbclient/BackupContainerFileSystem.actor.cpp index 5417056fed..040c759956 100644 --- a/fdbclient/BackupContainerFileSystem.actor.cpp +++ b/fdbclient/BackupContainerFileSystem.actor.cpp @@ -23,9 +23,7 @@ #include "fdbclient/BackupContainerFileSystem.h" #include "fdbclient/BackupContainerLocalDirectory.h" #include "fdbclient/JsonBuilder.h" -#if (!defined(TLS_DISABLED) && !defined(_WIN32)) #include "flow/StreamCipher.h" -#endif #include "flow/UnitTest.h" #include @@ -1481,7 +1479,6 @@ Future BackupContainerFileSystem::encryptionSetupComplete() const { return encryptionSetupFuture; } -#if (!defined(TLS_DISABLED) && !defined(_WIN32)) void BackupContainerFileSystem::setEncryptionKey(Optional const& encryptionKeyFileName) { if (encryptionKeyFileName.present()) { #if ENCRYPTION_ENABLED @@ -1498,11 +1495,6 @@ Future BackupContainerFileSystem::createTestEncryptionKeyFile(std::string return Void(); #endif } -#else -Future BackupContainerFileSystem::createTestEncryptionKeyFile(std::string const& filename) { - return Void(); -} -#endif namespace backup_test { diff --git a/fdbclient/BackupContainerFileSystem.h b/fdbclient/BackupContainerFileSystem.h index 4b92b2f409..292fc67abb 100644 --- a/fdbclient/BackupContainerFileSystem.h +++ b/fdbclient/BackupContainerFileSystem.h @@ -156,9 +156,7 @@ public: protected: bool usesEncryption() const; -#if (!defined(TLS_DISABLED) && !defined(_WIN32)) void setEncryptionKey(Optional const& encryptionKeyFileName); -#endif Future encryptionSetupComplete() const; private: diff --git a/fdbclient/BackupContainerLocalDirectory.actor.cpp b/fdbclient/BackupContainerLocalDirectory.actor.cpp index fa0f351d5a..b89d085a64 100644 --- a/fdbclient/BackupContainerLocalDirectory.actor.cpp +++ b/fdbclient/BackupContainerLocalDirectory.actor.cpp @@ -133,9 +133,7 @@ std::string BackupContainerLocalDirectory::getURLFormat() { BackupContainerLocalDirectory::BackupContainerLocalDirectory(const std::string& url, const Optional& encryptionKeyFileName) { -#if (!defined(TLS_DISABLED) && !defined(_WIN32)) setEncryptionKey(encryptionKeyFileName); -#endif std::string path; if (url.find("file://") != 0) { From 63ebdc0cc0ca842922896b978ba6697730c2c16c Mon Sep 17 00:00:00 2001 From: Markus Pilman Date: Tue, 20 Jul 2021 18:30:43 -0600 Subject: [PATCH 2/2] added one missed change --- fdbclient/BackupContainerS3BlobStore.actor.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/fdbclient/BackupContainerS3BlobStore.actor.cpp b/fdbclient/BackupContainerS3BlobStore.actor.cpp index c48e66e597..b915701a3f 100644 --- a/fdbclient/BackupContainerS3BlobStore.actor.cpp +++ b/fdbclient/BackupContainerS3BlobStore.actor.cpp @@ -147,9 +147,7 @@ BackupContainerS3BlobStore::BackupContainerS3BlobStore(Reference& encryptionKeyFileName) : m_bstore(bstore), m_name(name), m_bucket("FDB_BACKUPS_V2") { -#if (!defined(TLS_DISABLED) && !defined(_WIN32)) setEncryptionKey(encryptionKeyFileName); -#endif // Currently only one parameter is supported, "bucket" for (const auto& [name, value] : params) { if (name == "bucket") {