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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/SslValidityChecker.java

Issue 2815763002: Prevent usage of web payments API over insecure HTTPS. (Closed)
Patch Set: Self-review Created 3 years, 8 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/android/java/src/org/chromium/chrome/browser/payments/SslValidityChecker.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/SslValidityChecker.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/SslValidityChecker.java
new file mode 100644
index 0000000000000000000000000000000000000000..3cb6755532b5ca2240562f84aac69c1d16352590
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/SslValidityChecker.java
@@ -0,0 +1,26 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.payments;
+
+import org.chromium.base.annotations.JNINamespace;
+import org.chromium.content_public.browser.WebContents;
+
+/** SSL validity checker. */
+@JNINamespace("payments")
+public class SslValidityChecker {
+ /**
+ * Returns true for web contents with a valid SSL certificate.
+ *
+ * @param webContents The web contents to check.
+ * @return Whether the web contents have a valid SSL certificate.
+ */
+ public static boolean isValidSslCertificate(WebContents webContents) {
+ return nativeIsValidSslCertificate(webContents);
+ }
+
+ private SslValidityChecker() {}
+
+ private static native boolean nativeIsValidSslCertificate(WebContents webContents);
+}

Powered by Google App Engine
This is Rietveld 408576698