aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/includes
diff options
context:
space:
mode:
authorOlivier Roques <oroques+fdio@cisco.com>2020-03-20 12:12:28 +0100
committerOlivier Roques <oroques+fdio@cisco.com>2020-03-24 10:59:07 +0100
commit4b36dc3d5dd3ec206aa24d49557c61ae5886be2b (patch)
tree530c0d1d18b5a9352b6df4bad9b13384692ee861 /libtransport/includes
parent5691f9fb1a768fab068f02e9138109292099c3a0 (diff)
[HICN-580] Improve memory usage in signer and verifier
This patch reduces the amount of memory used by the signer and verifier classes. It also removes some logs from VPP collectd plugins. Change-Id: I3dac7b9104b5586ac22dee60f506bee51ece2cbe Signed-off-by: Olivier Roques <oroques+fdio@cisco.com>
Diffstat (limited to 'libtransport/includes')
-rw-r--r--libtransport/includes/hicn/transport/security/signer.h7
-rw-r--r--libtransport/includes/hicn/transport/security/verifier.h11
2 files changed, 2 insertions, 16 deletions
diff --git a/libtransport/includes/hicn/transport/security/signer.h b/libtransport/includes/hicn/transport/security/signer.h
index 31b21462b..45bcdb516 100644
--- a/libtransport/includes/hicn/transport/security/signer.h
+++ b/libtransport/includes/hicn/transport/security/signer.h
@@ -76,15 +76,10 @@ class Signer {
PARCKeyStore *getKeyStore();
private:
- PARCBufferComposer *composer_ = nullptr;
- PARCBuffer *key_buffer_ = nullptr;
- PARCSymmetricKeyStore *symmetricKeyStore_ = nullptr;
+ CryptoSuite suite_;
PARCSigner *signer_ = nullptr;
- PARCSignature *signature_ = nullptr;
PARCKeyId *key_id_ = nullptr;
- CryptoSuite suite_;
size_t signature_length_;
- static uint8_t zeros[200];
};
} // namespace utils
diff --git a/libtransport/includes/hicn/transport/security/verifier.h b/libtransport/includes/hicn/transport/security/verifier.h
index 7ec6e7eda..838868427 100644
--- a/libtransport/includes/hicn/transport/security/verifier.h
+++ b/libtransport/includes/hicn/transport/security/verifier.h
@@ -84,20 +84,11 @@ class Verifier {
*/
int verify(const Packet &packet);
- CryptoHash getPacketHash(const Packet &packet,
- std::shared_ptr<CryptoHasher> hasher);
+ CryptoHash getPacketHash(const Packet &packet, CryptoHasher &hasher);
private:
PARCVerifier *verifier_ = nullptr;
- PARCCertificateFactory *factory_ = nullptr;
- PARCCertificate *certificate_ = nullptr;
- PARCKeyId *keyId_ = nullptr;
- PARCKey *key_ = nullptr;
- PARCBuffer *key_buffer_ = nullptr;
- PARCSymmetricKeyStore *symmetricKeyStore_ = nullptr;
PARCSigner *signer_ = nullptr;
- PARCBufferComposer *composer_ = nullptr;
- static uint8_t zeros[200];
};
} // namespace utils