From patchwork Thu Nov 13 11:16:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laszlo Ersek X-Patchwork-Id: 40737 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8463D240ED for ; Thu, 13 Nov 2014 11:17:05 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id gq15sf8914297lab.2 for ; Thu, 13 Nov 2014 03:17:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:reply-to:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=6L3Kw9SMdFASJsc2vPkEqCsIA3Q30vYXw+L1CvP/2ks=; b=hEuhNMXHCr9UN1yCw67xe9iBIxmomkzAA6clxslX3k8Pt01x+/1Wq9nRsHGjZriht0 QIyNPl0zXry0vlj/qoW1TvNzk+f+2xem7m8i2Nx+MQtO3LJzTw1gmDArt/u1iiNsINqQ ZL1waXbnzz7KqO+fgKTQYyUggGE9zTdR4sZ+IpzajS3MTF839TgHlC8zTZ/xx6JRY7nf 71Rn3Np2Wk/4EmMudrG55YcyNBPPbvOPIxFQ/OZg4o6RGY8/uueT4RLq1jz80tE+xBQ3 CVmdbl+oXx9iWEZ0e+ILfPVU5ASE9F5yhJqdJLgldaQ+cmmIlErZyl+9r6x8Gwh4pNFO vhwg== X-Gm-Message-State: ALoCoQnazJrL6psOlBLMYGqL5DGIQeOlCD0VdIOKcWQyGD11/R9sB6ONhYoTBYqOAOr9BggI6Pu5 X-Received: by 10.152.37.37 with SMTP id v5mr176053laj.9.1415877424536; Thu, 13 Nov 2014 03:17:04 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.72 with SMTP id j8ls613192lag.105.gmail; Thu, 13 Nov 2014 03:17:04 -0800 (PST) X-Received: by 10.152.23.73 with SMTP id k9mr1882499laf.14.1415877424366; Thu, 13 Nov 2014 03:17:04 -0800 (PST) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id ky4si38147739lbc.28.2014.11.13.03.17.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 13 Nov 2014 03:17:04 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by mail-la0-f47.google.com with SMTP id gd6so12761030lab.6 for ; Thu, 13 Nov 2014 03:17:04 -0800 (PST) X-Received: by 10.112.235.196 with SMTP id uo4mr1794015lbc.66.1415877424273; Thu, 13 Nov 2014 03:17:04 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp572477lbc; Thu, 13 Nov 2014 03:17:03 -0800 (PST) X-Received: by 10.107.172.68 with SMTP id v65mr1882460ioe.60.1415877422835; Thu, 13 Nov 2014 03:17:02 -0800 (PST) Received: from lists.sourceforge.net (lists.sourceforge.net. [216.34.181.88]) by mx.google.com with ESMTPS id 9si23818661igs.34.2014.11.13.03.17.02 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 13 Nov 2014 03:17:02 -0800 (PST) Received-SPF: pass (google.com: domain of edk2-devel-bounces@lists.sourceforge.net designates 216.34.181.88 as permitted sender) client-ip=216.34.181.88; Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XosOU-0001xQ-Py; Thu, 13 Nov 2014 11:16:54 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1XosOT-0001x4-A7 for edk2-devel@lists.sourceforge.net; Thu, 13 Nov 2014 11:16:53 +0000 Received-SPF: pass (sog-mx-2.v43.ch3.sourceforge.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=lersek@redhat.com; helo=mx1.redhat.com; Received: from mx1.redhat.com ([209.132.183.28]) by sog-mx-2.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1XosOS-0008IX-AQ for edk2-devel@lists.sourceforge.net; Thu, 13 Nov 2014 11:16:53 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sADBGkf7013009 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 13 Nov 2014 06:16:46 -0500 Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-83.ams2.redhat.com [10.36.116.83]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sADBGTn4018997 for ; Thu, 13 Nov 2014 06:16:45 -0500 From: Laszlo Ersek To: edk2-devel@lists.sourceforge.net Date: Thu, 13 Nov 2014 12:16:24 +0100 Message-Id: <1415877385-18341-7-git-send-email-lersek@redhat.com> In-Reply-To: <1415877385-18341-1-git-send-email-lersek@redhat.com> References: <1415877385-18341-1-git-send-email-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Spam-Score: -2.5 (--) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-Headers-End: 1XosOS-0008IX-AQ Subject: [edk2] [PATCH v2 6/7] CryptoPkg: TimestampTokenVerify(): fix gcc-4.8 / Ia32 build failure X-BeenThere: edk2-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list Reply-To: edk2-devel@lists.sourceforge.net List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.sourceforge.net X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lersek@redhat.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 SVN r16339 ("CryptoPkg Updates to support RFC3161 timestamp signature verification.") introduced the following build failure: > CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c: In function > 'TimestampTokenVerify': > CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c:538:3: error: passing > argument 2 of 'd2i_TS_TST_INFO' from incompatible pointer type [-Werror] > TstInfo = d2i_TS_TST_INFO (NULL, &TstTemp, (int)TstSize); > ^ > In file included from CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c:22:0: > CryptoPkg/Include/openssl/asn1t.h:803:10: note: expected 'const unsigned > char **' but argument is of type 'UINT8 **' > stname *d2i_##fname(stname **a, const unsigned char **in, long len) \ > ^ > CryptoPkg/Include/openssl/asn1t.h:799:2: note: in expansion of macro > 'IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname' > IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \ > ^ > CryptoPkg/Include/openssl/asn1t.h:778:42: note: in expansion of macro > 'IMPLEMENT_ASN1_FUNCTIONS_fname' > #define IMPLEMENT_ASN1_FUNCTIONS(stname) > IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname) > ^ > CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c:136:1: note: in expansion of > macro 'IMPLEMENT_ASN1_FUNCTIONS' > IMPLEMENT_ASN1_FUNCTIONS (TS_TST_INFO) > ^ > cc1: all warnings being treated as errors Note that the cast (const unsigned char **) &TstTemp does not match the general edk2 coding style, but it *does* match other similar casts in this file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek --- CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c index 6cb12cc..e4b5a84 100644 --- a/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c +++ b/CryptoPkg/Library/BaseCryptLib/Pk/CryptTs.c @@ -535,7 +535,8 @@ TimestampTokenVerify ( // Construct TS_TST_INFO structure from the signed contents. // TstTemp = TstData; - TstInfo = d2i_TS_TST_INFO (NULL, &TstTemp, (int)TstSize); + TstInfo = d2i_TS_TST_INFO (NULL, (const unsigned char **) &TstTemp, + (int)TstSize); if (TstInfo == NULL) { goto _Exit; }