From patchwork Sun Jan 21 01:36:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Isaac Boukris X-Patchwork-Id: 863998 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=65.50.211.133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HwWNhU8Q"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="W2cmrB06"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 3zPHHf5fQdz9sP9 for ; Sun, 21 Jan 2018 12:37:34 +1100 (AEDT) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=AnSUEwxzEUNXZd9iA779CIbEhOxycDpV6Oe0PoTSge4=; b=HwW NhU8QFl89CpaEt2L43UpwiKBXTEtt9I+ZGYzx5z8ll1mvOb41rXJwx/Zv7orLamGTFXpDj0KpOJf8 r+0ootVKZWzPiIAHq45MSGoKgZOrSjEFveWT9ZiK7yF9kx60eQ+n6ooACeBQS8knxRiBQ+M/1QoDR ZkulCSXIXnVWT4BQ/X/juK/l0k6+069/iwYrHFBFyTnpz5/2lmUQePoQKTUt1Af9plb7KDd+dtoN9 tJmRZK4i7fqExuhlcrU9jQkjDllYIKwgwIDOgrkKHO5t7VF+iorn/5NZG0Kputwxm3OLipTofAA62 aXGUOeYKwEuUKOD7xyxCxiwOPltpS0Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ed4ZL-0000Fq-BO; Sun, 21 Jan 2018 01:37:11 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ed4ZG-0000Bw-HQ for hostap@lists.infradead.org; Sun, 21 Jan 2018 01:37:08 +0000 Received: by mail-wr0-x244.google.com with SMTP id 100so4923831wrb.7 for ; Sat, 20 Jan 2018 17:36:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=7Wa3U3xz/YF5pG0Q/ryqFlze9wlVgn3sfthLPDdR2w4=; b=W2cmrB06bc+idahaEq2SN5IheeJkvawvlC5n7ygtE7V8HhjF4lMT1AH6h8CoyYD663 XTjMmHMATXHQwD8/DvMpfv1dTrECPrPu5udNKi71onX5ypNa3C+VIDuMqKHg6+StQrXl T9ekEMso1MZCYvw4UW3sXSe0phBxqp2Ui8GHMmAZoeVxwT9u6SUngsWrkS/Lj1wR4Zu2 xmu+ypSqJ8CqezfZu5Omm7O3zOk5DrshWwCGmpaSBON5Ocz/OGr/VmOJ23k/KUM9Qjwv +T57Vl5vXSqKYk0lR02QRPBk3ZtbhmKxypQu7+nsPVqkgxLtFDlY5ziEqg6T+/ZsB5TP 26UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=7Wa3U3xz/YF5pG0Q/ryqFlze9wlVgn3sfthLPDdR2w4=; b=Ihqf5K8RvOWhU2eVSjtusxbtKFY6Y+BFaTt70C4aztVlyZmRhQOUq9wezgyLiZaIXK OEXIN9w0Qk3gojVWzvIfRW4O66JrSclFrmd14pEj58O4SBwUGRmGrJvoN3rUG7SdsagN KwHb9ew5sKThQgPsDalATF3OrkwQlWBHYQbY2XhXisWkelOR6hdJHEYGHl6cjxI1Tqj7 T1M4Ig5rc37Lk4PTVsgEDa5LQZlSfALbvjdTkRNnU9E8rKuOgihAHADszCzMD6Jm4GY5 My+gvDBLhd4GO+2JIlIPUE8uIXV3hOBSpsEv5YpS2aPsNVQXD3PzHWR9e5jspVz/byJz 933g== X-Gm-Message-State: AKwxytdghRVwUD7cUVUA8HvbW6hjeSgEoK9/irqHU7OArKvOy2XXpxbL j0mI8Q1Y8q0Qj0zQb7pjr+rJWoayVkU= X-Google-Smtp-Source: AH8x225QNVe9AYCVB46BDhqA4jmhWRX6dm/kbCoGse8wd10QSo6eAnrwfuN/wduTqXvib5T3cWWhfg== X-Received: by 10.223.190.4 with SMTP id n4mr2880076wrh.28.1516498613582; Sat, 20 Jan 2018 17:36:53 -0800 (PST) Received: from kdc.example.com ([212.83.158.2]) by smtp.gmail.com with ESMTPSA id z71sm27040678wrc.11.2018.01.20.17.36.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Jan 2018 17:36:52 -0800 (PST) From: Isaac Boukris To: hostap@lists.infradead.org Subject: [PATCH] TLS: Load chain certificates from client_cert file Date: Sun, 21 Jan 2018 01:36:44 +0000 Message-Id: <1516498604-20963-1-git-send-email-iboukris@gmail.com> X-Mailer: git-send-email 2.1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c0c:0:0:0:244 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (iboukris[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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: , Cc: Isaac Boukris MIME-Version: 1.0 Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This helps the server to build the chain to trusted CA. Signed-off-by: Isaac Boukris --- src/crypto/tls_openssl.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c index ce73848..3d789bb 100644 --- a/src/crypto/tls_openssl.c +++ b/src/crypto/tls_openssl.c @@ -2653,10 +2653,9 @@ static int tls_connection_client_cert(struct tls_connection *conn, return 0; } - if (SSL_use_certificate_file(conn->ssl, client_cert, - SSL_FILETYPE_PEM) == 1) { + if (SSL_use_certificate_chain_file(conn->ssl, client_cert) == 1) { ERR_clear_error(); - wpa_printf(MSG_DEBUG, "OpenSSL: SSL_use_certificate_file (PEM)" + wpa_printf(MSG_DEBUG, "OpenSSL: SSL_use_certificate_chain_file" " --> OK"); return 0; }