Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2320010AEC for ; Thu, 23 Jan 2014 20:14:32 +0000 (UTC) Received: (qmail 55490 invoked by uid 500); 23 Jan 2014 20:14:31 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 55436 invoked by uid 500); 23 Jan 2014 20:14:31 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 55426 invoked by uid 99); 23 Jan 2014 20:14:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jan 2014 20:14:31 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tommy@devgeeks.org designates 209.85.160.45 as permitted sender) Received: from [209.85.160.45] (HELO mail-pb0-f45.google.com) (209.85.160.45) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Jan 2014 20:14:25 +0000 Received: by mail-pb0-f45.google.com with SMTP id un15so2288515pbc.32 for ; Thu, 23 Jan 2014 12:14:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:content-transfer-encoding:message-id:references:to; bh=Jhn7wao20tX414Lb3bmrLjbKNr36eaTXtmCnfgLdFSI=; b=iufXRy8wSnDrQqVpsgOhd/5I0o8A90YTzav/rbaopqi1N7w4zD3Q8ZJcxsso6cPdLZ t1tNE+LC/9Q/C5Owc4CzbZ7hEkLtI8RNU9wg4McpU7dsM3I+JqtRo+MV0L9rCG+RNVhM AIZSbxIB3rLKEjeBt5oglCKIDSbPaaVAgMcWfKX+hONq4cWYwwRcu2sAboCOfdpxKwqL NEd+NzVbASQPVEKAYMcNLPqNHHtccrcBbb9yoPsUxveC2moO9FD3MAHIgt49Ywzoslmz 4/fzqtcpKN85uXj+ysuMFDNLe4lKEL/Phj8hxx01tFuEtfjeotDA/mIjSLfj4at07Na5 Xbgw== X-Gm-Message-State: ALoCoQm1QJgBYH61qQgA8EW8ZW7o7uwEIrXqA2wOxUhPP5PUFMw49osNuhn613gvothqRxtOfEZk X-Received: by 10.68.229.164 with SMTP id sr4mr9962015pbc.82.1390508043654; Thu, 23 Jan 2014 12:14:03 -0800 (PST) Received: from [192.168.1.12] (CPE-121-219-13-150.lnse1.lon.bigpond.net.au. [121.219.13.150]) by mx.google.com with ESMTPSA id nv7sm40600242pbc.31.2014.01.23.12.13.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 23 Jan 2014 12:14:02 -0800 (PST) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: Adding SSL Certificate Pinning to Cordova From: Tommy-Carlos Williams In-Reply-To: Date: Fri, 24 Jan 2014 07:13:55 +1100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4C3AE595-7B77-4240-A364-2D1D8C3F4487@devgeeks.org> <466D534D-C4C2-4242-8E15-ECC08F3DFD2B@gmail.com> <0AC46520-9B83-4934-8E4B-BCEAC44F2DFE@devgeeks.org> To: dev@cordova.apache.org X-Mailer: Apple Mail (2.1827) X-Virus-Checked: Checked by ClamAV on apache.org Marcel, Are you saying that CordovaWebviewClient.onReceivedSslError can=92t get = the actual cert? Oh=85 the SslCertificate object returned by SslError.getCertificate is = mostly about the DN. *sigh* I=92ll have a look and see if I can come up with something. Back to the = proverbial. - tommy On 24 Jan 2014, at 4:34 am, Marcel Kinard wrote: > Although Moxie's point may be a bit radical, I think it is a valid = scenario. >=20 > It would be nice implement this. I'd even be willing to do it, since I = have a customer that wants this too. I'm familiar only with Android, but = I'm still struggling to see a way to do this there: the = CordovaWebViewClient.onReceivedSslError method will get called only for = self-signed certs (so it doesn't cover the full pinning scenario that = has a valid CA), but even if you are OK with that the cert data = available doesn't include the server's public key (the self DN and = issuer DN isn't authoritative enough to do the pin comparison). >=20 > If there are implementation alternatives I'm missing, I'm all ears. >=20 > On Jan 22, 2014, at 8:08 PM, Tommy-Carlos Williams = wrote: >=20 >> I am reconsidering the =93deal breaker=94 status of only working with = self-signed certs. >>=20 >> In one of the articles I have been using as a reference[1], Moxie = Marlinspike actually prefers the option of doing away with the CAs = entirely for mobile apps and doing exactly that[2]. >>=20 >> I can certainly think of a way that it would work better for our use = case. The only use case harmed would be wanting to pin the certs of = third party services like Parse, etc. >>=20 >> I guess it comes down to=85 is it better to do something for some = people than nothing for anyone. If it could be done in a way that only = impacted those that opted in, surely the former beats the latter. >>=20 >> - tommy >>=20 >>=20 >>=20 >> 1. = http://www.thoughtcrime.org/blog/authenticity-is-broken-in-ssl-but-your-ap= p-ha/ >> 2. = http://www.thoughtcrime.org/blog/authenticity-is-broken-in-ssl-but-your-ap= p-ha/#option_1_wipe_the_page_clean >=20