From 51a55d687be79d46d708e4ca7c735ea62cbd6a6f Mon Sep 17 00:00:00 2001 From: Dariusz Michaluk Date: Thu, 19 May 2016 15:42:26 +0200 Subject: [PATCH] Remove unnecessary test example. Change-Id: Iba5d726cda3dfb74e91463a565938b43b5a1d53b --- examples/CMakeLists.txt | 1 - examples/test.c | 59 ------------------------------------------------- 2 files changed, 60 deletions(-) delete mode 100644 examples/test.c diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index fe238d2..c8461ec 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -49,7 +49,6 @@ BUILD_EXAMPLE("yaca-example-seal" seal.c) BUILD_EXAMPLE("yaca-example-encrypt-gcm" encrypt_aes_gcm.c) BUILD_EXAMPLE("yaca-example-sign" sign.c) BUILD_EXAMPLE("yaca-example-key-exchange" key_exchange.c) -BUILD_EXAMPLE("yaca-example-test" test.c) BUILD_EXAMPLE("yaca-example-key-impexp" key_import_export.c) INSTALL(FILES ${COMMON_SOURCES} diff --git a/examples/test.c b/examples/test.c deleted file mode 100644 index a9992b2..0000000 --- a/examples/test.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved - * - * Contact: - * - * 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 - */ - -#include -#include -#include -#include -#include -#include "misc.h" -#include "../src/debug.h" - -/** Simple test for development of library (before API is ready) */ - -int main(int argc, char* argv[]) -{ - yaca_debug_set_error_cb(debug_func); - - yaca_key_h key; - char *k; - size_t kl; - int ret; - - ret = yaca_init(); - if (ret < 0) - return ret; - - printf("Generating key using CryptoAPI.. "); - ret = yaca_key_gen(&key, YACA_KEY_TYPE_SYMMETRIC, YACA_KEY_UNSAFE_128BIT); - if (ret < 0) - return ret; - printf("done (%d)\n", ret); - - printf("Exporting key using CryptoAPI.. "); - ret = yaca_key_export(key, YACA_KEY_FORMAT_DEFAULT, YACA_KEY_FILE_FORMAT_RAW, NULL, &k, &kl); - if (ret < 0) - return ret; - printf("done (%d)\n", ret); - - dump_hex(k, kl, "%zu-bit key: \n", kl); - - yaca_exit(); - - return 0; -} -- 2.7.4