2 * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
10 /* Internal EVP utility functions */
12 #include <openssl/core.h>
13 #include <openssl/evp.h>
14 #include <openssl/err.h>
15 #include <openssl/asn1.h> /* evp_locl.h needs it */
16 #include <openssl/safestack.h> /* evp_locl.h needs it */
17 #include "internal/evp_int.h" /* evp_locl.h needs it */
20 int evp_do_ciph_getparams(const EVP_CIPHER *ciph, OSSL_PARAM params[])
22 if (ciph->prov == NULL)
24 if (ciph->get_params == NULL)
26 return ciph->get_params(params);
29 int evp_do_ciph_ctx_getparams(const EVP_CIPHER *ciph, void *provctx,
32 if (ciph->prov == NULL)
34 if (ciph->ctx_get_params == NULL)
36 return ciph->ctx_get_params(provctx, params);
39 int evp_do_ciph_ctx_setparams(const EVP_CIPHER *ciph, void *provctx,
42 if (ciph->prov == NULL)
44 if (ciph->ctx_set_params == NULL)
46 return ciph->ctx_set_params(provctx, params);