/* * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy * in the file LICENSE in the source distribution or at * https://www.openssl.org/source/license.html *//* * Low level APIs are deprecated for public use, but still ok for internal use. */#include"internal/deprecated.h"#include<openssl/core.h>#include<openssl/core_dispatch.h>#include<openssl/core_names.h>#include<openssl/crypto.h>#include<openssl/params.h>#include<openssl/asn1.h>#include<openssl/err.h>#include<openssl/pem.h>#include<openssl/x509.h>#include<openssl/pkcs12.h> /* PKCS8_encrypt() */#include<openssl/dh.h>#include<openssl/dsa.h>#include<openssl/ec.h>#include<openssl/proverr.h>#include"internal/passphrase.h"#include"internal/cryptlib.h"#include"crypto/ecx.h"#include"crypto/rsa.h"#include"prov/implementations.h"#include"prov/bio.h"#include"prov/provider_ctx.h"#include"prov/der_rsa.h"#include"endecoder_local.h"#if defined(OPENSSL_NO_DH) && defined(OPENSSL_NO_DSA) && defined(OPENSSL_NO_EC)# define OPENSSL_NO_KEYPARAMS#endifstructkey2any_ctx_st{PROV_CTX*provctx;/* Set to 1 if intending to encrypt/decrypt, otherwise 0 */intcipher_intent;