Skip to content

Commit

Permalink
Compilation error due to conflict resolution resolved.
Browse files Browse the repository at this point in the history
  • Loading branch information
Pankaj committed Jun 10, 2022
1 parent 5294fc6 commit 4a21a2e
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test_clang_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
-DUSE_OPENTRACING=ON \
-DOMIT_TEST_OUTPUT=OFF\
-DKEEP_APOLLO_LOGS=TRUE\
-DUSE_CRYPTOPP_HASH=TRUE\
-DUSE_CRYPTOPP_SHA_256=FALSE\
-DUSE_OPENSSL_SHA_256=FALSE\
-DUSE_OPENSSL_SHA3_256=FALSE\
-DUSE_OPENSSL_SHA3_256=TRUE\
-DUSE_FAKE_CLOCK_IN_TIME_SERVICE=TRUE\" "\
&& script -q -e -c "make test"
- name: Prepare artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test_clang_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ jobs:
-DUSE_OPENTRACING=ON \
-DOMIT_TEST_OUTPUT=OFF\
-DKEEP_APOLLO_LOGS=TRUE\
-DUSE_CRYPTOPP_HASH=TRUE\
-DUSE_CRYPTOPP_SHA_256=FALSE\
-DUSE_OPENSSL_SHA_256=FALSE\
-DUSE_OPENSSL_SHA3_256=FALSE\
-DUSE_OPENSSL_SHA3_256=TRUE\
-DUSE_FAKE_CLOCK_IN_TIME_SERVICE=TRUE\" "\
&& script -q -e -c "make test"
- name: Prepare artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test_gcc_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
-DOMIT_TEST_OUTPUT=OFF\
-DKEEP_APOLLO_LOGS=TRUE\
-DRUN_APOLLO_TESTS=FALSE\
-DUSE_CRYPTOPP_HASH=TRUE\
-DUSE_CRYPTOPP_SHA_256=FALSE\
-DUSE_OPENSSL_SHA_256=FALSE\
-DUSE_OPENSSL_SHA3_256=FALSE\
-DUSE_OPENSSL_SHA3_256=TRUE\
-DUSE_FAKE_CLOCK_IN_TIME_SERVICE=TRUE\" "\
&& script -q -e -c "make test"
- name: Prepare artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test_gcc_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
-DOMIT_TEST_OUTPUT=OFF\
-DKEEP_APOLLO_LOGS=TRUE\
-DRUN_APOLLO_TESTS=FALSE\
-DUSE_CRYPTOPP_HASH=TRUE\
-DUSE_CRYPTOPP_SHA_256=FALSE\
-DUSE_OPENSSL_SHA_256=FALSE\
-DUSE_OPENSSL_SHA3_256=FALSE\
-DUSE_OPENSSL_SHA3_256=TRUE\
-DUSE_FAKE_CLOCK_IN_TIME_SERVICE=TRUE\" "\
&& script -q -e -c "make test"
- name: Prepare artifacts
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:
-DUSE_S3_OBJECT_STORE=TRUE \
-DUSE_OPENTRACING=ON \
-DOMIT_TEST_OUTPUT=OFF\
-DUSE_CRYPTOPP_HASH=TRUE\
-DUSE_CRYPTOPP_SHA_256=FALSE\
-DUSE_OPENSSL_SHA_256=FALSE\
-DUSE_OPENSSL_SHA3_256=FALSE\
-DUSE_OPENSSL_SHA3_256=TRUE\
-DUSE_FAKE_CLOCK_IN_TIME_SERVICE=TRUE\" "\
- name: Print failure info
if: failure()
Expand Down
13 changes: 0 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,6 @@ if(CODECOVERAGE)
message( "-- Building with llvm Code Coverage Tools")
endif()

if(USE_CRYPTOPP_HASH)
message("-- USE_CRYPTOPP_HASH Enabled")
string(APPEND CMAKE_CXX_FLAGS " -DUSE_CRYPTOPP_HASH")
elseif(USE_OPENSSL_SHA_256)
message("-- USE_OPENSSL_SHA_256 Enabled")
string(APPEND CMAKE_CXX_FLAGS " -DUSE_OPENSSL_SHA_256")
elseif(USE_OPENSSL_SHA3_256)
message("-- USE_OPENSSL_SHA3_256 Enabled")
string(APPEND CMAKE_CXX_FLAGS " -DUSE_OPENSSL_SHA3_256")
else()
message(FATAL_ERROR "None of the cryptographic hashing libraries are enabled.")
endif()

