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

Unified Diff: chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java

Issue 2903743003: Remove command-line restriction for comment-signed WebApks. (Closed)
Patch Set: fix test Created 3 years, 7 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
« no previous file with comments | « chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java
diff --git a/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java b/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java
index 5077fd8189776c9d87f748de3c730faf00c4dbc6..f62054e97d86bc617fe921bee9646d6b23d24720 100644
--- a/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java
+++ b/chrome/android/webapk/libs/client/src/org/chromium/webapk/lib/client/WebApkValidator.java
@@ -39,7 +39,6 @@ public class WebApkValidator {
private static final String TAG = "WebApkValidator";
private static final String KEY_FACTORY = "EC"; // aka "ECDSA"
- private static boolean sAllWebApkPackageNames;
private static byte[] sExpectedSignature;
private static byte[] sCommentSignedPublicKeyBytes;
private static PublicKey sCommentSignedPublicKey;
@@ -192,10 +191,6 @@ public class WebApkValidator {
/** Verify that the comment signed webapk matches the public key. */
private static boolean verifyCommentSignedWebApk(
PackageInfo packageInfo, String webappPackageName) {
- if (!sAllWebApkPackageNames && !webappPackageName.startsWith(WEBAPK_PACKAGE_PREFIX)) {
- return false;
- }
-
PublicKey commentSignedPublicKey;
try {
commentSignedPublicKey = getCommentSignedPublicKey();
@@ -258,14 +253,11 @@ public class WebApkValidator {
/**
* Initializes the WebApkValidator.
- * @param allWebApkPackageNames Whether we permit any package names for comment signed WebAPKs.
* @param expectedSignature V1 WebAPK RSA signature.
* @param v2PublicKeyBytes New comment signed public key bytes as x509 encoded public key.
*/
@SuppressFBWarnings("EI_EXPOSE_STATIC_REP2")
- public static void init(
- boolean allWebApkPackageNames, byte[] expectedSignature, byte[] v2PublicKeyBytes) {
- sAllWebApkPackageNames = allWebApkPackageNames;
+ public static void init(byte[] expectedSignature, byte[] v2PublicKeyBytes) {
if (sExpectedSignature == null) {
sExpectedSignature = expectedSignature;
}
« no previous file with comments | « chrome/android/webapk/libs/client/junit/src/org/chromium/webapk/lib/client/WebApkValidatorTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698