aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt4
-rw-r--r--libtransport/src/hicn/transport/utils/signer.cc2
-rw-r--r--libtransport/src/hicn/transport/utils/verifier.cc6
3 files changed, 8 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 973946c6f..ff8c87002 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,7 +82,9 @@ endif()
set(LIBHICN_SHARED ${LIBHICN}.shared)
set(LIBTRANSPORT_SHARED ${LIBTRANSPORT}.shared)
-add_compile_options(-Wall -Werror)
+if (NOT WIN32)
+ add_compile_options(-Wall -Werror)
+endif ()
message(STATUS "Building the following subprojects: ${subdirs}")
diff --git a/libtransport/src/hicn/transport/utils/signer.cc b/libtransport/src/hicn/transport/utils/signer.cc
index 7ebbc4636..e1262ec94 100644
--- a/libtransport/src/hicn/transport/utils/signer.cc
+++ b/libtransport/src/hicn/transport/utils/signer.cc
@@ -130,7 +130,7 @@ void Signer::sign(Packet &packet) {
utils::CryptoHash hash = hasher.finalize();
PARCSignature *signature = parcSigner_SignDigestNoAlloc(
- this->signer_, hash.hash_, packet.getSignature(), sign_len_bytes);
+ this->signer_, hash.hash_, packet.getSignature(), (uint32_t)sign_len_bytes);
PARCBuffer *buffer = parcSignature_GetSignature(signature);
size_t bytes_len = parcBuffer_Remaining(buffer);
diff --git a/libtransport/src/hicn/transport/utils/verifier.cc b/libtransport/src/hicn/transport/utils/verifier.cc
index aec80cff6..4295aaab7 100644
--- a/libtransport/src/hicn/transport/utils/verifier.cc
+++ b/libtransport/src/hicn/transport/utils/verifier.cc
@@ -128,9 +128,9 @@ int Verifier::verify(const Packet &packet) {
PARCKeyId *key_id = parcKeyId_Create(buffer);
parcBuffer_Release(&buffer);
- int ah_payload_len = packet.getSignatureSize();
+ int ah_payload_len = (int)packet.getSignatureSize();
uint8_t *_signature = packet.getSignature();
- uint8_t signature[ah_payload_len];
+ uint8_t * signature = new uint8_t[ah_payload_len];
// TODO Remove signature copy at this point, by not setting to zero
// the validation payload.
@@ -191,6 +191,8 @@ int Verifier::verify(const Packet &packet) {
memcpy(hicn_packet, &header_copy, HICN_V6_TCP_HDRLEN);
}
+ delete[] signature;
+
parcKeyId_Release(&key_id);
parcBuffer_Release(&bits);