From: Pauli Date: Mon, 31 May 2021 04:29:33 +0000 (+1000) Subject: cms: remove TODOs X-Git-Tag: openssl-3.0.0-beta1~257 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6f6c8b0e3c3c9d627a3e211d49b1cdeb0114a6c7;p=thirdparty%2Fopenssl.git cms: remove TODOs Reviewed-by: Tim Hudson (Merged from https://github.com/openssl/openssl/pull/15539) --- diff --git a/crypto/cmp/cmp_client.c b/crypto/cmp/cmp_client.c index 8e01381402d..e7761ae7d94 100644 --- a/crypto/cmp/cmp_client.c +++ b/crypto/cmp/cmp_client.c @@ -275,7 +275,6 @@ static int poll_for_response(OSSL_CMP_CTX *ctx, int sleep, int rid, char str[OSSL_CMP_PKISI_BUFLEN]; int len; - /* TODO: handle potentially multiple elements in pollRep */ if (sk_OSSL_CMP_POLLREP_num(prc) > 1) { ERR_raise(ERR_LIB_CMP, CMP_R_MULTIPLE_RESPONSES_NOT_SUPPORTED); goto err; @@ -549,7 +548,6 @@ static int cert_response(OSSL_CMP_CTX *ctx, int sleep, int rid, ERR_raise(ERR_LIB_CMP, CMP_R_MULTIPLE_RESPONSES_NOT_SUPPORTED); return 0; } - /* TODO: handle potentially multiple CertResponses in CertRepMsg */ crep = ossl_cmp_certrepmessage_get0_certresponse(crepmsg, rid); if (crep == NULL) return 0; @@ -620,11 +618,6 @@ static int cert_response(OSSL_CMP_CTX *ctx, int sleep, int rid, if (fail_info != 0) /* immediately log error before any certConf exchange */ ossl_cmp_log1(ERROR, ctx, "rejecting newly enrolled cert with subject: %s", subj); - - /* - * TODO: better move certConf exchange to do_certreq_seq() such that - * also more low-level errors with CertReqMessages get reported to server - */ if (!ctx->disableConfirm && !ossl_cmp_hdr_has_implicitConfirm((*resp)->header)) { if (!ossl_cmp_exchange_certConf(ctx, fail_info, txt)) @@ -685,9 +678,8 @@ int OSSL_CMP_try_certreq(OSSL_CMP_CTX *ctx, int req_type, } else { if (req_type < 0) return ossl_cmp_exchange_error(ctx, OSSL_CMP_PKISTATUS_rejection, - 0 /* TODO better fail_info value? */, - "polling aborted", 0 /* errorCode */, - "by application"); + 0, "polling aborted", + 0 /* errorCode */, "by application"); res = poll_for_response(ctx, 0 /* no sleep */, rid, &rep, checkAfter); if (res <= 0) /* waiting or error */ return res; @@ -705,7 +697,6 @@ int OSSL_CMP_try_certreq(OSSL_CMP_CTX *ctx, int req_type, * certConf, PKIconf, and polling if required. * Will sleep as long as indicated by the server (according to checkAfter). * All enrollment options need to be present in the context. - * TODO: another function to request two certificates at once should be created. * Returns pointer to received certificate, or NULL if none was received. */ X509 *OSSL_CMP_exec_certreq(OSSL_CMP_CTX *ctx, int req_type, diff --git a/crypto/cms/cms_kari.c b/crypto/cms/cms_kari.c index 47132fcbe85..a2f422a78d8 100644 --- a/crypto/cms/cms_kari.c +++ b/crypto/cms/cms_kari.c @@ -432,7 +432,6 @@ static int cms_wrap_init(CMS_KeyAgreeRecipientInfo *kari, return 0; keylen = EVP_CIPHER_get_key_length(cipher); if ((EVP_CIPHER_get_flags(cipher) & EVP_CIPH_FLAG_GET_WRAP_CIPHER) != 0) { - /* TODO: make this not get a method we can call directly */ ret = EVP_CIPHER_meth_get_ctrl(cipher)(NULL, EVP_CTRL_GET_WRAP_CIPHER, 0, &kekcipher); if (ret <= 0)