1 /** @file
2  * Copyright (c) 2018-2019, Arm Limited or its affiliates. All rights reserved.
3  * SPDX-License-Identifier : Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *  http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16 **/
17 
18 #include "val_target.h"
19 #include "pal_interfaces_ns.h"
20 #include "val_framework.h"
21 #include "val_client_defs.h"
22 #include "val_crypto.h"
23 
24 /**
25     @brief    - This API will call the requested crypto function
26     @param    - type : function code
27                 ...  : variable number of arguments
28     @return   - Error status
29 **/
val_crypto_function(int type,...)30 int32_t val_crypto_function(int type, ...)
31 {
32 #ifdef CRYPTO
33     va_list      valist;
34     int32_t      status;
35 
36     va_start(valist, type);
37     status = pal_crypto_function(type, valist);
38     va_end(valist);
39     return status;
40 #else
41     (void)type;
42     return VAL_STATUS_ERROR;
43 #endif
44 }
45