From nobody Fri Apr 4 23:58:36 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1739204618; cv=none; d=zohomail.com; s=zohoarc; b=OWXPtd5ZJ1u6WKHiNKsLwzMXNT7zh3vUk/Cc6xz2qpftGyoRFqAC1rvun8UEzkZHlxbSg1m064A9RzVVhLSf3lc7IgBPAHKCmCJlS8yoRbBin3PuBiTYDU/cyBLCKySHksz9FQi/Ec37DmkHwHVTXqizMNcjvWW9E5afgRlTcU8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1739204618; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=0yqG8v8WSQiv1ErGVoG3M0wvKSSpp25E6v1a1sbfsZk=; b=f38ghlZKQ9qZd3U/vQswu4qCc2kI1qPgh/PXpa/C/7C/XIcvjoInLtLepCwmXTygMIobluaz0qVbm1YBaJVQoUrNCQ2tHjOqx692Tz8AGUmsd+13Uqqe09taLprw0hmQ0/vCgZCxV6SZAHSIow8EYdgRLESzshdFYwwMJ/J/52M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1739204618560278.7158806945763; Mon, 10 Feb 2025 08:23:38 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1thWYS-0003jw-FU; Mon, 10 Feb 2025 11:22:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1thWXu-0002xd-Vw for qemu-devel@nongnu.org; Mon, 10 Feb 2025 11:22:08 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1thWXr-0002nm-0i for qemu-devel@nongnu.org; Mon, 10 Feb 2025 11:22:04 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-43946b5920cso6644695e9.1 for ; Mon, 10 Feb 2025 08:22:02 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38dc5c8c37esm10944371f8f.2.2025.02.10.08.22.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 10 Feb 2025 08:22:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1739204521; x=1739809321; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0yqG8v8WSQiv1ErGVoG3M0wvKSSpp25E6v1a1sbfsZk=; b=JWKEMYmXOzafoRyF0ayYsezYIZylxyhFeCp6AEUV4rVhuSyuAeIzPJkogE4gjbzwOx zF6PAj7/y3VUiM1nrzgcDfhViuG7nf4Jn1XFh+FbojBvxnbpvgEm4e02HqLYvbvPG/T0 sZz+ATWrYAzbGzIMWUoajfrrBasRWWlnaLsV4hVAsqRl6aTZZp8L8q/l2ddJ/0YP3q0P T9urcsRm+MBGo3a+lNHiPAU52T9k226dQJmt8bnk2rZvOMV6PHEw8ZqE9ut8pMBfiACQ +M8jRA/r/P7lxZb8Vbt0rzckAkGR9R7pwPnU8r6zZW8XDwqS1H3j8dUyS/wMiUwsYj/n OLtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739204521; x=1739809321; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0yqG8v8WSQiv1ErGVoG3M0wvKSSpp25E6v1a1sbfsZk=; b=iW07g/AhBpj5DZTafPR1JAKXGn3AZ+5IYqg+E6XN7SMGgYVt2kSUlb8OoHS81Gs+u9 eEe0ERLxAQZcXk+b8LxqVi1ue07i67YUiGbQHWEvRCVQZjVPLIrbhAJaunQvhmDoo8MH 2PQyHYkoj8NB/THKzRBZ9/QJAQ5Coicl14tKrQzylYem1oMuXTlpw3fS+bp2NQDNXro6 FFFpmxnfzV+tuAgCQ1bM/y/TpAHOf/PCbvjfTklUE7uwg+Yb/AX1klY8bI0GjqGD78TT GxWWD5Q/zzYnPhTkuOPxMtYoEgdiu+BuA3ZJXK6m0T/B6JJicTZR5TOmkGYiSpild1tG mA8g== X-Gm-Message-State: AOJu0YyDr6wkx5NhhE0x4gLYyvNU8MCaWVArPhJIKFbM/BPyYu1w1Dld DTBlP9tNwx4PhZw6t1GfrRvxEyPDUQPrB+3TypXjIGeTCj8p1mddbRU+lHiXXiFu3TkG79c8pW3 C5EA= X-Gm-Gg: ASbGncssVPk9a46Q2YsYN3GomhwDt5IryX7orAtGeMrudUAHWR0Z/+PtTPAFYcE8Scy hEGdYOlLnpdIDURP2/60uUgbuiD/DsBzCj5Z7vIMI6PgexmJeEGCS32dad8DyX0PkTUubWV74FC PDGmQZOGrCMz9tlSOo4MY5uA7+h6Yvi7XIVkuD5m/kVVvZw3gcY4XcvmMDEebgldl7i/kvVNZsC MoeHHrbxFsiiHZNTOErFBYMVOJiNhnXGNBp9xNLZXdIzX/W0hC/kA/Rt/wxvOy0u7KBCIxiprPY XB70/bGWvGz3tkUH/By/bzOKep2seWd70TvLHaKRS9bbZUBJf90HEuDjOPOIt7ZkIQ== X-Google-Smtp-Source: AGHT+IEas8fB8elFJzbZObPR2JRo+mID134ucAm+DCOyZtaaaNeUti7ww8jWUpDh4HrEx6J1Ed+fag== X-Received: by 2002:a05:600c:458e:b0:434:9f81:76d5 with SMTP id 5b1f17b1804b1-439249abc43mr106424325e9.22.1739204521001; Mon, 10 Feb 2025 08:22:01 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 5/6] crypto/tlscredsanon: Rename 'creds' -> 'anon_creds' Date: Mon, 10 Feb 2025 17:21:34 +0100 Message-ID: <20250210162135.14123-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250210162135.14123-1-philmd@linaro.org> References: <20250210162135.14123-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1739204620520019100 In preparation of naming the QCryptoTLSCreds 'creds' in the next commit, rename QCryptoTLSCredsAnon creds as 'anon_creds'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- crypto/tlscredsanon.c | 44 +++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/crypto/tlscredsanon.c b/crypto/tlscredsanon.c index 476cf89c963..15808329d89 100644 --- a/crypto/tlscredsanon.c +++ b/crypto/tlscredsanon.c @@ -33,39 +33,39 @@ =20 =20 static int -qcrypto_tls_creds_anon_load(QCryptoTLSCredsAnon *creds, +qcrypto_tls_creds_anon_load(QCryptoTLSCredsAnon *anon_creds, Error **errp) { g_autofree char *dhparams =3D NULL; int ret; =20 - trace_qcrypto_tls_creds_anon_load(creds, - creds->parent_obj.dir ? creds->parent_obj.dir : ""); + trace_qcrypto_tls_creds_anon_load(anon_creds, + anon_creds->parent_obj.dir ? anon_creds->parent_obj.dir : ""); =20 - if (creds->parent_obj.endpoint =3D=3D QCRYPTO_TLS_CREDS_ENDPOINT_SERVE= R) { - if (qcrypto_tls_creds_get_path(&creds->parent_obj, + if (anon_creds->parent_obj.endpoint =3D=3D QCRYPTO_TLS_CREDS_ENDPOINT_= SERVER) { + if (qcrypto_tls_creds_get_path(&anon_creds->parent_obj, QCRYPTO_TLS_CREDS_DH_PARAMS, false, &dhparams, errp) < 0) { return -1; } =20 - ret =3D gnutls_anon_allocate_server_credentials(&creds->data.serve= r); + ret =3D gnutls_anon_allocate_server_credentials(&anon_creds->data.= server); if (ret < 0) { error_setg(errp, "Cannot allocate credentials: %s", gnutls_strerror(ret)); return -1; } =20 - if (qcrypto_tls_creds_get_dh_params_file(&creds->parent_obj, dhpar= ams, - &creds->parent_obj.dh_par= ams, + if (qcrypto_tls_creds_get_dh_params_file(&anon_creds->parent_obj, = dhparams, + &anon_creds->parent_obj.d= h_params, errp) < 0) { return -1; } =20 - gnutls_anon_set_server_dh_params(creds->data.server, - creds->parent_obj.dh_params); + gnutls_anon_set_server_dh_params(anon_creds->data.server, + anon_creds->parent_obj.dh_params); } else { - ret =3D gnutls_anon_allocate_client_credentials(&creds->data.clien= t); + ret =3D gnutls_anon_allocate_client_credentials(&anon_creds->data.= client); if (ret < 0) { error_setg(errp, "Cannot allocate credentials: %s", gnutls_strerror(ret)); @@ -78,22 +78,22 @@ qcrypto_tls_creds_anon_load(QCryptoTLSCredsAnon *creds, =20 =20 static void -qcrypto_tls_creds_anon_unload(QCryptoTLSCredsAnon *creds) +qcrypto_tls_creds_anon_unload(QCryptoTLSCredsAnon *anon_creds) { - if (creds->parent_obj.endpoint =3D=3D QCRYPTO_TLS_CREDS_ENDPOINT_CLIEN= T) { - if (creds->data.client) { - gnutls_anon_free_client_credentials(creds->data.client); - creds->data.client =3D NULL; + if (anon_creds->parent_obj.endpoint =3D=3D QCRYPTO_TLS_CREDS_ENDPOINT_= CLIENT) { + if (anon_creds->data.client) { + gnutls_anon_free_client_credentials(anon_creds->data.client); + anon_creds->data.client =3D NULL; } } else { - if (creds->data.server) { - gnutls_anon_free_server_credentials(creds->data.server); - creds->data.server =3D NULL; + if (anon_creds->data.server) { + gnutls_anon_free_server_credentials(anon_creds->data.server); + anon_creds->data.server =3D NULL; } } - if (creds->parent_obj.dh_params) { - gnutls_dh_params_deinit(creds->parent_obj.dh_params); - creds->parent_obj.dh_params =3D NULL; + if (anon_creds->parent_obj.dh_params) { + gnutls_dh_params_deinit(anon_creds->parent_obj.dh_params); + anon_creds->parent_obj.dh_params =3D NULL; } } =20 --=20 2.47.1