Initial commmit for yaca tests. 47/67847/2
authorDariusz Michaluk <d.michaluk@samsung.com>
Tue, 26 Apr 2016 15:05:15 +0000 (17:05 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Fri, 29 Apr 2016 06:04:47 +0000 (08:04 +0200)
Change-Id: If6d2de0b8a59589ed8c607b21a01bd6fd698a692

14 files changed:
CMakeLists.txt
packaging/security-tests.spec
src/CMakeLists.txt
src/security-tests-all.sh
src/security-tests.sh
src/yaca/CMakeLists.txt [new file with mode: 0644]
src/yaca/yaca-test-crypto.cpp [new file with mode: 0644]
src/yaca/yaca-test-digest.cpp [new file with mode: 0644]
src/yaca/yaca-test-encrypt.cpp [new file with mode: 0644]
src/yaca/yaca-test-key.cpp [new file with mode: 0644]
src/yaca/yaca-test-seal.cpp [new file with mode: 0644]
src/yaca/yaca-test-sign.cpp [new file with mode: 0644]
src/yaca/yaca-test-simple.cpp [new file with mode: 0644]
src/yaca/yaca-test.cpp [new file with mode: 0644]

index 3571d97..c27dd7f 100644 (file)
@@ -63,6 +63,7 @@ IF(BUILD_ALL_TESTS)
     SET(BUILD_SM ON)
     SET(BUILD_CYNARA ON)
     SET(BUILD_WEB ON)
+    SET(BUILD_YACA ON)
 ENDIF(BUILD_ALL_TESTS)
 
 # If supported for the target machine, emit position-independent code,suitable
index 18011c5..8907212 100644 (file)
@@ -13,6 +13,7 @@ BuildRequires: pkgconfig(libcap)
 BuildRequires: pkgconfig(libsmack)
 BuildRequires: pkgconfig(security-manager)
 BuildRequires: pkgconfig(key-manager)
+BuildRequires: pkgconfig(yaca)
 BuildRequires: pkgconfig(dlog)
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(dbus-1)
@@ -87,6 +88,7 @@ echo "security-tests postinst done ..."
 /usr/bin/cynara-test
 /usr/bin/ckm-tests
 /usr/bin/ckm-integration-tests
+/usr/bin/yaca-test
 %{ckm_test_dir}/*
 /etc/security-tests
 /usr/lib/security-tests/cynara-tests/plugins/single-policy/*
index 9bba81d..471c28e 100644 (file)
@@ -106,3 +106,7 @@ ENDIF(BUILD_CYNARA)
 IF(BUILD_WEB)
     ADD_SUBDIRECTORY(libwebappenc-tests)
 ENDIF(BUILD_WEB)
+
+IF(BUILD_YACA)
+    ADD_SUBDIRECTORY(yaca)
+ENDIF(BUILD_YACA)
index da97c64..9ab5b5c 100644 (file)
@@ -56,6 +56,7 @@ runTest smack
 runTest security-manager
 runTest cynara
 runTest ckm
+runTest yaca
 
 printSummary
 
index 9115beb..3956258 100644 (file)
@@ -46,11 +46,17 @@ case $1 in
     echo
     ckm-tests "${@:2}"
     ;;
+"yaca")
+    echo "========================================================================="
+    echo "YACA TESTS"
+    echo
+    yaca-test "${@:2}"
+    ;;
 *)
     echo "Correct using:"
     echo "    security_test.sh <module> <args_for_module>"
     echo
-    echo "modules: smack, security-manager, cynara, ckm"
+    echo "modules: smack, security-manager, cynara, ckm, yaca"
     ;;
 
 esac
diff --git a/src/yaca/CMakeLists.txt b/src/yaca/CMakeLists.txt
new file mode 100644 (file)
index 0000000..23c6211
--- /dev/null
@@ -0,0 +1,39 @@
+#
+#    Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+#
+#    Contact: Dariusz Michaluk (d.michaluk@samsumg.com)
+#
+#    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   CMakeLists.txt
+# @author Dariusz Michaluk (d.michaluk@samsung.com)
+#
+
+MESSAGE(STATUS "")
+MESSAGE(STATUS "Generating makefile for the Yaca system tests...")
+
+FILE(GLOB  yaca_test_SRCS *.cpp)
+
+## Setup target ################################################################
+SET(YACA_TEST "yaca-test")
+ADD_EXECUTABLE(${YACA_TEST} ${yaca_test_SRCS})
+
+## Link libraries ##############################################################
+PKG_CHECK_MODULES(YACA_TEST_DEPS REQUIRED yaca)
+
+INCLUDE_DIRECTORIES(SYSTEM ${YACA_TEST_DEPS_INCLUDE_DIRS})
+TARGET_LINK_LIBRARIES(${YACA_TEST} ${YACA_TEST_DEPS_LIBRARIES} dpl-test-framework)
+
+## Install #####################################################################
+INSTALL(TARGETS ${YACA_TEST} DESTINATION bin)
diff --git a/src/yaca/yaca-test-crypto.cpp b/src/yaca/yaca-test-crypto.cpp
new file mode 100644 (file)
index 0000000..594fe5c
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Contact: Dariusz Michaluk (d.michaluk@samsumg.com)
+ *
+ *  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
+ * @author Dariusz Michaluk (d.michaluk@samsumg.com)
+ */
+
+#include "dpl/test/test_runner.h"
+
+#include <yaca/crypto.h>
+
+
+RUNNER_TEST_GROUP_INIT(T1000_YACA_CRYPTO);
+
+RUNNER_TEST(T1001_yaca_init)
+{
+}
+
+RUNNER_TEST(T1002_yaca_exit)
+{
+}
+
+RUNNER_TEST(T1003_yaca_malloc)
+{
+}
+
+RUNNER_TEST(T1004_yaca_zalloc)
+{
+}
+
+RUNNER_TEST(T1005_yaca_realloc)
+{
+}
+
+RUNNER_TEST(T1006_yaca_free)
+{
+}
+
+RUNNER_TEST(T1007_yaca_rand_bytes)
+{
+}
+
+RUNNER_TEST(T1008_yaca_ctx_set_param)
+{
+}
+
+RUNNER_TEST(T1009_yaca_ctx_get_param)
+{
+}
+
+RUNNER_TEST(T1010_yaca_ctx_free)
+{
+}
+
+RUNNER_TEST(T1011_yaca_get_output_length)
+{
+}
diff --git a/src/yaca/yaca-test-digest.cpp b/src/yaca/yaca-test-digest.cpp
new file mode 100644 (file)
index 0000000..b37fc64
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Contact: Dariusz Michaluk (d.michaluk@samsumg.com)
+ *
+ *  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
+ * @author Dariusz Michaluk (d.michaluk@samsumg.com)
+ */
+
+#include "dpl/test/test_runner.h"
+
+#include <yaca/digest.h>
+
+
+RUNNER_TEST_GROUP_INIT(T2000_YACA_DIGEST);
+
+RUNNER_TEST(T2001_yaca_digest_init)
+{
+}
+
+RUNNER_TEST(T2002_yaca_digest_update)
+{
+}
+
+RUNNER_TEST(T2003_yaca_digest_final)
+{
+}
diff --git a/src/yaca/yaca-test-encrypt.cpp b/src/yaca/yaca-test-encrypt.cpp
new file mode 100644 (file)
index 0000000..9e3130b
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Contact: Dariusz Michaluk (d.michaluk@samsumg.com)
+ *
+ *  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
+ * @author Dariusz Michaluk (d.michaluk@samsumg.com)
+ */
+
+#include "dpl/test/test_runner.h"
+
+#include <yaca/encrypt.h>
+
+
+RUNNER_TEST_GROUP_INIT(T3000_YACA_ENCRYPT);
+
+RUNNER_TEST(T3001_yaca_encrypt_init)
+{
+}
+
+RUNNER_TEST(T3002_yaca_encrypt_update)
+{
+}
+
+RUNNER_TEST(T3003_yaca_encrypt_final)
+{
+}
+
+RUNNER_TEST(T3004_yaca_decrypt_init)
+{
+}
+
+RUNNER_TEST(T3005_yaca_decrypt_update)
+{
+}
+
+RUNNER_TEST(T3006_yaca_decrypt_final)
+{
+}
+
+RUNNER_TEST(T3007_yaca_get_iv_bits)
+{
+}
diff --git a/src/yaca/yaca-test-key.cpp b/src/yaca/yaca-test-key.cpp
new file mode 100644 (file)
index 0000000..f845d82
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Contact: Dariusz Michaluk (d.michaluk@samsumg.com)
+ *
+ *  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
+ * @author Dariusz Michaluk (d.michaluk@samsumg.com)
+ */
+
+#include "dpl/test/test_runner.h"
+
+#include <yaca/key.h>
+
+
+RUNNER_TEST_GROUP_INIT(T4000_YACA_KEY);
+
+RUNNER_TEST(T4001_yaca_key_get_bits)
+{
+}
+
+RUNNER_TEST(T4002_yaca_key_import)
+{
+}
+
+RUNNER_TEST(T4003_yaca_key_export)
+{
+}
+
+RUNNER_TEST(T4004_yaca_key_gen)
+{
+}
+
+RUNNER_TEST(T4005_yaca_key_gen_pair)
+{
+}
+
+RUNNER_TEST(T4006_yaca_key_free)
+{
+}
+
+RUNNER_TEST(T4007_yaca_key_derive_dh)
+{
+}
+
+RUNNER_TEST(T4008_yaca_key_derive_kea)
+{
+}
+
+RUNNER_TEST(T4009_yaca_key_derive_pbkdf2)
+{
+}
diff --git a/src/yaca/yaca-test-seal.cpp b/src/yaca/yaca-test-seal.cpp
new file mode 100644 (file)
index 0000000..acd6baa
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Contact: Dariusz Michaluk (d.michaluk@samsumg.com)
+ *
+ *  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
+ * @author Dariusz Michaluk (d.michaluk@samsumg.com)
+ */
+
+#include "dpl/test/test_runner.h"
+
+#include <yaca/seal.h>
+
+
+RUNNER_TEST_GROUP_INIT(T5000_YACA_SEAL);
+
+RUNNER_TEST(T5001_yaca_seal_init)
+{
+}
+
+RUNNER_TEST(T5002_yaca_seal_update)
+{
+}
+
+RUNNER_TEST(T5003_yaca_seal_final)
+{
+}
+
+RUNNER_TEST(T5004_yaca_open_init)
+{
+}
+
+RUNNER_TEST(T5005_yaca_open_update)
+{
+}
+
+RUNNER_TEST(T5006_yaca_open_final)
+{
+}
diff --git a/src/yaca/yaca-test-sign.cpp b/src/yaca/yaca-test-sign.cpp
new file mode 100644 (file)
index 0000000..918a525
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Contact: Dariusz Michaluk (d.michaluk@samsumg.com)
+ *
+ *  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
+ * @author Dariusz Michaluk (d.michaluk@samsumg.com)
+ */
+
+#include "dpl/test/test_runner.h"
+
+#include <yaca/sign.h>
+
+
+RUNNER_TEST_GROUP_INIT(T6000_YACA_SIGN);
+
+RUNNER_TEST(T6001_yaca_sign_init)
+{
+}
+
+RUNNER_TEST(T6002_yaca_sign_update)
+{
+}
+
+RUNNER_TEST(T6003_yaca_sign_final)
+{
+}
+
+RUNNER_TEST(T6004_yaca_verify_init)
+{
+}
+
+RUNNER_TEST(T6005_yaca_verify_update)
+{
+}
+
+RUNNER_TEST(T6006_yaca_verify_final)
+{
+}
diff --git a/src/yaca/yaca-test-simple.cpp b/src/yaca/yaca-test-simple.cpp
new file mode 100644 (file)
index 0000000..d7186aa
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Contact: Dariusz Michaluk (d.michaluk@samsumg.com)
+ *
+ *  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
+ * @author Dariusz Michaluk (d.michaluk@samsumg.com)
+ */
+
+#include "dpl/test/test_runner.h"
+
+#include <yaca/simple.h>
+
+
+RUNNER_TEST_GROUP_INIT(T7000_YACA_SIMPLE);
+
+RUNNER_TEST(T7001_yaca_digest_calc)
+{
+}
+
+RUNNER_TEST(T7002_yaca_encrypt)
+{
+}
+
+RUNNER_TEST(T7003_yaca_decrypt)
+{
+}
diff --git a/src/yaca/yaca-test.cpp b/src/yaca/yaca-test.cpp
new file mode 100644 (file)
index 0000000..d922550
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Contact: Dariusz Michaluk (d.michaluk@samsumg.com)
+ *
+ *  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
+ * @author Dariusz Michaluk (d.michaluk@samsumg.com)
+ */
+
+#include "dpl/test/test_runner.h"
+
+int main (int argc, char *argv[])
+{
+    int status = DPL::Test::TestRunnerSingleton::Instance().ExecTestRunner(argc, argv);
+    return status;
+}