if(USE_S3_OBJECT_STORE)
add_compile_definitions(USE_S3_OBJECT_STORE=1)
endif()
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ CONCORD_BFT_CMAKE_TSAN?=FALSE
CONCORD_BFT_CMAKE_CODECOVERAGE?=FALSE
CONCORD_BFT_CMAKE_USE_FAKE_CLOCK_IN_TIME_SERVICE?=FALSE
ENABLE_RESTART_RECOVERY_TESTS?=FALSE
CONCORD_BFT_CMAKE_USE_CRYPTOPP_HASH?=TRUE
CONCORD_BFT_CMAKE_USE_CRYPTOPP_SHA_256?=FALSE
CONCORD_BFT_CMAKE_USE_OPENSSL_SHA_256?=FALSE
CONCORD_BFT_CMAKE_USE_OPENSSL_SHA3_256?=FALSE
CONCORD_BFT_CMAKE_USE_OPENSSL_SHA3_256?=TRUE

ifeq (${CONCORD_BFT_CMAKE_ASAN},TRUE)
CONCORD_BFT_CMAKE_CXX_FLAGS_RELEASE='-O0 -g'
Expand Down Expand Up @@ -97,7 +97,7 @@ CONCORD_BFT_CMAKE_FLAGS?= \
-DENABLE_RESTART_RECOVERY_TESTS=${ENABLE_RESTART_RECOVERY_TESTS}
-DUSE_OPENSSL_SHA_256=${CONCORD_BFT_CMAKE_USE_OPENSSL_SHA_256} \
-DUSE_OPENSSL_SHA3_256=${CONCORD_BFT_CMAKE_USE_OPENSSL_SHA3_256} \
-DUSE_CRYPTOPP_HASH=${CONCORD_BFT_CMAKE_USE_CRYPTOPP_HASH}
-DUSE_CRYPTOPP_SHA_256=${CONCORD_BFT_CMAKE_USE_CRYPTOPP_SHA_256}

# The consistency parameter makes sense only at MacOS.
# It is ignored at all other platforms.
Expand Down
2 changes: 1 addition & 1 deletion bftengine/src/bftengine/KeyExchangeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void KeyExchangeManager::exchangeTlsKeys(const std::string& type, const SeqNum&
bftEngine::ReplicaConfig::instance().certificatesRootPath + "/" + std::to_string(repID_);
std::string root_path = (use_unified_certs) ? base_path : base_path + "/" + type;
std::string cert_path = (use_unified_certs) ? root_path + "/node.cert" : root_path + "/" + type + ".cert";
std::string prev_key_pem = concord::util::crypto::Crypto::instance()
std::string prev_key_pem = concord::util::cryptopp_utils::Crypto::instance()
.RsaHexToPem(std::make_pair(SigManager::instance()->getSelfPrivKey(), ""))
.first;
auto cert =
Expand Down
3 changes: 2 additions & 1 deletion client/reconfiguration/src/default_handlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
#include "client/reconfiguration/default_handlers.hpp"
#include "bftclient/StateControl.hpp"
#include "concord.cmf.hpp"
#include "crypto_utils.hpp"
#include "cryptopp_utils.hpp"
#include "openssl_utils.hpp"
#include "ReplicaConfig.hpp"

#include <variant>
Expand Down
2 changes: 1 addition & 1 deletion communication/src/AsyncTlsConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ std::pair<bool, NodeNum> AsyncTlsConnection::checkCertificate(X509* received_cer
uint32_t peerId = UINT32_MAX;
std::string conn_type;
// (1) First, try to verify the certificate against the latest saved certificate
bool res = concord::util::crypto::CertificateUtils::verifyCertificate(
bool res = concord::util::openssl_utils::CertificateUtils::verifyCertificate(
received_cert, config_.certificatesRootPath_, peerId, conn_type, config_.useUnifiedCertificates_);
if (expected_peer_id.has_value() && peerId != expected_peer_id.value()) return std::make_pair(false, peerId);
if (res) return std::make_pair(res, peerId);
Expand Down

0 comments on commit 4a21a2e

Please sign in to comment.