Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4107)

Unified Diff: chrome/browser/chromeos/options/vpn_config_view.cc

Issue 16946002: Resolve certificate references in ONC by PEM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, added function comments. Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/options/vpn_config_view.cc
diff --git a/chrome/browser/chromeos/options/vpn_config_view.cc b/chrome/browser/chromeos/options/vpn_config_view.cc
index 089474995a7e6fe85b99f78ac6c909136273a4f9..f81d8b8b724a096537ab771e82c3453b143303d7 100644
--- a/chrome/browser/chromeos/options/vpn_config_view.cc
+++ b/chrome/browser/chromeos/options/vpn_config_view.cc
@@ -313,7 +313,7 @@ bool VPNConfigView::Login() {
config_data.group_name = GetGroupName();
break;
case PROVIDER_TYPE_L2TP_IPSEC_USER_CERT: {
- config_data.server_ca_cert_nss_nickname = GetServerCACertNssNickname();
+ config_data.server_ca_cert_fingerprint = GetServerCACertFingerprint();
config_data.client_cert_pkcs11_id = GetUserCertID();
config_data.username = GetUsername();
config_data.user_passphrase = GetUserPassphrase();
@@ -321,7 +321,7 @@ bool VPNConfigView::Login() {
break;
}
case PROVIDER_TYPE_OPEN_VPN:
- config_data.server_ca_cert_nss_nickname = GetServerCACertNssNickname();
+ config_data.server_ca_cert_fingerprint = GetServerCACertFingerprint();
config_data.client_cert_pkcs11_id = GetUserCertID();
config_data.username = GetUsername();
config_data.user_passphrase = GetUserPassphrase();
@@ -421,7 +421,7 @@ const std::string VPNConfigView::GetOTP() const {
return GetTextFromField(otp_textfield_, true);
}
-const std::string VPNConfigView::GetServerCACertNssNickname() const {
+const std::string VPNConfigView::GetServerCACertFingerprint() const {
int index = server_ca_cert_combobox_ ?
server_ca_cert_combobox_->selected_index() : 0;
if (index == 0) {
@@ -429,7 +429,7 @@ const std::string VPNConfigView::GetServerCACertNssNickname() const {
return std::string();
} else {
int cert_index = index - 1;
- return CertLibrary::Get()->GetCertNicknameAt(
+ return CertLibrary::Get()->GetCertFingerprintAt(
CertLibrary::CERT_TYPE_SERVER_CA, cert_index);
}
}
@@ -718,10 +718,10 @@ void VPNConfigView::Refresh() {
if (server_ca_cert_combobox_) {
server_ca_cert_combobox_->ModelChanged();
if (enable_server_ca_cert_ &&
- (vpn && !vpn->ca_cert_nss().empty())) {
+ (vpn && !vpn->ca_cert_fingerprint().empty())) {
// Select the current server CA certificate in the combobox.
- int cert_index = CertLibrary::Get()->GetCertIndexByNickname(
- CertLibrary::CERT_TYPE_SERVER_CA, vpn->ca_cert_nss());
+ int cert_index = CertLibrary::Get()->GetCertIndexByFingerprint(
+ CertLibrary::CERT_TYPE_SERVER_CA, vpn->ca_cert_fingerprint());
if (cert_index >= 0) {
// Skip item for "Default"
server_ca_cert_combobox_->SetSelectedIndex(1 + cert_index);

Powered by Google App Engine
This is Rietveld 408576698