mbed TLS v3.1.0
crypto_compat.h
Go to the documentation of this file.
1 
13 /*
14  * Copyright The Mbed TLS Contributors
15  * SPDX-License-Identifier: Apache-2.0
16  *
17  * Licensed under the Apache License, Version 2.0 (the "License"); you may
18  * not use this file except in compliance with the License.
19  * You may obtain a copy of the License at
20  *
21  * http://www.apache.org/licenses/LICENSE-2.0
22  *
23  * Unless required by applicable law or agreed to in writing, software
24  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
25  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26  * See the License for the specific language governing permissions and
27  * limitations under the License.
28  */
29 
30 #ifndef PSA_CRYPTO_COMPAT_H
31 #define PSA_CRYPTO_COMPAT_H
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /*
38  * To support both openless APIs and psa_open_key() temporarily, define
39  * psa_key_handle_t to be equal to mbedtls_svc_key_id_t. Do not mark the
40  * type and its utility macros and functions deprecated yet. This will be done
41  * in a subsequent phase.
42  */
44 
45 #define PSA_KEY_HANDLE_INIT MBEDTLS_SVC_KEY_ID_INIT
46 
53 static inline int psa_key_handle_is_null( psa_key_handle_t handle )
54 {
55  return( mbedtls_svc_key_id_is_null( handle ) );
56 }
57 
119  psa_key_handle_t *handle );
120 
159 psa_status_t psa_close_key(psa_key_handle_t handle);
160 
161 #ifdef __cplusplus
162 }
163 #endif
164 
165 #endif /* PSA_CRYPTO_COMPAT_H */
psa_status_t psa_close_key(psa_key_handle_t handle)
mbedtls_svc_key_id_t psa_key_handle_t
Definition: crypto_compat.h:43
psa_status_t psa_open_key(mbedtls_svc_key_id_t key, psa_key_handle_t *handle)
static int psa_key_handle_is_null(psa_key_handle_t handle)
Definition: crypto_compat.h:53
static int mbedtls_svc_key_id_is_null(mbedtls_svc_key_id_t key)
int32_t psa_status_t
Function return status.
Definition: crypto_types.h:63