BuildRequires: findutils
BuildRequires: openssl
BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(klay)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(libpcrecpp)
BuildRequires: pkgconfig(xmlsec1)
# @author Sangwan Kwon (sangwan.kwon@samsung.com)
# @breif Make trasnport security library
#
+PKG_CHECK_MODULES(${TARGET_TRANSEC_LIB}_DEP
+ REQUIRED
+ klay
+)
+
SET(${TARGET_TRANSEC_LIB}_SRCS
+ InitLib.cpp
AppCustomTrustAnchor.cpp
)
VERSION ${VERSION}
)
+TARGET_LINK_LIBRARIES(${TARGET_TRANSEC_LIB}
+ ${${TARGET_TRANSEC_LIB}_DEP_LIBRARIES}
+)
INSTALL(TARGETS ${TARGET_TRANSEC_LIB} DESTINATION ${LIB_INSTALL_DIR})
INSTALL(FILES
AppCustomTrustAnchor.h
--- /dev/null
+/*
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * 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.
+ */
+/*
+ * @file InitLib.cpp
+ * @author Sangwan Kwon (sangwan.kwon@samsung.com)
+ * @version 0.1
+ * @brief Init global configuration for library
+ */
+
+#include <klay/audit/logger.h>
+#include <klay/audit/dlog-sink.h>
+
+#include <memory>
+
+namespace transec {
+namespace {
+
+class InitLib {
+public:
+ InitLib()
+ {
+ audit::Logger::setBackend(new audit::DlogLogSink());
+ audit::Logger::setTag("CERT_SVC");
+ };
+ ~InitLib() = default;
+};
+
+static std::unique_ptr<InitLib> init(new(std::nothrow)(InitLib));
+
+} // namespace anonymous
+} // namespace transec