mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8242151: Improve OID mapping and reuse among JDK security providers for aliases registration
Use sun.security.util.KnownOIDs enum instead of hardcoding oid strings everywhere Reviewed-by: weijun
This commit is contained in:
parent
a97932d8fc
commit
080b3b83eb
79 changed files with 2016 additions and 2080 deletions
|
@ -136,7 +136,7 @@ public class OIDMap {
|
|||
addInternal(POLICY_CONSTRAINTS, PKIXExtensions.PolicyConstraints_Id,
|
||||
"sun.security.x509.PolicyConstraintsExtension");
|
||||
addInternal(NETSCAPE_CERT,
|
||||
ObjectIdentifier.of("2.16.840.1.113730.1.1"),
|
||||
ObjectIdentifier.of(KnownOIDs.NETSCAPE_CertType),
|
||||
"sun.security.x509.NetscapeCertTypeExtension");
|
||||
addInternal(CERT_POLICIES, PKIXExtensions.CertificatePolicies_Id,
|
||||
"sun.security.x509.CertificatePoliciesExtension");
|
||||
|
@ -227,7 +227,7 @@ public class OIDMap {
|
|||
throws CertificateException {
|
||||
ObjectIdentifier objId;
|
||||
try {
|
||||
objId = new ObjectIdentifier(oid);
|
||||
objId = ObjectIdentifier.of(oid);
|
||||
} catch (IOException ioe) {
|
||||
throw new CertificateException
|
||||
("Invalid Object identifier: " + oid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue