Apply coding style of tizen by astyle
[platform/core/security/libwebappenc.git] / srcs / wae_initializer.c
1 /*
2  *  Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License
15  *
16  *
17  * @file        wae_initializer.c
18  * @author      Dongsun Lee (ds73.lee@samsung.com)
19  * @version     1.0
20  * @brief       tool for importing APP DEKs during booting
21  */
22 #include "key_handler.h"
23 #include "web_app_enc.h"
24 #include "wae_log.h"
25
26 #include <stdio.h>
27
28 int main(int argc, char *argv[])
29 {
30         int ret = WAE_ERROR_NONE;
31         bool reload = false;
32
33         if (argc == 2 && strcmp(argv[1], "--reload") == 0) {
34                 reload = true;
35         }
36
37         ret = load_preloaded_app_deks(reload);
38
39         if (ret == WAE_ERROR_NONE) {
40                 printf("WAE INITIALIZER was finished successfully.\n");
41                 WAE_SLOGI("WAE INITIALIZER was finished successfully.");
42                 return 0;
43         } else {
44                 printf("WAE INITIALIZER was finished with error. ret=%d\n", ret);
45                 WAE_SLOGE("WAE INITIALIZER was finished with error. ret=%d", ret);
46                 return -1;
47         }
48 }