< prev index next >
src/java.base/share/classes/sun/security/provider/certpath/PKIXMasterCertPathValidator.java
Print this page
*** 23,32 ****
--- 23,34 ----
* questions.
*/
package sun.security.provider.certpath;
+ import jdk.internal.event.CertificateChainEvent;
+ import jdk.internal.event.EventHelper;
import sun.security.util.Debug;
import java.util.Collections;
import java.util.List;
import java.util.Set;
*** 34,43 ****
--- 36,46 ----
import java.security.cert.CertPath;
import java.security.cert.CertPathValidatorException;
import java.security.cert.PKIXCertPathChecker;
import java.security.cert.PKIXReason;
import java.security.cert.X509Certificate;
+ import java.util.stream.Collectors;
/**
* This class is initialized with a list of <code>PKIXCertPathChecker</code>s
* and is used to verify the certificates in a <code>CertPath</code> by
* feeding each certificate to each <code>PKIXCertPathChecker</code>.
*** 142,151 ****
--- 145,162 ----
PKIXReason.UNRECOGNIZED_CRIT_EXT);
}
if (debug != null)
debug.println("\ncert" + (i+1) + " validation succeeded.\n");
+
+ CertificateChainEvent cce = new CertificateChainEvent();
+ if(cce.isEnabled() || EventHelper.isLoggingSecurity()) {
+ String c = reversedCertList.stream()
+ .map(x -> x.getSerialNumber().toString(16))
+ .collect(Collectors.joining(", "));
+ EventHelper.commitCertChainEvent(cce, c);
+ }
}
if (debug != null) {
debug.println("Cert path validation succeeded. (PKIX validation "
+ "algorithm)");
< prev index next >