@@ -96,7 +96,17 @@ private FulcioVerifier(
9696
9797 @ VisibleForTesting
9898 void verifySct (CertPath fullCertPath ) throws FulcioVerificationException {
99- if (ctLogs .size () == 0 ) {
99+ verifySct (fullCertPath , CTLogOptions .builder ().isEnabled (true ).build ());
100+ }
101+
102+ @ VisibleForTesting
103+ void verifySct (CertPath fullCertPath , CTLogOptions ctLogOptions )
104+ throws FulcioVerificationException {
105+ if (ctLogs .isEmpty ()) {
106+ // Only when there are no CT Logs (private deployment) we can skip SCT verification
107+ if (!ctLogOptions .isEnabled ()) {
108+ return ;
109+ }
100110 throw new FulcioVerificationException ("No ct logs were provided to verifier" );
101111 }
102112
@@ -155,16 +165,13 @@ public void verifySigningCertificate(CertPath signingCertificate)
155165 }
156166
157167 /**
158- * Verify a signing certificate, applying the given certificate-transparency policy. When SCT
159- * verification is disabled (ex: a private deployment without CT logs) the SCT check is skipped .
168+ * Verify a signing certificate, applying the given certificate-transparency policy (see {@link
169+ * #verifySct(CertPath, CTLogOptions)}) .
160170 */
161171 public void verifySigningCertificate (CertPath signingCertificate , CTLogOptions ctLogOptions )
162172 throws FulcioVerificationException , IOException {
163173 CertPath fullCertPath = validateCertPath (signingCertificate );
164- if (!ctLogOptions .isEnabled ()) {
165- return ;
166- }
167- verifySct (fullCertPath );
174+ verifySct (fullCertPath , ctLogOptions );
168175 }
169176
170177 public CertPath trimTrustedParent (CertPath signingCertificate )
0 commit comments