aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/.clang-format14
-rw-r--r--apps/CMakeLists.txt8
-rw-r--r--apps/higet/higet.cc12
-rw-r--r--apps/http-proxy/src/forwarder_interface.cc3
-rw-r--r--apps/http-proxy/src/http_proxy.cc1
-rw-r--r--apps/http-proxy/src/icn_receiver.cc2
6 files changed, 28 insertions, 12 deletions
diff --git a/apps/.clang-format b/apps/.clang-format
new file mode 100644
index 000000000..cd21e2017
--- /dev/null
+++ b/apps/.clang-format
@@ -0,0 +1,14 @@
+# Copyright (c) 2017-2021 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+BasedOnStyle: Google
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt
index 5737a1d09..9b9011800 100644
--- a/apps/CMakeLists.txt
+++ b/apps/CMakeLists.txt
@@ -49,15 +49,11 @@ else()
)
endif()
-set(SUFFIX "")
-if (${LIBTRANSPORT_LIBRARIES} MATCHES ".*-memif.*")
- set(DEPENDENCIES ${LIBMEMIF_SHARED})
- set(SUFFIX "-memif")
+# Worksroung for unresolved symbols in vpp libraries
+if(${CMAKE_SYSTEM_NAME} MATCHES Linux)
set(LINK_FLAGS "-Wl,-unresolved-symbols=ignore-in-shared-libs")
endif()
-set(HICN_APPS "${HICN_APPS}${SUFFIX}")
-
list(APPEND LIBRARIES
${LIBTRANSPORT_LIBRARIES}
${LIBHICNCTRL_LIBRARIES}
diff --git a/apps/higet/higet.cc b/apps/higet/higet.cc
index 7584148a9..194e616ed 100644
--- a/apps/higet/higet.cc
+++ b/apps/higet/higet.cc
@@ -14,10 +14,11 @@
*/
#include <hicn/transport/http/client_connection.h>
-#include <fstream>
-#include <map>
+
#include <algorithm>
+#include <fstream>
#include <functional>
+#include <map>
#define ASIO_STANDALONE
#include <asio.hpp>
@@ -334,9 +335,14 @@ int main(int argc, char **argv) {
{"Connection", "Keep-Alive"},
{"Range", range}};
}
+
transport::http::HTTPClientConnection connection;
+
if (!conf.producer_certificate.empty()) {
- connection.setCertificate(conf.producer_certificate);
+ std::shared_ptr<transport::auth::Verifier> verifier =
+ std::make_shared<transport::auth::AsymmetricVerifier>(
+ conf.producer_certificate);
+ connection.setVerifier(verifier);
}
t1 = std::chrono::system_clock::now();
diff --git a/apps/http-proxy/src/forwarder_interface.cc b/apps/http-proxy/src/forwarder_interface.cc
index d80939b8b..7d8235ac6 100644
--- a/apps/http-proxy/src/forwarder_interface.cc
+++ b/apps/http-proxy/src/forwarder_interface.cc
@@ -13,9 +13,8 @@
* limitations under the License.
*/
-#include <hicn/http-proxy/forwarder_interface.h>
-
#include <arpa/inet.h>
+#include <hicn/http-proxy/forwarder_interface.h>
#include <hicn/transport/utils/log.h>
#include <chrono>
diff --git a/apps/http-proxy/src/http_proxy.cc b/apps/http-proxy/src/http_proxy.cc
index 262fcb8e1..c252afe88 100644
--- a/apps/http-proxy/src/http_proxy.cc
+++ b/apps/http-proxy/src/http_proxy.cc
@@ -225,6 +225,7 @@ class HTTPClientConnectionCallback : interface::ConsumerSocket::ReadCallback {
const char* reply = nullptr;
if (result) {
reply = HTTPMessageFastParser::http_ok;
+ prefix_hash_ = configured_prefix;
} else {
reply = HTTPMessageFastParser::http_failed;
}
diff --git a/apps/http-proxy/src/icn_receiver.cc b/apps/http-proxy/src/icn_receiver.cc
index 8823907dc..23e5b5623 100644
--- a/apps/http-proxy/src/icn_receiver.cc
+++ b/apps/http-proxy/src/icn_receiver.cc
@@ -189,7 +189,7 @@ void AsyncConsumerProducer::publishContent(const uint8_t* data,
}
it->second.first +=
- producer_socket_.produce(name, data, size, is_last, start_suffix);
+ producer_socket_.produceStream(name, data, size, is_last, start_suffix);
if (is_last) {
it->second.second = false;