From 4c3c2633b226d930db7578346a1f5ddc48fd3466 Mon Sep 17 00:00:00 2001 From: Pauli Date: Mon, 31 May 2021 14:29:55 +1000 Subject: [PATCH] evp: remove TODOs Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/15539) --- crypto/evp/asymcipher.c | 6 ------ crypto/evp/bio_b64.c | 2 -- crypto/evp/bio_enc.c | 2 -- crypto/evp/bio_md.c | 2 -- crypto/evp/bio_ok.c | 2 -- crypto/evp/exchange.c | 6 ------ crypto/evp/m_sigver.c | 6 ------ crypto/evp/pmeth_gn.c | 1 - crypto/evp/pmeth_lib.c | 3 +-- crypto/evp/signature.c | 6 ------ 10 files changed, 1 insertion(+), 35 deletions(-) diff --git a/crypto/evp/asymcipher.c b/crypto/evp/asymcipher.c index 52be1c2d7cd..c70e1e95541 100644 --- a/crypto/evp/asymcipher.c +++ b/crypto/evp/asymcipher.c @@ -34,10 +34,6 @@ static int evp_pkey_asym_cipher_init(EVP_PKEY_CTX *ctx, int operation, evp_pkey_ctx_free_old_ops(ctx); ctx->operation = operation; - /* - * TODO when we stop falling back to legacy, this and the ERR_pop_to_mark() - * calls can be removed. - */ ERR_set_mark(); if (evp_pkey_ctx_is_legacy(ctx)) @@ -90,7 +86,6 @@ static int evp_pkey_asym_cipher_init(EVP_PKEY_CTX *ctx, int operation, } /* - * TODO remove this when legacy is gone * If we don't have the full support we need with provided methods, * let's go see if legacy does. */ @@ -134,7 +129,6 @@ static int evp_pkey_asym_cipher_init(EVP_PKEY_CTX *ctx, int operation, legacy: /* - * TODO remove this when legacy is gone * If we don't have the full support we need with provided methods, * let's go see if legacy does. */ diff --git a/crypto/evp/bio_b64.c b/crypto/evp/bio_b64.c index e21661d5a40..f58e55c04df 100644 --- a/crypto/evp/bio_b64.c +++ b/crypto/evp/bio_b64.c @@ -46,10 +46,8 @@ typedef struct b64_struct { static const BIO_METHOD methods_b64 = { BIO_TYPE_BASE64, "base64 encoding", - /* TODO: Convert to new style write function */ bwrite_conv, b64_write, - /* TODO: Convert to new style read function */ bread_conv, b64_read, b64_puts, diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index 0483c726d28..4eafaf6209e 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -44,10 +44,8 @@ typedef struct enc_struct { static const BIO_METHOD methods_enc = { BIO_TYPE_CIPHER, "cipher", - /* TODO: Convert to new style write function */ bwrite_conv, enc_write, - /* TODO: Convert to new style read function */ bread_conv, enc_read, NULL, /* enc_puts, */ diff --git a/crypto/evp/bio_md.c b/crypto/evp/bio_md.c index 26a30c698bb..1a85be18118 100644 --- a/crypto/evp/bio_md.c +++ b/crypto/evp/bio_md.c @@ -28,10 +28,8 @@ static long md_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp); static const BIO_METHOD methods_md = { BIO_TYPE_MD, "message digest", - /* TODO: Convert to new style write function */ bwrite_conv, md_write, - /* TODO: Convert to new style read function */ bread_conv, md_read, NULL, /* md_puts, */ diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c index 7e3d23f2dca..97641d11d1d 100644 --- a/crypto/evp/bio_ok.c +++ b/crypto/evp/bio_ok.c @@ -111,10 +111,8 @@ typedef struct ok_struct { static const BIO_METHOD methods_ok = { BIO_TYPE_CIPHER, "reliable", - /* TODO: Convert to new style write function */ bwrite_conv, ok_write, - /* TODO: Convert to new style read function */ bread_conv, ok_read, NULL, /* ok_puts, */ diff --git a/crypto/evp/exchange.c b/crypto/evp/exchange.c index 2a066082d78..6503f479fac 100644 --- a/crypto/evp/exchange.c +++ b/crypto/evp/exchange.c @@ -201,10 +201,6 @@ int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]) evp_pkey_ctx_free_old_ops(ctx); ctx->operation = EVP_PKEY_OP_DERIVE; - /* - * TODO when we stop falling back to legacy, this and the ERR_pop_to_mark() - * calls can be removed. - */ ERR_set_mark(); if (evp_pkey_ctx_is_legacy(ctx)) @@ -275,7 +271,6 @@ int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]) } /* - * TODO remove this when legacy is gone * If we don't have the full support we need with provided methods, * let's go see if legacy does. */ @@ -300,7 +295,6 @@ int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]) legacy: /* - * TODO remove this when legacy is gone * If we don't have the full support we need with provided methods, * let's go see if legacy does. */ diff --git a/crypto/evp/m_sigver.c b/crypto/evp/m_sigver.c index dba549503d8..0da6498030b 100644 --- a/crypto/evp/m_sigver.c +++ b/crypto/evp/m_sigver.c @@ -76,10 +76,6 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, if (props == NULL) props = locpctx->propquery; - /* - * TODO when we stop falling back to legacy, this and the ERR_pop_to_mark() - * calls can be removed. - */ ERR_set_mark(); if (evp_pkey_ctx_is_legacy(locpctx)) @@ -133,7 +129,6 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, } /* - * TODO remove this when legacy is gone * If we don't have the full support we need with provided methods, * let's go see if legacy does. */ @@ -223,7 +218,6 @@ static int do_sigver_init(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, legacy: /* - * TODO remove this when legacy is gone * If we don't have the full support we need with provided methods, * let's go see if legacy does. */ diff --git a/crypto/evp/pmeth_gn.c b/crypto/evp/pmeth_gn.c index 9af18d90fcc..2d96e3c227f 100644 --- a/crypto/evp/pmeth_gn.c +++ b/crypto/evp/pmeth_gn.c @@ -199,7 +199,6 @@ int EVP_PKEY_generate(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey) /* * Because we still have legacy keys - * TODO remove this #legacy internal keys are gone */ (*ppkey)->type = ctx->legacy_keytype; diff --git a/crypto/evp/pmeth_lib.c b/crypto/evp/pmeth_lib.c index bcc601ee59f..1256e981eb8 100644 --- a/crypto/evp/pmeth_lib.c +++ b/crypto/evp/pmeth_lib.c @@ -271,7 +271,6 @@ static EVP_PKEY_CTX *int_ctx_new(OSSL_LIB_CTX *libctx, * values. We go through all keymgmt names, because the keytype * that's passed to this function doesn't necessarily translate * directly. - * TODO: Remove this when #legacy keys are gone. */ if (keymgmt != NULL) { int tmp_id = get_legacy_alg_type_from_keymgmt(keymgmt); @@ -323,7 +322,7 @@ static EVP_PKEY_CTX *int_ctx_new(OSSL_LIB_CTX *libctx, ret->libctx = libctx; ret->keytype = keytype; ret->keymgmt = keymgmt; - ret->legacy_keytype = id; /* TODO: Remove when #legacy key are gone */ + ret->legacy_keytype = id; ret->engine = e; ret->pmeth = pmeth; ret->operation = EVP_PKEY_OP_UNDEFINED; diff --git a/crypto/evp/signature.c b/crypto/evp/signature.c index 698adff0885..9b289d315b7 100644 --- a/crypto/evp/signature.c +++ b/crypto/evp/signature.c @@ -395,10 +395,6 @@ static int evp_pkey_signature_init(EVP_PKEY_CTX *ctx, int operation, evp_pkey_ctx_free_old_ops(ctx); ctx->operation = operation; - /* - * TODO when we stop falling back to legacy, this and the ERR_pop_to_mark() - * calls can be removed. - */ ERR_set_mark(); if (evp_pkey_ctx_is_legacy(ctx)) @@ -450,7 +446,6 @@ static int evp_pkey_signature_init(EVP_PKEY_CTX *ctx, int operation, } /* - * TODO remove this when legacy is gone * If we don't have the full support we need with provided methods, * let's go see if legacy does. */ @@ -507,7 +502,6 @@ static int evp_pkey_signature_init(EVP_PKEY_CTX *ctx, int operation, legacy: /* - * TODO remove this when legacy is gone * If we don't have the full support we need with provided methods, * let's go see if legacy does. */ -- 2.47.3