Migrate slot ID of client certs in network configuration.
commit56c6597c1201c3173fc225f1c3ae950de46c8340
authorpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 15 Aug 2014 23:21:51 +0000 (15 23:21 +0000)
committerpneubeck@chromium.org <pneubeck@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Fri, 15 Aug 2014 23:23:17 +0000 (15 23:23 +0000)
treef64cf822cd2b772082ff74bd8b0eb22b6ce41e4a
parentccb6d9236d5b610f061ad8a3eec227400c480f0a
Migrate slot ID of client certs in network configuration.

If a network was configured with a client certificate before R38, the slot ID will either be missing or not be valid in R38 and later because of the added device wide token.

This migration code will look up a configured client certificate by its PKCS#11 ID and update the slot id.
If the certificate can't be found, the client configuration will be removed in order to trigger a clean 'missing configuration' error in the UI.

This change is primarily targeted for manually configured networks and not policy-configured networks. The latter are automatically updated by the chromeos::ClientCertResolver.

BUG=403900

Review URL: https://codereview.chromium.org/471183002

Cr-Commit-Position: refs/heads/master@{#290044}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290044 0039d316-1c4b-4281-b951-d872f2087c98
chrome/browser/chromeos/options/wifi_config_view.cc
chromeos/dbus/fake_shill_manager_client.cc
chromeos/network/client_cert_util.cc
chromeos/network/client_cert_util.h
chromeos/network/network_cert_migrator.cc
chromeos/network/network_cert_migrator.h
chromeos/network/network_cert_migrator_unittest.cc