summaryrefslogtreecommitdiffstats
path: root/libtransport/src/security/signer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libtransport/src/security/signer.cc')
-rw-r--r--libtransport/src/security/signer.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/libtransport/src/security/signer.cc b/libtransport/src/security/signer.cc
index 314c3ea82..8a56cfa3d 100644
--- a/libtransport/src/security/signer.cc
+++ b/libtransport/src/security/signer.cc
@@ -162,12 +162,10 @@ void Signer::sign(Packet &packet) {
}
CryptoHash hash = hasher.finalize();
-
signature_ = parcSigner_SignDigestNoAlloc(this->signer_, hash.hash_,
packet.getSignature(),
(uint32_t)signature_length_);
PARCBuffer *buffer = parcSignature_GetSignature(signature_);
-
size_t bytes_len = parcBuffer_Remaining(buffer);
if (bytes_len > signature_length_) {
@@ -176,6 +174,8 @@ void Signer::sign(Packet &packet) {
hicn_packet_copy_header(format, &header_copy,
(hicn_header_t *)packet.packet_start_, false);
+
+ parcSignature_Release(&signature_);
}
size_t Signer::getSignatureLength() { return signature_length_; }