From 6b1a34af5b57a809d6998048cb53988f579e0d4c Mon Sep 17 00:00:00 2001 From: Pankaj Date: Thu, 16 Jun 2022 17:04:31 +0530 Subject: [PATCH] Apollo test case: skvbc_s3_integrity_check_tests --- kvbc/tools/object_store_utility/integrity_checker.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kvbc/tools/object_store_utility/integrity_checker.cpp b/kvbc/tools/object_store_utility/integrity_checker.cpp index f081ea815e..dbfc73057b 100644 --- a/kvbc/tools/object_store_utility/integrity_checker.cpp +++ b/kvbc/tools/object_store_utility/integrity_checker.cpp @@ -37,13 +37,18 @@ void IntegrityChecker::initKeysConfig(const fs::path& keys_file) { config.fVal = parser.get_value("f_val"); config.cVal = parser.get_value("c_val"); config.publicKeysOfReplicas.clear(); - auto rsaPublicKeys = parser.get_values("rsa_public_keys"); - if (rsaPublicKeys.size() < config.numReplicas) +#ifdef USE_CRYPTOPP + auto txnSignerPublicKeys = parser.get_values("rsa_public_keys"); +#elif USE_EDDSA_OPENSSL + auto txnSignerPublicKeys = parser.get_values("eddsa_public_keys"); +#endif + + if (txnSignerPublicKeys.size() < config.numReplicas) throw std::runtime_error("number of replicas and number of replicas don't match: " + keys_file.string()); for (size_t i = 0; i < config.numReplicas; ++i) - config.publicKeysOfReplicas.insert(std::pair(i, rsaPublicKeys[i])); + config.publicKeysOfReplicas.insert(std::pair(i, txnSignerPublicKeys[i])); config.replicaId = config.numReplicas; // "my" replica id shouldn't match one of the regular replicas