clean up some comments
Change-Id: Ib2d096457e9c27b78703196ca13e18ee6cedafef
diff --git a/src/detail/crypto-helpers.cpp b/src/detail/crypto-helpers.cpp
index 63a9877..46bca46 100644
--- a/src/detail/crypto-helpers.cpp
+++ b/src/detail/crypto-helpers.cpp
@@ -189,32 +189,11 @@
EVP_PKEY_free(evpPeerkey);
NDN_THROW(std::runtime_error("TBD"));
}
- // result = ECDH_compute_key(m_sharedSecret, sizeof(m_sharedSecret), peerPoint, privECKey, nullptr);
- // if (result == -1) {
- // EC_POINT_free(peerPoint);
- // EC_KEY_free(privECKey);
- // EVP_PKEY_free(m_privkey);
- // NDN_THROW(std::runtime_error("Cannot generate ECDH secret when calling ECDH_compute_key()"));
- // }
- // m_sharedSecretLen = static_cast<size_t>(result);
- // EC_POINT_free(peerPoint);
- // EC_KEY_free(privECKey);
- // return m_sharedSecret;
EVP_PKEY_CTX_free(ctx);
EVP_PKEY_free(evpPeerkey);
return m_secret;
}
-// uint8_t*
-// ECDHState::deriveSecret(const std::string& peerKeyStr)
-// {
-// namespace t = ndn::security::transform;
-// OBufferStream os;
-// t::bufferSource(peerKeyStr) >> t::base64Decode(false) >> t::streamSink(os);
-// auto result = os.buf();
-// return this->deriveSecret(result->data(), result->size());
-// }
-
void
hmacSha256(const uint8_t* data, size_t dataLen,
const uint8_t* key, size_t keyLen,
diff --git a/src/detail/crypto-helpers.hpp b/src/detail/crypto-helpers.hpp
index d3b0e18..3eee553 100644
--- a/src/detail/crypto-helpers.hpp
+++ b/src/detail/crypto-helpers.hpp
@@ -38,12 +38,6 @@
ECDHState();
~ECDHState();
- // std::string
- // getBase64PubKey();
-
- // uint8_t*
- // deriveSecret(const std::string& peerKeyStr);
-
const std::vector<uint8_t>&
deriveSecret(const uint8_t* peerkey, size_t peerKeySize);
diff --git a/tests/unit-tests/crypto-helper.t.cpp b/tests/unit-tests/crypto-helper.t.cpp
index 4bb2e22..63f7c11 100644
--- a/tests/unit-tests/crypto-helper.t.cpp
+++ b/tests/unit-tests/crypto-helper.t.cpp
@@ -53,25 +53,6 @@
BOOST_CHECK_THROW(aliceState.deriveSecret(fakePub, sizeof(fakePub)), std::runtime_error);
}
-// BOOST_AUTO_TEST_CASE(EcdhWithBase64Key)
-// {
-// ECDHState aliceState;
-// auto alicePub = aliceState.getBase64PubKey();
-// BOOST_CHECK(alicePub != "");
-
-// ECDHState bobState;
-// auto bobPub = bobState.getBase64PubKey();
-// BOOST_CHECK(bobPub != "");
-
-// auto aliceResult = aliceState.deriveSecret(bobPub);
-// BOOST_CHECK(aliceState.m_sharedSecretLen != 0);
-
-// auto bobResult = bobState.deriveSecret(alicePub);
-// BOOST_CHECK(bobState.m_sharedSecretLen != 0);
-
-// BOOST_CHECK_EQUAL_COLLECTIONS(aliceResult, aliceResult + 32, bobResult, bobResult + 32);
-// }
-
BOOST_AUTO_TEST_CASE(HmacSha256)
{
const uint8_t input[] = {0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,