From patchwork Sat Apr 28 19:06:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 906177 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="AZSxCWzM"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40YKzs0knvz9s0w for ; Sun, 29 Apr 2018 05:07:05 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sjmfX7TLmzL8zCNtl8F4Qi4GGPlTpbTFkDggjw1Yf70=; b=AZSxCWzMBd2PK0 Cdf3ZolQO73cUfVmunEqILTWc0ci7mLhj9yHw0xgk3VyGmTTaDu5hAlc+fF7M9FYdKD3XxynE8WTW F6XtVdv/9fzIBri3jW8QK5MlywDE/dRAkyb7g5cJhuI2wk51JsitItaa52I/BgjwwtH6S2BNOd+vv IJtc7r3IKWuACaQ+ZQAsXnMNANrf/55EMMTr0kJ/IPd+g0Vp4dEE8xlqMlkb9MiQAWUtk6iKpGV3/ wThJPIU9TYCq8lC5cMP48AzcXzoX3Dx2dkGbkvwPRy531gqLftyBvyNOOpVprFD0hz5WykYhIWRKa Qw/O+KcWZDoYWLqP9+BA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fCVBQ-0000nU-Eh; Sat, 28 Apr 2018 19:06:56 +0000 Received: from fudo.makrotopia.org ([2a07:2ec0:3002::71]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fCVBN-0000lX-V7 for hostap@lists.infradead.org; Sat, 28 Apr 2018 19:06:55 +0000 Received: from local by fudo.makrotopia.org with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1fCVB7-0008Ae-RE; Sat, 28 Apr 2018 21:06:38 +0200 Date: Sat, 28 Apr 2018 21:06:32 +0200 From: Daniel Golle To: Sean Parkinson , Jouni Malinen , hostap@lists.infradead.org Subject: [PATCH] crypto/wolfssl: fix build Message-ID: <20180428190626.GA29778@makrotopia.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.5 (2018-04-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180428_120654_004152_2EC94897 X-CRM114-Status: UNSURE ( 8.72 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Replace non-existing config-symbol and fix variable-name typo which caused the build to fail with CONFIG_TLS=wolfssl. Signed-off-by: Daniel Golle --- src/crypto/crypto_wolfssl.c | 4 ++-- src/crypto/tls_wolfssl.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/crypto/crypto_wolfssl.c b/src/crypto/crypto_wolfssl.c index 90163c4f2..758bdbe1b 100644 --- a/src/crypto/crypto_wolfssl.c +++ b/src/crypto/crypto_wolfssl.c @@ -291,7 +291,7 @@ int pbkdf2_sha1(const char *passphrase, const u8 *ssid, size_t ssid_len, } -#ifdef CONFIG_DES +#ifndef CONFIG_INTERNAL_DES int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher) { Des des; @@ -312,7 +312,7 @@ int des_encrypt(const u8 *clear, const u8 *key, u8 *cypher) return 0; } -#endif /* CONFIG_DES */ +#endif /* !CONFIG_INTERNAL_DES */ void * aes_encrypt_init(const u8 *key, size_t len) diff --git a/src/crypto/tls_wolfssl.c b/src/crypto/tls_wolfssl.c index b7c452ec5..beda728a6 100644 --- a/src/crypto/tls_wolfssl.c +++ b/src/crypto/tls_wolfssl.c @@ -2037,14 +2037,14 @@ static int tls_sess_sec_cb(WOLFSSL *s, void *secret, int *secret_len, void *arg) sizeof(client_random)) == 0 || wolfSSL_get_server_random(s, server_random, sizeof(server_random)) == 0 || - wolfSSL_get_SessionTicket(s, conn->session_ticket, &ticketLen) != 1) + wolfSSL_get_SessionTicket(s, conn->session_ticket, &ticket_len) != 1) return 1; if (ticket_len == 0) return 0; ret = conn->session_ticket_cb(conn->session_ticket_cb_ctx, - conn->session_ticket, ticketLen, + conn->session_ticket, ticket_len, client_random, server_random, secret); if (ret <= 0) return 1;