Remove PolicyImpl minimumLogCount argument
The minimum log count depends on the certificate being validated. Move
the constant back into the implementation for now.
Bug: 319829948
Test: atest
Change-Id: Ia17ea616215fc20ef4dd86058ea38f8cdd18e717
diff --git a/platform/src/main/java/org/conscrypt/Platform.java b/platform/src/main/java/org/conscrypt/Platform.java
index cdb1049..2f4d14b 100644
--- a/platform/src/main/java/org/conscrypt/Platform.java
+++ b/platform/src/main/java/org/conscrypt/Platform.java
@@ -498,7 +498,7 @@
}
static Policy newDefaultPolicy(LogStore logStore) {
- return new PolicyImpl(logStore, 2);
+ return new PolicyImpl(logStore);
}
static boolean serverNamePermitted(SSLParametersImpl parameters, String serverName) {
diff --git a/platform/src/main/java/org/conscrypt/ct/PolicyImpl.java b/platform/src/main/java/org/conscrypt/ct/PolicyImpl.java
index c544f25..57a5a37 100644
--- a/platform/src/main/java/org/conscrypt/ct/PolicyImpl.java
+++ b/platform/src/main/java/org/conscrypt/ct/PolicyImpl.java
@@ -24,11 +24,9 @@
@Internal
public class PolicyImpl implements Policy {
private final LogStore logStore;
- private final int minimumLogCount;
- public PolicyImpl(LogStore logStore, int minimumLogCount) {
+ public PolicyImpl(LogStore logStore) {
this.logStore = logStore;
- this.minimumLogCount = minimumLogCount;
}
@Override
@@ -42,6 +40,6 @@
}
}
- return logSet.size() >= minimumLogCount;
+ return logSet.size() >= 2;
}
}
diff --git a/repackaged/platform/src/main/java/com/android/org/conscrypt/Platform.java b/repackaged/platform/src/main/java/com/android/org/conscrypt/Platform.java
index d4ab645..a510f5e 100644
--- a/repackaged/platform/src/main/java/com/android/org/conscrypt/Platform.java
+++ b/repackaged/platform/src/main/java/com/android/org/conscrypt/Platform.java
@@ -499,7 +499,7 @@
}
static Policy newDefaultPolicy(LogStore logStore) {
- return new PolicyImpl(logStore, 2);
+ return new PolicyImpl(logStore);
}
static boolean serverNamePermitted(SSLParametersImpl parameters, String serverName) {
diff --git a/repackaged/platform/src/main/java/com/android/org/conscrypt/ct/PolicyImpl.java b/repackaged/platform/src/main/java/com/android/org/conscrypt/ct/PolicyImpl.java
index 8bad047..afe9c6f 100644
--- a/repackaged/platform/src/main/java/com/android/org/conscrypt/ct/PolicyImpl.java
+++ b/repackaged/platform/src/main/java/com/android/org/conscrypt/ct/PolicyImpl.java
@@ -28,11 +28,9 @@
@Internal
public class PolicyImpl implements Policy {
private final LogStore logStore;
- private final int minimumLogCount;
- public PolicyImpl(LogStore logStore, int minimumLogCount) {
+ public PolicyImpl(LogStore logStore) {
this.logStore = logStore;
- this.minimumLogCount = minimumLogCount;
}
@Override
@@ -46,6 +44,6 @@
}
}
- return logSet.size() >= minimumLogCount;
+ return logSet.size() >= 2;
}
}