mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8241003: Deprecate "denigrated" java.security.cert APIs that represent DNs as Principal or String objects
Reviewed-by: xuelei, valeriep, weijun
This commit is contained in:
parent
0df797de94
commit
f879698c63
16 changed files with 115 additions and 105 deletions
|
@ -1431,7 +1431,7 @@ public class Main {
|
|||
x509Cert = (X509Certificate) c;
|
||||
certStr.append(tab).append(x509Cert.getType())
|
||||
.append(rb.getString("COMMA"))
|
||||
.append(x509Cert.getSubjectDN().getName());
|
||||
.append(x509Cert.getSubjectX500Principal().toString());
|
||||
} else {
|
||||
certStr.append(tab).append(c.getType());
|
||||
}
|
||||
|
@ -2055,7 +2055,7 @@ public class Main {
|
|||
// Only add TrustedCertificateEntry and self-signed
|
||||
// PrivateKeyEntry
|
||||
if (store.isCertificateEntry(a) ||
|
||||
c.getSubjectDN().equals(c.getIssuerDN())) {
|
||||
c.getSubjectX500Principal().equals(c.getIssuerX500Principal())) {
|
||||
trustedCerts.add(c);
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue