diff options
author | Luca Muscariello <muscariello@ieee.org> | 2022-04-22 17:55:01 +0200 |
---|---|---|
committer | Mauro Sardara <msardara@cisco.com> | 2022-04-26 15:30:21 +0200 |
commit | a1ac96f497719b897793ac14b287cb8d840651c1 (patch) | |
tree | 12c608fe352c21d944b0340ce8d3f0be0fb23b11 /libtransport/src/test | |
parent | 1ac07d842a3a6ce0fb7fa4039241c8ec1a71419b (diff) |
HICN-722: Updates on transport, RTC, manifest usage for RTC, infra.
Co-authored-by: Mauro Sardara <msardara@cisco.com>
Co-authored-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Co-authored-by: Michele Papalini <micpapal@cisco.com>
Co-authored-by: Angelo Mantellini <manangel@cisco.com>
Co-authored-by: Jacques Samain <jsamain@cisco.com>
Co-authored-by: Olivier Roques <oroques+fdio@cisco.com>
Co-authored-by: Enrico Loparco <eloparco@cisco.com>
Co-authored-by: Giulio Grassi <gigrassi@cisco.com>
manifest: optimize manifest processing
manifest: add FEC parameters to manifests
manifest: refactor verification process
manifest: report auth alerts in hiperf instead of aborting
manifest: remove FEC buffer callback in consumer
manifest: refactor and enable manifests by default
manifest: update manifest header with transport parameters
manifest: batch interests for first manifest from RTC producer
manifest: refactor processing of RTC manifests
manifest: update manifest-related socket options of consumers
manifest: update unit tests for manifests
manifest: pack manifest headers
manifest: verify FEC packets
auth: add consumer socket option to set max unverified delay
manifest: process manifests after full FEC decoding
manifest: manage forward jumps in RTC verifier
fec: remove useless fec codes
rs: add new code rate
rs: add new code rate
rs: add new code rate
rs: add new code rate
libtransport: increase internal packet cache size
remove internal cisco info in cmake
manifest: add option to set manifest capacity
data_input_node.c: add information about adj_index[VLIB_RX] on received data packetsi
sysrepo plugin: update build
Change-Id: I0cf64d91bd0a1b7cad4eeaa9871f58f5f10434af
Signed-off-by: Mauro Sardara <msardara@cisco.com>
Signed-off-by: Luca Muscariello <muscariello@ieee.org>
Diffstat (limited to 'libtransport/src/test')
-rw-r--r-- | libtransport/src/test/test_auth.cc | 24 | ||||
-rw-r--r-- | libtransport/src/test/test_core_manifest.cc | 2 |
2 files changed, 9 insertions, 17 deletions
diff --git a/libtransport/src/test/test_auth.cc b/libtransport/src/test/test_auth.cc index d7fd55433..0c47dd958 100644 --- a/libtransport/src/test/test_auth.cc +++ b/libtransport/src/test/test_auth.cc @@ -117,13 +117,11 @@ TEST_F(AuthTest, AsymmetricBufferRSA) { std::vector<uint8_t> buffer(payload.begin(), payload.end()); signer->signBuffer(buffer); - std::vector<uint8_t> sig = signer->getSignature(); + utils::MemBuf::Ptr sig = signer->getSignature(); std::shared_ptr<AsymmetricVerifier> verif = std::make_shared<AsymmetricVerifier>(pubKey); - bool res = verif->verifyBuffer( - buffer, std::vector<uint8_t>(sig.data(), sig.data() + sig.size()), - CryptoHashType::SHA256); + bool res = verif->verifyBuffer(buffer, sig, CryptoHashType::SHA256); EXPECT_EQ(res, true); } @@ -157,13 +155,11 @@ TEST_F(AuthTest, AsymmetricBufferDSA) { std::vector<uint8_t> buffer(payload.begin(), payload.end()); signer->signBuffer(buffer); - std::vector<uint8_t> sig = signer->getSignature(); + utils::MemBuf::Ptr sig = signer->getSignature(); std::shared_ptr<AsymmetricVerifier> verif = std::make_shared<AsymmetricVerifier>(pubKey); - bool res = verif->verifyBuffer( - buffer, std::vector<uint8_t>(sig.data(), sig.data() + sig.size()), - CryptoHashType::SHA256); + bool res = verif->verifyBuffer(buffer, sig, CryptoHashType::SHA256); EXPECT_EQ(res, true); } @@ -233,13 +229,11 @@ TEST_F(AuthTest, AsymmetricBufferECDSA) { std::vector<uint8_t> buffer(payload.begin(), payload.end()); signer->signBuffer(buffer); - std::vector<uint8_t> sig = signer->getSignature(); + utils::MemBuf::Ptr sig = signer->getSignature(); std::shared_ptr<AsymmetricVerifier> verif = std::make_shared<AsymmetricVerifier>(pubKey); - bool res = verif->verifyBuffer( - buffer, std::vector<uint8_t>(sig.data(), sig.data() + sig.size()), - CryptoHashType::SHA256); + bool res = verif->verifyBuffer(buffer, sig, CryptoHashType::SHA256); EXPECT_EQ(res, true); } // namespace auth @@ -290,11 +284,9 @@ TEST_F(AuthTest, HMACbuffer) { std::string payload = "bonjour"; std::vector<uint8_t> buffer(payload.begin(), payload.end()); signer->signBuffer(buffer); - std::vector<uint8_t> sig = signer->getSignature(); + utils::MemBuf::Ptr sig = signer->getSignature(); SymmetricVerifier hmac(PASSPHRASE); - bool res = hmac.verifyBuffer( - buffer, std::vector<uint8_t>(sig.data(), sig.data() + sig.size()), - CryptoHashType::SHA256); + bool res = hmac.verifyBuffer(buffer, sig, CryptoHashType::SHA256); EXPECT_EQ(res, true); } diff --git a/libtransport/src/test/test_core_manifest.cc b/libtransport/src/test/test_core_manifest.cc index 23fd5e342..b998ce96b 100644 --- a/libtransport/src/test/test_core_manifest.cc +++ b/libtransport/src/test/test_core_manifest.cc @@ -173,7 +173,7 @@ TEST_F(ManifestTest, SetParamsRTC) { .timestamp = 1, .prod_rate = 2, .prod_seg = 3, - .support_fec = 1, + .fec_type = protocol::fec::FECType::UNKNOWN, }; manifest1_.setParamsRTC(params); |