Debian Codegraph @

crt/s2n/crypto/s2n_kdf.h

raw symbols SCIP
1 /*
2 * Copyright Amazon.com, Inc. or its affiliates. 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 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15
16 #pragma once
17
18 #if S2N_OPENSSL_VERSION_AT_LEAST(3, 0, 0)
19
20 #include <openssl/core_names.h>
21 #include <openssl/kdf.h>
22
23 #define S2N_OSSL_PARAM_BLOB(id, blob) \
24 OSSL_PARAM_octet_string(id, blob->data, blob->size)
25 #define S2N_OSSL_PARAM_STR(id, cstr) \
26 OSSL_PARAM_utf8_string(id, cstr, strlen(cstr))
27 #define S2N_OSSL_PARAM_INT(id, val) \
28 OSSL_PARAM_int(id, &val)
29
30 DEFINE_POINTER_CLEANUP_FUNC(EVP_KDF_CTX *, EVP_KDF_CTX_free);
31 DEFINE_POINTER_CLEANUP_FUNC(EVP_KDF *, EVP_KDF_free);
32
33 #endif /* Openssl3 only */