Refine spec file
[platform/core/security/libwebappenc.git] / srcs / wae_initializer.c
1 /*
2  *  Copyright (c) 2000 - 2015 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
23 #include "key_handler.h"
24 #include "web_app_enc.h"
25 #include "wae_log.h"
26 #include <stdio.h>
27
28 int main(int argc, char* argv[])
29 {
30     int ret = WAE_ERROR_NONE;
31     int reload = WAE_FALSE;
32
33     if(argc == 2 && strcmp(argv[1], "--reload")==0) {
34         reload = WAE_TRUE;
35     }
36
37     ret = load_preloaded_app_deks(reload);
38     if(ret == WAE_ERROR_NONE) {
39         printf("WAE INITIALIZER was finished successfully.\n");
40         WAE_SLOGI("WAE INITIALIZER was finished successfully.");
41         return 0;
42     }else {
43         printf("WAE INITIALIZER was finished with error. ret=%d\n", ret);
44         WAE_SLOGE("WAE INITIALIZER was finished with error. ret=%d", ret);
45         return -1;
46     }
47 }