From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1huajU-0000bs-Kt for barebox@lists.infradead.org; Mon, 05 Aug 2019 11:00:54 +0000 Message-ID: <1565002851.2323.7.camel@pengutronix.de> From: Lucas Stach Date: Mon, 05 Aug 2019 13:00:51 +0200 In-Reply-To: <7c96c0b967c09a1ba065d464586cecd9a82b2032.1564997015.git-series.r.czerwinski@pengutronix.de> References: <7c96c0b967c09a1ba065d464586cecd9a82b2032.1564997015.git-series.r.czerwinski@pengutronix.de> Mime-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH v2 10/16] pbl: add sha256 and piggy verification to PBL To: Rouven Czerwinski , barebox@lists.infradead.org QW0gTW9udGFnLCBkZW4gMDUuMDguMjAxOSwgMTE6MjMgKzAyMDAgc2NocmllYiBSb3V2ZW4gQ3pl cndpbnNraToKPiBFeHRyYWN0IHRoZSBuZWNlc3NhcnkgZnVuY3Rpb25zIGZyb20gc2hhMjU2IGlu dG8gYSBQQkwgaGVhZGRlciBhbmQgYWRkIGEKPiB2ZXJpZmljYXRpb24gZnVuY3Rpb24gdG8gdGhl IFBCTC4gVGhlIGZ1bmN0aW9uIHdpbGwgYmUgY2FsbGVkIGJlZm9yZSB0aGUKPiBpbmRpdmlkdWFs IGFyY2hpdGVjdHVyZXMgZGVjb21wcmVzcyBmdW5jdGlvbnMgaXMgcnVuLgo+IAo+ID4gU2lnbmVk LW9mZi1ieTogUm91dmVuIEN6ZXJ3aW5za2kgPHIuY3plcndpbnNraUBwZW5ndXRyb25peC5kZT4K PiAtLS0KPiDCoGNyeXB0by9NYWtlZmlsZcK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