From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoCDK-0002BR-2U for qemu-devel@nongnu.org; Mon, 19 Oct 2015 11:19:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoCDJ-0005LQ-C7 for qemu-devel@nongnu.org; Mon, 19 Oct 2015 11:19:06 -0400 References: <1445267389-21846-1-git-send-email-berrange@redhat.com> <1445267389-21846-2-git-send-email-berrange@redhat.com> From: Paolo Bonzini Message-ID: <562509E0.7060608@redhat.com> Date: Mon, 19 Oct 2015 17:18:56 +0200 MIME-Version: 1.0 In-Reply-To: <1445267389-21846-2-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/17] crypto: add QCryptoSecret object class for password/key handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Kevin Wolf , Josh Durgin , Stefan Hajnoczi , qemu-block@nongnu.org, Markus Armbruster , Ronnie Sahlberg On 19/10/2015 17:09, Daniel P. Berrange wrote: > + > + switch (secret->format) { > + case QCRYPTO_SECRET_FORMAT_UTF8: > + if (!g_utf8_validate(input, strlen(input), NULL)) { > + error_setg(errp, > + "Data from secret %s is not valid UTF-8", > + secretid); > + goto cleanup; > + } > + output = input; > + input = NULL; > + break; Why validate secrets as UTF-8? In other words why have "utf8" instead of "binary" as a possible QCryptoSecretFormat? Paolo