mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8292033: Move jdk.X509Certificate event logic to JCA layer
Reviewed-by: mullan
This commit is contained in:
parent
1b94ae13d3
commit
102b2b32fe
12 changed files with 186 additions and 88 deletions
|
@ -41,6 +41,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||
|
||||
import javax.security.auth.x500.X500Principal;
|
||||
|
||||
import sun.security.jca.JCAUtil;
|
||||
import sun.security.util.*;
|
||||
import sun.security.provider.X509Factory;
|
||||
|
||||
|
@ -266,6 +267,13 @@ public class X509CertImpl extends X509Certificate implements DerEncoder {
|
|||
}
|
||||
}
|
||||
|
||||
// helper method to record certificate, if necessary, after construction
|
||||
public static X509CertImpl newX509CertImpl(byte[] certData) throws CertificateException {
|
||||
var cert = new X509CertImpl(certData);
|
||||
JCAUtil.tryCommitCertEvent(cert);
|
||||
return cert;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends the certificate to an output stream.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue