From nobody Sun Feb 8 10:46:44 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588852846; cv=none; d=zohomail.com; s=zohoarc; b=kbsLXQHF6exkr+2pxf+OgoPqetrv/c/z5hXb9/dR/J6HVcDC4hl4Q95t4Rxaq1WIY6p4y/qY/KMtwNDGt9zixWuaz6XqwktNnfmU8oNnht42FYrjITfT2pFpWTakUCaoftniWzkJgQuMRcBPQGMgjpqJWYBJdzaLIZiovqkkkno= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588852846; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0nLqvqmsH2jSFRw0F/MDyjhHtwg5oBKOYdRo16G5ILM=; b=j8NjA7R2vhWOxm85hlrNQbZpNSdEqo4fUfpHdA8uM7P2Y4tifKUTnSCIFn/VHhUT0v3s8C7bAiBO4B+pr3OIdBOgwvRFuR1rIs8Hd+qqYatgSA7tWE90UTYaj8MaN1t0NnoIoRONQVOWAuXPlCelZGonmTSfyD2FNnNhIBqtvLk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588852846052209.2489637077391; Thu, 7 May 2020 05:00:46 -0700 (PDT) Received: from localhost ([::1]:37610 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWfCm-0007k9-M0 for importer@patchew.org; Thu, 07 May 2020 08:00:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37206) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWfAR-0006JL-Kf for qemu-devel@nongnu.org; Thu, 07 May 2020 07:58:19 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:32310 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jWfAP-0000cY-SA for qemu-devel@nongnu.org; Thu, 07 May 2020 07:58:19 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-10-jTxt9743OKKhvnBQrVmzaQ-1; Thu, 07 May 2020 07:58:10 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 39445107ACCA; Thu, 7 May 2020 11:58:09 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.110.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0774A62A50; Thu, 7 May 2020 11:58:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588852695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0nLqvqmsH2jSFRw0F/MDyjhHtwg5oBKOYdRo16G5ILM=; b=MEq4YYQ/Ah/t8rup+k2iMiNDWwgSuAg3UCHeznmyUcHBCjeXYWiZBDOMWSwAJE5WMhj6y2 pnfXZNhhLLLnZyyCOZ5EnCXp+rM1T4V3VoBLmMPHn7k5vzKDG1mC//Y1neE+B/ugBZn8B3 zD+4GtueYySwmairDb1ceHONEpa5UZ0= X-MC-Unique: jTxt9743OKKhvnBQrVmzaQ-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 1/5] crypto: fix getter of a QCryptoSecret's property Date: Thu, 7 May 2020 12:57:59 +0100 Message-Id: <20200507115803.1122661-2-berrange@redhat.com> In-Reply-To: <20200507115803.1122661-1-berrange@redhat.com> References: <20200507115803.1122661-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=205.139.110.61; envelope-from=berrange@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/07 02:00:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Tong Ho , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Tong Ho This fixes the condition-check done by the "loaded" property getter, such that the property returns true even when the secret is loaded by the 'file' option. Signed-off-by: Tong Ho Signed-off-by: Daniel P. Berrang=C3=A9 --- crypto/secret.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/secret.c b/crypto/secret.c index 1cf0ad0ce8..5fb6bbe59c 100644 --- a/crypto/secret.c +++ b/crypto/secret.c @@ -221,6 +221,7 @@ qcrypto_secret_prop_set_loaded(Object *obj, secret->rawlen =3D inputlen; } else { g_free(secret->rawdata); + secret->rawdata =3D NULL; secret->rawlen =3D 0; } } @@ -231,7 +232,7 @@ qcrypto_secret_prop_get_loaded(Object *obj, Error **errp G_GNUC_UNUSED) { QCryptoSecret *secret =3D QCRYPTO_SECRET(obj); - return secret->data !=3D NULL; + return secret->rawdata !=3D NULL; } =20 =20 --=20 2.26.2 From nobody Sun Feb 8 10:46:44 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588852864; cv=none; d=zohomail.com; s=zohoarc; b=DQ3i0ExkxqrAI6A8KaJ2NuoVwk5YvMXHaUGJ1TXT00ePf/O0bakSEF6i2zAVSj5PPi0bb+3yAvk7DU2F8I+iDc6oiF0gKcDV1KwR5nJR9noxUDiHHxvJHMyZ27iszoyLbZ92oLJdi6PKh7BziCTQVoBebEEk7um8hegm/yJoDKc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588852864; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=goQB+ZJ3KkFNo7UHqa0H+yx53cyZ067ag9jf2ms9rEU=; b=HOiFdXOjx/O8VVFRtJwAueRdGePqfFw6QPEbSZ9F+rqECduaOhXdEtMS4uwt6oGWEJZqHFG90ZdpQtxTYioXQOtR/+/WrL4qWgu5pPs7sgF7tuPVZ+2jkFM5fdA22GO0YP4+Ya42fCaVbyhsA69r39ncuILd9bEs6rtBk/EB1RI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588852864397150.03728016162142; Thu, 7 May 2020 05:01:04 -0700 (PDT) Received: from localhost ([::1]:37874 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWfD4-0007qm-UD for importer@patchew.org; Thu, 07 May 2020 08:01:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWfAR-0006Iv-DE for qemu-devel@nongnu.org; Thu, 07 May 2020 07:58:19 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:20593 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jWfAP-0000ca-SB for qemu-devel@nongnu.org; Thu, 07 May 2020 07:58:19 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-346-GTWzWg6NMKK9aN9vBfPGPg-1; Thu, 07 May 2020 07:58:12 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CC67C64AD6; Thu, 7 May 2020 11:58:11 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.110.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id A740662A50; Thu, 7 May 2020 11:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588852695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=goQB+ZJ3KkFNo7UHqa0H+yx53cyZ067ag9jf2ms9rEU=; b=YXaZoKHokP6PAmCrpKAT2+hC4MsqUYNSbUX77ZtTJuboMCrC9Qvl7iT9ojcpZfxKXpRn+q P1ajqnugRLQ3oQrknclvurpxQdKJt4OzXHmy6XWRm1Ba1lvharRY6366CzWXUH0kUWYZD5 lJaTHsolDc6nbWBnXUbWKcu+Bmn9Y7A= X-MC-Unique: GTWzWg6NMKK9aN9vBfPGPg-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 2/5] crypto/secret: fix inconsequential errors. Date: Thu, 7 May 2020 12:58:00 +0100 Message-Id: <20200507115803.1122661-3-berrange@redhat.com> In-Reply-To: <20200507115803.1122661-1-berrange@redhat.com> References: <20200507115803.1122661-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=205.139.110.61; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/07 02:00:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Alexey Krasikov , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-block@nongnu.org, Max Reitz , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Alexey Krasikov Change condition from QCRYPTO_SECRET_FORMAT_RAW to QCRYPTO_SECRET_FORMAT_BASE64 in if-operator, because this is potential error if you add another format value. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Alexey Krasikov Signed-off-by: Daniel P. Berrang=C3=A9 --- crypto/secret.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/secret.c b/crypto/secret.c index 5fb6bbe59c..a846a3c87c 100644 --- a/crypto/secret.c +++ b/crypto/secret.c @@ -204,7 +204,7 @@ qcrypto_secret_prop_set_loaded(Object *obj, input =3D output; inputlen =3D outputlen; } else { - if (secret->format !=3D QCRYPTO_SECRET_FORMAT_RAW) { + if (secret->format =3D=3D QCRYPTO_SECRET_FORMAT_BASE64) { qcrypto_secret_decode(input, inputlen, &output, &outputlen, &local_err); g_free(input); --=20 2.26.2 From nobody Sun Feb 8 10:46:44 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588853010; cv=none; d=zohomail.com; s=zohoarc; b=IzVqmn2kPOwdAHq2avJXqDniVMl9EFtSqgxRfZnyIGNzbGxn4oB51FHypZ4EL7QoXBaAdVW667jG5WYNfLuKR9wIuzjxvXBI5PGF/dcEeZYq/c2MOk4aFsAK5+bQ+50msZmvnSQgNseYg1tSeZvs+qmvaNoHuk2qUx1K/lahTAQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588853010; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1NRWNcKPFy9Df1Gy2X+Mscu8LTbGBR6u2xRaT1BtAKk=; b=cet3qpXYJTAG8zUny6MgWm5KZWWJ+1PSJ478X20oCheA2SRUB4BzlGrY5poKjmejapdJ+XcBGQY6W3NUoYXGs9zgYhgknNCUdizCIYAE1OA/qWh+lD75JH2C9iV/9Hn4ezXI8SMpcPxEDL8BloGGVw3u21c00MVGBRMVdMPcxO4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588853010549198.70907371984333; Thu, 7 May 2020 05:03:30 -0700 (PDT) Received: from localhost ([::1]:44182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWfFR-0002LW-7M for importer@patchew.org; Thu, 07 May 2020 08:03:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37220) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWfAS-0006KY-BE for qemu-devel@nongnu.org; Thu, 07 May 2020 07:58:20 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:52945 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jWfAR-0000hp-6L for qemu-devel@nongnu.org; Thu, 07 May 2020 07:58:20 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-259-W9tVPc6_Po67XEJQwxZz_w-1; Thu, 07 May 2020 07:58:16 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ACAEB107ACF4; Thu, 7 May 2020 11:58:14 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.110.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3896962A9D; Thu, 7 May 2020 11:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588852698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1NRWNcKPFy9Df1Gy2X+Mscu8LTbGBR6u2xRaT1BtAKk=; b=RHIlbhupq/Z3WLNdNDrXcGHPxTQlc8WQ8dkKaxe38lAr3ON1r57ubQTUYjeL1D2d//P/qW RmeRzvOxXra/6qvuGkK/XED4gLkSL42eoFhAWIb2QGIXK0MuoK0zP6xhcY6Y9c7/J+kXBB 566iW9q0gjRDoaGQKXumKCvgmkv07HQ= X-MC-Unique: W9tVPc6_Po67XEJQwxZz_w-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 3/5] crypto: Redundant type conversion for AES_KEY pointer Date: Thu, 7 May 2020 12:58:01 +0100 Message-Id: <20200507115803.1122661-4-berrange@redhat.com> In-Reply-To: <20200507115803.1122661-1-berrange@redhat.com> References: <20200507115803.1122661-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=207.211.31.81; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/07 00:55:34 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-block@nongnu.org, Max Reitz , Euler Robot , Chen Qun Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Chen Qun We can delete the redundant type conversion if we set the the AES_KEY parameter with 'const' in qcrypto_cipher_aes_ecb_(en|de)crypt() function. Reported-by: Euler Robot Signed-off-by: Chen Qun Signed-off-by: Daniel P. Berrang=C3=A9 --- crypto/cipher-builtin.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c index bf8413e71a..35cf7820d9 100644 --- a/crypto/cipher-builtin.c +++ b/crypto/cipher-builtin.c @@ -74,7 +74,7 @@ static void qcrypto_cipher_free_aes(QCryptoCipher *cipher) } =20 =20 -static void qcrypto_cipher_aes_ecb_encrypt(AES_KEY *key, +static void qcrypto_cipher_aes_ecb_encrypt(const AES_KEY *key, const void *in, void *out, size_t len) @@ -100,7 +100,7 @@ static void qcrypto_cipher_aes_ecb_encrypt(AES_KEY *key, } =20 =20 -static void qcrypto_cipher_aes_ecb_decrypt(AES_KEY *key, +static void qcrypto_cipher_aes_ecb_decrypt(const AES_KEY *key, const void *in, void *out, size_t len) @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *= ctx, { const QCryptoCipherBuiltinAESContext *aesctx =3D ctx; =20 - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc, - src, dst, length); + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length); } =20 =20 @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *= ctx, { const QCryptoCipherBuiltinAESContext *aesctx =3D ctx; =20 - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec, - src, dst, length); + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length); } =20 =20 --=20 2.26.2 From nobody Sun Feb 8 10:46:44 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588853017; cv=none; d=zohomail.com; s=zohoarc; b=mL8aQyJk+q+a+BvypR11f1GZ9Zcb5k7yde1lCPoTI1D6VxNPth82kaS6heez8PcZSQCY0Wtn0wD9ZPCQAgb9b+p7n7NyZA72iXRvxjVqFq/QeNaIY++0EnZq5H+DA55r7Wfgh4veq+4vu4uaQ1loUJxbaUrTMuxOMb6vAyukwYU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588853017; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=cnNQxNLTG/MaX3sowSlZFtncWas/A5GCzE/ggA+m9dY=; b=hio3m2OWSL/lMgokmXmFDUM8zDKJrPE6JboCOczcJAcLnfj89yQqVeblvsMCbn+kc5PVuRaHKKTPZBIdwTjR2Jz4n2igxIrm2ePT46VjIcfPi4q2EK3JqRwi+GkajpmP/dFeqikL2ACF6BRg8kLyCReOHgQMf2OYhKMafobdT4I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588853017920973.8595917829939; Thu, 7 May 2020 05:03:37 -0700 (PDT) Received: from localhost ([::1]:44676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWfFY-0002Xr-Jx for importer@patchew.org; Thu, 07 May 2020 08:03:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37264) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWfAU-0006Og-9v for qemu-devel@nongnu.org; Thu, 07 May 2020 07:58:22 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:56592 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jWfAT-00010T-9o for qemu-devel@nongnu.org; Thu, 07 May 2020 07:58:21 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-182-H6U4Sve5NBOKm5W_JBFdwA-1; Thu, 07 May 2020 07:58:17 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B6D5D18FE864; Thu, 7 May 2020 11:58:16 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.110.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3FCAD62A42; Thu, 7 May 2020 11:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588852700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cnNQxNLTG/MaX3sowSlZFtncWas/A5GCzE/ggA+m9dY=; b=NqZQkYSXEXHz5VfHt/Ao8swzYslKwZweZStWaNHQhUbqzNHv1UjGOkwCjoYgz1Pj/y8ZyO OKuvU2RMnJ1J5pG4wwvtz+ArDv10GJBCVN07zLSszysaneCXScouxafVB06f255bjes23L cez0WdlPYC/Ovge6QokpMeXnO98hjUQ= X-MC-Unique: H6U4Sve5NBOKm5W_JBFdwA-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 4/5] block: luks: better error message when creating too large files Date: Thu, 7 May 2020 12:58:02 +0100 Message-Id: <20200507115803.1122661-5-berrange@redhat.com> In-Reply-To: <20200507115803.1122661-1-berrange@redhat.com> References: <20200507115803.1122661-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=205.139.110.61; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/07 02:00:54 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] 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, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Maxim Levitsky , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Maxim Levitsky Currently if you attampt to create too large file with luks you get the following error message: Formatting 'test.luks', fmt=3Dluks size=3D17592186044416 key-secret=3Dsec0 qemu-img: test.luks: Could not resize file: File too large While for raw format the error message is qemu-img: test.img: The image size is too large for file format 'raw' The reason for this is that qemu-img checks for errono of the failure, and presents the later error when it is -EFBIG However crypto generic code 'swallows' the errno and replaces it with -EIO. As an attempt to make it better, we can make luks driver, detect -EFBIG and in this case present a better error message, which is what this patch does The new error message is: qemu-img: error creating test.luks: The requested file size is too large Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=3D1534898 Signed-off-by: Maxim Levitsky Signed-off-by: Daniel P. Berrang=C3=A9 --- block/crypto.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/block/crypto.c b/block/crypto.c index ca44dae4f7..6b21d6bf6c 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -104,18 +104,35 @@ static ssize_t block_crypto_init_func(QCryptoBlock *b= lock, Error **errp) { struct BlockCryptoCreateData *data =3D opaque; + Error *local_error =3D NULL; + int ret; =20 if (data->size > INT64_MAX || headerlen > INT64_MAX - data->size) { - error_setg(errp, "The requested file size is too large"); - return -EFBIG; + ret =3D -EFBIG; + goto error; } =20 /* User provided size should reflect amount of space made * available to the guest, so we must take account of that * which will be used by the crypto header */ - return blk_truncate(data->blk, data->size + headerlen, false, - data->prealloc, 0, errp); + ret =3D blk_truncate(data->blk, data->size + headerlen, false, + data->prealloc, 0, &local_error); + + if (ret >=3D 0) { + return ret; + } + +error: + if (ret =3D=3D -EFBIG) { + /* Replace the error message with a better one */ + error_free(local_error); + error_setg(errp, "The requested file size is too large"); + } else { + error_propagate(errp, local_error); + } + + return ret; } =20 =20 --=20 2.26.2 From nobody Sun Feb 8 10:46:44 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1588853021; cv=none; d=zohomail.com; s=zohoarc; b=cXIMf1tl6ldi6XoJnUU9/PE6dKOvJYjtbTkZWc0iDdOwC5BqpGyg2anI670krtL0CHgenLlSoTEJb9pP4oAdqGrrno61LjQTsw9HtifPinr7+K0mA1CO3436jt8pOdhDqtqQuFX+8onoUxiEeVgxNbJVCIZIPmRLvo5biljCYpI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588853021; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OU0ohFscvXTx3pz4sXQvULRVgv4Z9aSgJ+wX8ckL0NA=; b=BP7WeFC0zx+nWPBstIucZ1pkyw113rYXF3eENb+KFSMSy5jupOViiFEGOaEHUoqkZ9lunSfzg7nL7JjJLJ+zJYSO828jgwaqb/a55vSKXUSYlTDv5Xx8CV8wIpkn2qYYx1sU9xEqyAjnJ+gmRfgHiKpm0iQRQAuvxj4MI5dl9ts= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1588853021148290.99411170609824; Thu, 7 May 2020 05:03:41 -0700 (PDT) Received: from localhost ([::1]:44960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jWfFb-0002eu-Ol for importer@patchew.org; Thu, 07 May 2020 08:03:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37300) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jWfAV-0006Rl-M9 for qemu-devel@nongnu.org; Thu, 07 May 2020 07:58:23 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:52296 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jWfAU-00017m-Pl for qemu-devel@nongnu.org; Thu, 07 May 2020 07:58:23 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-245-FDvDB7RWNYOv7TQwmmwM9A-1; Thu, 07 May 2020 07:58:19 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E1B841005510; Thu, 7 May 2020 11:58:18 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.36.110.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B87362A9D; Thu, 7 May 2020 11:58:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1588852701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OU0ohFscvXTx3pz4sXQvULRVgv4Z9aSgJ+wX8ckL0NA=; b=fFnxzzPBCSKAtLTd9pCh6TkxetlQ7MBLAKKmq0xRXA5Rk08+xmC43TM3fLcmQbUhNXUJTY sCpBnh2tblSkXWsVmM9m1KUX9VKl/Z/OIWIPkpkq2+TZrpmBE5zAs9lMrxPZFV7YwKdIpL 2sbzF0iD12fWf6dB3WOejXFN/v82Hpo= X-MC-Unique: FDvDB7RWNYOv7TQwmmwM9A-1 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 5/5] crypto: extend hash benchmark to cover more algorithms Date: Thu, 7 May 2020 12:58:03 +0100 Message-Id: <20200507115803.1122661-6-berrange@redhat.com> In-Reply-To: <20200507115803.1122661-1-berrange@redhat.com> References: <20200507115803.1122661-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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=207.211.31.120; envelope-from=berrange@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/07 03:56:18 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] 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, DKIMWL_WL_HIGH=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , qemu-block@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Extend the hash benchmark so that it can validate all algorithms supported by QEMU instead of being limited to sha256. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrang=C3=A9 --- tests/benchmark-crypto-hash.c | 73 ++++++++++++++++++++++++++++------- 1 file changed, 59 insertions(+), 14 deletions(-) diff --git a/tests/benchmark-crypto-hash.c b/tests/benchmark-crypto-hash.c index 7f659f7323..d16837d00a 100644 --- a/tests/benchmark-crypto-hash.c +++ b/tests/benchmark-crypto-hash.c @@ -15,9 +15,14 @@ #include "crypto/init.h" #include "crypto/hash.h" =20 +typedef struct QCryptoHashOpts { + size_t chunk_size; + QCryptoHashAlgorithm alg; +} QCryptoHashOpts; + static void test_hash_speed(const void *opaque) { - size_t chunk_size =3D (size_t)opaque; + const QCryptoHashOpts *opts =3D opaque; uint8_t *in =3D NULL, *out =3D NULL; size_t out_len =3D 0; const size_t total =3D 2 * GiB; @@ -25,26 +30,24 @@ static void test_hash_speed(const void *opaque) struct iovec iov; int ret; =20 - in =3D g_new0(uint8_t, chunk_size); - memset(in, g_test_rand_int(), chunk_size); + in =3D g_new0(uint8_t, opts->chunk_size); + memset(in, g_test_rand_int(), opts->chunk_size); =20 iov.iov_base =3D (char *)in; - iov.iov_len =3D chunk_size; + iov.iov_len =3D opts->chunk_size; =20 g_test_timer_start(); remain =3D total; while (remain) { - ret =3D qcrypto_hash_bytesv(QCRYPTO_HASH_ALG_SHA256, + ret =3D qcrypto_hash_bytesv(opts->alg, &iov, 1, &out, &out_len, NULL); g_assert(ret =3D=3D 0); =20 - remain -=3D chunk_size; + remain -=3D opts->chunk_size; } g_test_timer_elapsed(); =20 - g_print("sha256: "); - g_print("Hash %zu GB chunk size %zu bytes ", total / GiB, chunk_size); g_print("%.2f MB/sec ", (double)total / MiB / g_test_timer_last()); =20 g_free(out); @@ -53,17 +56,59 @@ static void test_hash_speed(const void *opaque) =20 int main(int argc, char **argv) { - size_t i; char name[64]; =20 g_test_init(&argc, &argv, NULL); g_assert(qcrypto_init(NULL) =3D=3D 0); =20 - for (i =3D 512; i <=3D 64 * KiB; i *=3D 2) { - memset(name, 0 , sizeof(name)); - snprintf(name, sizeof(name), "/crypto/hash/speed-%zu", i); - g_test_add_data_func(name, (void *)i, test_hash_speed); - } +#define TEST_ONE(a, c) \ + QCryptoHashOpts opts ## a ## c =3D { \ + .alg =3D QCRYPTO_HASH_ALG_ ## a, .chunk_size =3D c, \ + }; \ + memset(name, 0 , sizeof(name)); \ + snprintf(name, sizeof(name), \ + "/crypto/benchmark/hash/%s/bufsize-%d", \ + QCryptoHashAlgorithm_str(QCRYPTO_HASH_ALG_ ## a), \ + c); \ + if (qcrypto_hash_supports(QCRYPTO_HASH_ALG_ ## a)) \ + g_test_add_data_func(name, \ + &opts ## a ## c, \ + test_hash_speed); + + TEST_ONE(MD5, 512); + TEST_ONE(MD5, 1024); + TEST_ONE(MD5, 4096); + TEST_ONE(MD5, 16384); + + TEST_ONE(SHA1, 512); + TEST_ONE(SHA1, 1024); + TEST_ONE(SHA1, 4096); + TEST_ONE(SHA1, 16384); + + TEST_ONE(SHA224, 512); + TEST_ONE(SHA224, 1024); + TEST_ONE(SHA224, 4096); + TEST_ONE(SHA224, 16384); + + TEST_ONE(SHA384, 512); + TEST_ONE(SHA384, 1024); + TEST_ONE(SHA384, 4096); + TEST_ONE(SHA384, 16384); + + TEST_ONE(SHA256, 512); + TEST_ONE(SHA256, 1024); + TEST_ONE(SHA256, 4096); + TEST_ONE(SHA256, 16384); + + TEST_ONE(SHA512, 512); + TEST_ONE(SHA512, 1024); + TEST_ONE(SHA512, 4096); + TEST_ONE(SHA512, 16384); + + TEST_ONE(RIPEMD160, 512); + TEST_ONE(RIPEMD160, 1024); + TEST_ONE(RIPEMD160, 4096); + TEST_ONE(RIPEMD160, 16384); =20 return g_test_run(); } --=20 2.26.2