Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3895,7 +3895,13 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kLongPressBackForHistoryName,
flag_descriptions::kLongPressBackForHistoryDescription, kOsAndroid,
FEATURE_VALUE_TYPE(chrome::android::kLongPressBackForHistory)},

{"use-client-cert",
flag_descriptions::kUseClientCertName,
flag_descriptions::kUseClientCertDescription, kOsAndroid,
FEATURE_VALUE_TYPE(chrome::android::kUseClientCert)},
#endif

// NOTE: Adding a new flag requires adding a corresponding entry to enum
// "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
// Histograms" in tools/metrics/histograms/README.md (run the
Expand Down
3 changes: 3 additions & 0 deletions chrome/browser/android/chrome_feature_list.cc
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,9 @@ const base::Feature kTabReparenting{"TabReparenting",
const base::Feature kTrustedWebActivity{"TrustedWebActivity",
base::FEATURE_ENABLED_BY_DEFAULT};

const base::Feature kUseClientCert{"UseClientCertificates",
base::FEATURE_DISABLED_BY_DEFAULT};

const base::Feature kUserMediaScreenCapturing{
"UserMediaScreenCapturing", base::FEATURE_DISABLED_BY_DEFAULT};

Expand Down
1 change: 1 addition & 0 deletions chrome/browser/android/chrome_feature_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ extern const base::Feature kSpecialLocaleWrapper;
extern const base::Feature kTabModalJsDialog;
extern const base::Feature kTabReparenting;
extern const base::Feature kTrustedWebActivity;
extern const base::Feature kUseClientCert;
extern const base::Feature kUserMediaScreenCapturing;
extern const base::Feature kVideoPersistence;
extern const base::Feature kVrBrowsingFeedback;
Expand Down
18 changes: 11 additions & 7 deletions chrome/browser/chrome_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@
#include "base/android/application_status_listener.h"
#include "chrome/browser/android/app_hooks.h"
#include "chrome/browser/android/chrome_context_util.h"
#include "chrome/browser/android/chrome_feature_list.h"
#include "chrome/browser/android/devtools_manager_delegate_android.h"
#include "chrome/browser/android/download/intercept_oma_download_navigation_throttle.h"
#include "chrome/browser/android/ntp/new_tab_page_url_handler.h"
Expand Down Expand Up @@ -2577,14 +2578,17 @@ void ChromeContentBrowserClient::SelectClientCertificate(
prerender::FINAL_STATUS_SSL_CLIENT_CERTIFICATE_REQUESTED);
return;
}
if (true) {
LOG(WARNING) << "No client cert matched by policy and user selection is "
"not allowed.";
// Continue without client certificate. We do this to mimic the case of no
// client certificate being present in the profile's certificate store.
delegate->ContinueWithCertificate(nullptr, nullptr);
return;

#if defined(OS_ANDROID)
if (!base::FeatureList::IsEnabled(chrome::android::kUseClientCert)) {
LOG(WARNING) << "No client cert matched by policy and user selection is "
"not allowed.";
// Continue without client certificate. We do this to mimic the case of no
// client certificate being present in the profile's certificate store.
delegate->ContinueWithCertificate(nullptr, nullptr);
return;
}
#endif

GURL requesting_url("https://" + cert_request_info->host_and_port.ToString());
DCHECK(requesting_url.is_valid())
Expand Down
5 changes: 5 additions & 0 deletions chrome/browser/flag_descriptions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2404,6 +2404,11 @@ const char kSiteExplorationUiName[] = "Site Exploration UI";
const char kSiteExplorationUiDescription[] =
"Show site suggestions in the Exploration UI";

const char kUseClientCertName[] = "Use Client Certificates";
const char kUseClientCertDescription[] =
"When enabled, the system's client certificate selection dialog will be "
"shown when a https request requires client authentication";

const char kUpdateMenuBadgeName[] = "Force show update menu badge";
const char kUpdateMenuBadgeDescription[] =
"When enabled, an update badge will be shown on the app menu button.";
Expand Down
3 changes: 3 additions & 0 deletions chrome/browser/flag_descriptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,9 @@ extern const char kSimplifiedNtpDescription[];
extern const char kSiteExplorationUiName[];
extern const char kSiteExplorationUiDescription[];

extern const char kUseClientCertName[];
extern const char kUseClientCertDescription[];

extern const char kSpannableInlineAutocompleteName[];
extern const char kSpannableInlineAutocompleteDescription[];

Expand Down