From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Dgp-0006jk-MZ for qemu-devel@nongnu.org; Mon, 22 Jun 2015 22:11:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7Dgj-0006V1-Ip for qemu-devel@nongnu.org; Mon, 22 Jun 2015 22:11:55 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:39713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7Dgj-0006Uc-12 for qemu-devel@nongnu.org; Mon, 22 Jun 2015 22:11:49 -0400 Message-ID: <5588C056.4020006@huawei.com> Date: Tue, 23 Jun 2015 10:11:34 +0800 From: Gonglei MIME-Version: 1.0 References: <1434646944-24040-1-git-send-email-berrange@redhat.com> <1434646944-24040-2-git-send-email-berrange@redhat.com> In-Reply-To: <1434646944-24040-2-git-send-email-berrange@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 01/10] crypto: introduce new module for computing hash digests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" , qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Gerd Hoffmann , Richard Henderson On 2015/6/19 1:02, Daniel P. Berrange wrote: > Introduce a new crypto/ directory that will (eventually) contain > all the cryptographic related code. This initially defines a > wrapper for initializing gnutls and for computing hashes with > gnutls. The former ensures that gnutls is guaranteed to be > initialized exactly once in QEMU regardless of CLI args. The > block quorum code currently fails to initialize gnutls so it > only works by luck, if VNC server TLS is not requested. The > hash APIs avoids the need to litter the rest of the code with > preprocessor checks and simplifies callers by allocating the > correct amount of memory for the requested hash. > > Signed-off-by: Daniel P. Berrange > --- > MAINTAINERS | 7 ++ > Makefile.objs | 1 + > configure | 46 +++++++++++ > crypto/Makefile.objs | 2 + > crypto/hash.c | 200 +++++++++++++++++++++++++++++++++++++++++++++ > crypto/init.c | 60 ++++++++++++++ > include/crypto/hash.h | 189 ++++++++++++++++++++++++++++++++++++++++++ > include/crypto/init.h | 29 +++++++ > tests/.gitignore | 1 + > tests/Makefile | 2 + > tests/test-crypto-hash.c | 209 +++++++++++++++++++++++++++++++++++++++++++++++ > vl.c | 7 ++ > 12 files changed, 753 insertions(+) > create mode 100644 crypto/Makefile.objs > create mode 100644 crypto/hash.c > create mode 100644 crypto/init.c > create mode 100644 include/crypto/hash.h > create mode 100644 include/crypto/init.h > create mode 100644 tests/test-crypto-hash.c Reviewed-by: Gonglei