int ossl_dh_is_foreign(const DH *dh)
{
#ifndef FIPS_MODULE
- if (dh->engine != NULL || ossl_dh_get_method(dh) != DH_OpenSSL())
+ if (ossl_dh_get_method(dh) != DH_OpenSSL())
return 1;
#endif
return 0;
#ifndef FIPS_MODULE
ENGINE *DH_get0_engine(DH *dh)
{
- return dh->engine;
+ return NULL;
}
#endif /*FIPS_MODULE */
CRYPTO_REF_COUNT references;
#ifndef FIPS_MODULE
CRYPTO_EX_DATA ex_data;
- ENGINE *engine;
#endif
OSSL_LIB_CTX *libctx;
const DH_METHOD *meth;
int ossl_dsa_is_foreign(const DSA *dsa)
{
#ifndef FIPS_MODULE
- if (dsa->engine != NULL || DSA_get_method((DSA *)dsa) != DSA_OpenSSL())
+ if (DSA_get_method((DSA *)dsa) != DSA_OpenSSL())
return 1;
#endif
return 0;
ENGINE *DSA_get0_engine(DSA *d)
{
- return d->engine;
+ return NULL;
}
int DSA_set_method(DSA *dsa, const DSA_METHOD *meth)
CRYPTO_EX_DATA ex_data;
#endif
const DSA_METHOD *meth;
- /* functional reference if 'meth' is ENGINE-provided */
- ENGINE *engine;
CRYPTO_RWLOCK *lock;
OSSL_LIB_CTX *libctx;
int ossl_ec_key_is_foreign(const EC_KEY *ec)
{
#ifndef FIPS_MODULE
- if (ec->engine != NULL || EC_KEY_get_method(ec) != EC_KEY_OpenSSL())
+ if (EC_KEY_get_method(ec) != EC_KEY_OpenSSL())
return 1;
#endif
return 0;
}
if ((ret = ossl_ec_key_new_method_int(src->libctx, src->propq,
- src->engine)) == NULL)
+ NULL)) == NULL)
return NULL;
/* copy the parameters */
ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey)
{
- return eckey->engine;
+ return NULL;
}
int EC_KEY_generate_key(EC_KEY *eckey)
struct ec_key_st {
const EC_KEY_METHOD *meth;
- ENGINE *engine;
int version;
EC_GROUP *group;
EC_POINT *pub_key;
/*
* If there are engines involved then we throw an error
*/
- if (ctx->engine != NULL
- || (cipher != NULL && cipher->origin == EVP_ORIG_METH)
+ if ((cipher != NULL && cipher->origin == EVP_ORIG_METH)
|| (cipher == NULL && ctx->cipher != NULL
&& ctx->cipher->origin == EVP_ORIG_METH)) {
ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR);
struct evp_md_ctx_st {
const EVP_MD *reqdigest; /* The original requested digest */
const EVP_MD *digest;
- ENGINE *engine; /* functional reference if 'digest' is
- * ENGINE-provided */
unsigned long flags;
void *md_data;
/* Public key context for sign/verify */
struct evp_cipher_ctx_st {
const EVP_CIPHER *cipher;
- ENGINE *engine; /* functional reference if 'cipher' is
- * ENGINE-provided */
int encrypt; /* encrypt or decrypt */
int buf_len; /* number we have left */
unsigned char oiv[EVP_MAX_IV_LENGTH]; /* original iv */
} else {
pkey->type = EVP_PKEY_KEYMGMT;
}
- pkey->engine = e;
#endif
}
return 1;
ret->keytype = keytype;
ret->keymgmt = keymgmt;
ret->legacy_keytype = id;
- ret->engine = e;
ret->pmeth = pmeth;
ret->operation = EVP_PKEY_OP_UNDEFINED;
int ossl_rsa_is_foreign(const RSA *rsa)
{
#ifndef FIPS_MODULE
- if (rsa->engine != NULL || RSA_get_method(rsa) != RSA_PKCS1_OpenSSL())
+ if (RSA_get_method(rsa) != RSA_PKCS1_OpenSSL())
return 1;
#endif
return 0;
#ifndef FIPS_MODULE
ENGINE *RSA_get0_engine(const RSA *r)
{
- return r->engine;
+ return NULL;
}
int RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2)
OSSL_LIB_CTX *libctx;
int32_t version;
const RSA_METHOD *meth;
- /* functional reference if 'meth' is ENGINE-provided */
- ENGINE *engine;
BIGNUM *n;
BIGNUM *e;
BIGNUM *d;
#ifndef OPENSSL_NO_DEPRECATED_3_0
/* Legacy stuff */
const char *scheme;
- ENGINE *engine;
OSSL_STORE_open_fn open;
OSSL_STORE_attach_fn attach;
OSSL_STORE_ctrl_fn ctrl;
if ((res = OPENSSL_zalloc(sizeof(*res))) == NULL)
return NULL;
- res->engine = e;
res->scheme = scheme;
return res;
}
const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader)
{
- return loader->engine;
+ return NULL;
}
const char *OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader)
int legacy_keytype;
/* Method associated with this operation */
const EVP_PKEY_METHOD *pmeth;
- /* Engine that implements this method or NULL if builtin */
- ENGINE *engine;
/* Key: may be NULL */
EVP_PKEY *pkey;
/* Peer key for key agreement, may be NULL */
* a pointer to a low level key and possibly a pointer to an engine.
*/
const EVP_PKEY_ASN1_METHOD *ameth;
- ENGINE *engine;
- ENGINE *pmeth_engine; /* If not NULL public key ENGINE to use */
/* Union to store the reference to an origin legacy key */
union legacy_pkey_st pkey;