From patchwork Tue Oct 20 07:34:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin Labbe X-Patchwork-Id: 7442571 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9C1C4BEEA4 for ; Tue, 20 Oct 2015 07:34:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1980206BE for ; Tue, 20 Oct 2015 07:34:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E36E420680 for ; Tue, 20 Oct 2015 07:34:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753020AbbJTHeZ (ORCPT ); Tue, 20 Oct 2015 03:34:25 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38703 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753007AbbJTHeY (ORCPT ); Tue, 20 Oct 2015 03:34:24 -0400 Received: by wicll6 with SMTP id ll6so14598272wic.1; Tue, 20 Oct 2015 00:34:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZvT5MZuNgu2o4W/Mvq+o7c0MYz6wp+rjWsMUOaHjwiQ=; b=EDG4a2Myh5DvtOE4NQO7PL81phS2OXRxczmGqB3lhpfvtX6ddyElw32sw3kz6gsY/Q VKyWuXu4wdidiq7M/HgFA7wdI+NHNVgLzItBIUcn2MJg2zV3JQ4a1TrW/szjlqX1FXPl P+auekyaA3HaT6uEQIZJMpKGT23gYOEXIcvGAX1dI0ypdUukRo40xLjnWMWtV3GX+sl9 PeZ032Q+bPKf3GFp+CUBiSzFBtu1PTfJ7Ou6aa/K72zjnhxUSDCQwIg1ukabGzpOLnPY Xz1AlJDFMk4nPnwke6XVzebWRMOm5QQ03NOaPQcwmqaihcn2Bvekd0JS1j1G/x0ZSH9O hNMg== X-Received: by 10.180.24.71 with SMTP id s7mr1170116wif.14.1445326462874; Tue, 20 Oct 2015 00:34:22 -0700 (PDT) Received: from Red.local (ANice-651-1-191-74.w83-197.abo.wanadoo.fr. [83.197.127.74]) by smtp.googlemail.com with ESMTPSA id q1sm2006209wje.39.2015.10.20.00.34.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Oct 2015 00:34:22 -0700 (PDT) From: LABBE Corentin To: davem@davemloft.net, herbert@gondor.apana.org.au Cc: LABBE Corentin , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 6/8] crypto: akcipher: the key parameter must be const u8 * Date: Tue, 20 Oct 2015 09:34:02 +0200 Message-Id: <1445326444-11019-7-git-send-email-clabbe.montjoie@gmail.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1445326444-11019-1-git-send-email-clabbe.montjoie@gmail.com> References: <1445326444-11019-1-git-send-email-clabbe.montjoie@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All cryptoAPI setkey function set the key parameter as const u8 *. This patch make the crypto_akcipher_setkey parameters like others. Signed-off-by: LABBE Corentin --- include/crypto/akcipher.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/crypto/akcipher.h b/include/crypto/akcipher.h index 0c9fa68..ade053b 100644 --- a/include/crypto/akcipher.h +++ b/include/crypto/akcipher.h @@ -330,7 +330,8 @@ static inline int crypto_akcipher_verify(struct akcipher_request *req) * * Return: zero on success; error code in case of error */ -static inline int crypto_akcipher_setkey(struct crypto_akcipher *tfm, void *key, +static inline int crypto_akcipher_setkey(struct crypto_akcipher *tfm, + const u8 *key, unsigned int keylen) { struct akcipher_alg *alg = crypto_akcipher_alg(tfm);