From patchwork Thu Aug 25 11:02:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Brunner X-Patchwork-Id: 1096062 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7PB2rI0027148 for ; Thu, 25 Aug 2011 11:04:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753143Ab1HYLEA (ORCPT ); Thu, 25 Aug 2011 07:04:00 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:45277 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753035Ab1HYLD7 (ORCPT ); Thu, 25 Aug 2011 07:03:59 -0400 Received: by bke11 with SMTP id 11so1624173bke.19 for ; Thu, 25 Aug 2011 04:03:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=waZYPoOwoaL6bxYPhEUnFZ2M8+scFzyEjBArExONfzc=; b=FYYV3QZi10lcIeAKkvnLOKVvfc1OmE9YmVe527mzAXD/TQNshAo35P1fpVvlBAWIA7 97Lz2/1pVyIVWye2wb5lJ/gXhjaELngpzPEF9VSVuHnK/p6nZ6Dj3mB5qzkCK4pUywrj 0nBbFfskwSsUEqkjiCyS/2fZT6eUHSJOXA1cs= Received: by 10.204.136.142 with SMTP id r14mr2834330bkt.8.1314270238451; Thu, 25 Aug 2011 04:03:58 -0700 (PDT) Received: from sir.fritz.box (e181013116.adsl.alicedsl.de [85.181.13.116]) by mx.google.com with ESMTPS id e21sm139099bkw.56.2011.08.25.04.03.57 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 25 Aug 2011 04:03:57 -0700 (PDT) Date: Thu, 25 Aug 2011 13:02:31 +0200 From: Christian Brunner To: ceph-devel@vger.kernel.org Subject: [PATCH 1/2] extended crypto classes Message-ID: <20110825110231.GA6517@sir.fritz.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 25 Aug 2011 11:04:01 +0000 (UTC) This patch extends the ceph crypto classes: - map CryptoPP::HashTransformation to ceph::crypto::Digest (for cryptopp) - add DigestSize() to ceph::crypto::Digest (for libnss) Thanks, Christian --- src/common/ceph_crypto.h | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/common/ceph_crypto.h b/src/common/ceph_crypto.h index 23a0589..7082317 100644 --- a/src/common/ceph_crypto.h +++ b/src/common/ceph_crypto.h @@ -11,6 +11,7 @@ #ifdef USE_CRYPTOPP # define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1 #include +# include # include # include # include @@ -32,6 +33,8 @@ namespace ceph { } ~HMACSHA1(); }; + + class Digest : public CryptoPP::HashTransformation { }; } } #elif USE_NSS @@ -86,6 +89,9 @@ namespace ceph { assert(dummy == digest_size); Restart(); } + size_t DigestSize() { + return digest_size; + } }; class MD5 : public Digest { public: