Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
926663de
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
926663de
编写于
11月 25, 2019
作者:
X
xuelei
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8234037: Improve Object Identifier Processing
Reviewed-by: weijun, mschoene, ssahoo
上级
77e1b349
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
78 addition
and
100 deletion
+78
-100
src/share/classes/sun/security/x509/AVA.java
src/share/classes/sun/security/x509/AVA.java
+1
-1
src/share/classes/sun/security/x509/X500Name.java
src/share/classes/sun/security/x509/X500Name.java
+77
-99
未找到文件。
src/share/classes/sun/security/x509/AVA.java
浏览文件 @
926663de
...
@@ -599,7 +599,7 @@ public class AVA implements DerEncoder {
...
@@ -599,7 +599,7 @@ public class AVA implements DerEncoder {
if
(
derval
.
tag
!=
DerValue
.
tag_Sequence
)
{
if
(
derval
.
tag
!=
DerValue
.
tag_Sequence
)
{
throw
new
IOException
(
"AVA not a sequence"
);
throw
new
IOException
(
"AVA not a sequence"
);
}
}
oid
=
X500Name
.
intern
(
derval
.
data
.
getOID
()
);
oid
=
derval
.
data
.
getOID
(
);
value
=
derval
.
data
.
getDerValue
();
value
=
derval
.
data
.
getDerValue
();
if
(
derval
.
data
.
available
()
!=
0
)
{
if
(
derval
.
data
.
available
()
!=
0
)
{
...
...
src/share/classes/sun/security/x509/X500Name.java
浏览文件 @
926663de
/*
/*
* Copyright (c) 1996, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 201
9
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -1103,18 +1103,6 @@ public class X500Name implements GeneralNameInterface, Principal {
...
@@ -1103,18 +1103,6 @@ public class X500Name implements GeneralNameInterface, Principal {
/****************************************************************/
/****************************************************************/
/*
* Maybe return a preallocated OID, to reduce storage costs
* and speed recognition of common X.500 attributes.
*/
static
ObjectIdentifier
intern
(
ObjectIdentifier
oid
)
{
ObjectIdentifier
interned
=
internedOIDs
.
putIfAbsent
(
oid
,
oid
);
return
(
interned
==
null
)
?
oid
:
interned
;
}
private
static
final
Map
<
ObjectIdentifier
,
ObjectIdentifier
>
internedOIDs
=
new
HashMap
<
ObjectIdentifier
,
ObjectIdentifier
>();
/*
/*
* Selected OIDs from X.520
* Selected OIDs from X.520
* Includes all those specified in RFC 5280 as MUST or SHOULD
* Includes all those specified in RFC 5280 as MUST or SHOULD
...
@@ -1142,92 +1130,82 @@ public class X500Name implements GeneralNameInterface, Principal {
...
@@ -1142,92 +1130,82 @@ public class X500Name implements GeneralNameInterface, Principal {
{
0
,
9
,
2342
,
19200300
,
100
,
1
,
1
};
{
0
,
9
,
2342
,
19200300
,
100
,
1
,
1
};
public
static
final
ObjectIdentifier
commonName_oid
;
// OID for the "CN=" attribute, denoting a person's common name.
public
static
final
ObjectIdentifier
countryName_oid
;
public
static
final
ObjectIdentifier
commonName_oid
=
public
static
final
ObjectIdentifier
localityName_oid
;
ObjectIdentifier
.
newInternal
(
commonName_data
);
public
static
final
ObjectIdentifier
orgName_oid
;
public
static
final
ObjectIdentifier
orgUnitName_oid
;
// OID for the "SERIALNUMBER=" attribute, denoting a serial number for.
public
static
final
ObjectIdentifier
stateName_oid
;
// a name. Do not confuse with PKCS#9 issuerAndSerialNumber or the
public
static
final
ObjectIdentifier
streetAddress_oid
;
// certificate serial number.
public
static
final
ObjectIdentifier
title_oid
;
public
static
final
ObjectIdentifier
SERIALNUMBER_OID
=
public
static
final
ObjectIdentifier
DNQUALIFIER_OID
;
ObjectIdentifier
.
newInternal
(
SERIALNUMBER_DATA
);
public
static
final
ObjectIdentifier
SURNAME_OID
;
public
static
final
ObjectIdentifier
GIVENNAME_OID
;
// OID for the "C=" attribute, denoting a country.
public
static
final
ObjectIdentifier
INITIALS_OID
;
public
static
final
ObjectIdentifier
countryName_oid
=
public
static
final
ObjectIdentifier
GENERATIONQUALIFIER_OID
;
ObjectIdentifier
.
newInternal
(
countryName_data
);
public
static
final
ObjectIdentifier
ipAddress_oid
;
public
static
final
ObjectIdentifier
DOMAIN_COMPONENT_OID
;
// OID for the "L=" attribute, denoting a locality (such as a city).
public
static
final
ObjectIdentifier
userid_oid
;
public
static
final
ObjectIdentifier
localityName_oid
=
public
static
final
ObjectIdentifier
SERIALNUMBER_OID
;
ObjectIdentifier
.
newInternal
(
localityName_data
);
static
{
// OID for the "O=" attribute, denoting an organization name.
/** OID for the "CN=" attribute, denoting a person's common name. */
public
static
final
ObjectIdentifier
orgName_oid
=
commonName_oid
=
intern
(
ObjectIdentifier
.
newInternal
(
commonName_data
));
ObjectIdentifier
.
newInternal
(
orgName_data
);
/** OID for the "SERIALNUMBER=" attribute, denoting a serial number for.
// OID for the "OU=" attribute, denoting an organizational unit name.
a name. Do not confuse with PKCS#9 issuerAndSerialNumber or the
public
static
final
ObjectIdentifier
orgUnitName_oid
=
certificate serial number. */
ObjectIdentifier
.
newInternal
(
orgUnitName_data
);
SERIALNUMBER_OID
=
intern
(
ObjectIdentifier
.
newInternal
(
SERIALNUMBER_DATA
));
// OID for the "S=" attribute, denoting a state (such as Delaware).
/** OID for the "C=" attribute, denoting a country. */
public
static
final
ObjectIdentifier
stateName_oid
=
countryName_oid
=
intern
(
ObjectIdentifier
.
newInternal
(
countryName_data
));
ObjectIdentifier
.
newInternal
(
stateName_data
);
/** OID for the "L=" attribute, denoting a locality (such as a city) */
// OID for the "STREET=" attribute, denoting a street address.
localityName_oid
=
intern
(
ObjectIdentifier
.
newInternal
(
localityName_data
));
public
static
final
ObjectIdentifier
streetAddress_oid
=
ObjectIdentifier
.
newInternal
(
streetAddress_data
);
/** OID for the "O=" attribute, denoting an organization name */
orgName_oid
=
intern
(
ObjectIdentifier
.
newInternal
(
orgName_data
));
// OID for the "T=" attribute, denoting a person's title.
public
static
final
ObjectIdentifier
title_oid
=
/** OID for the "OU=" attribute, denoting an organizational unit name */
ObjectIdentifier
.
newInternal
(
title_data
);
orgUnitName_oid
=
intern
(
ObjectIdentifier
.
newInternal
(
orgUnitName_data
));
// OID for the "DNQUALIFIER=" or "DNQ=" attribute, denoting DN
/** OID for the "S=" attribute, denoting a state (such as Delaware) */
// disambiguating information.
stateName_oid
=
intern
(
ObjectIdentifier
.
newInternal
(
stateName_data
));
public
static
final
ObjectIdentifier
DNQUALIFIER_OID
=
ObjectIdentifier
.
newInternal
(
DNQUALIFIER_DATA
);
/** OID for the "STREET=" attribute, denoting a street address. */
streetAddress_oid
=
intern
(
ObjectIdentifier
.
newInternal
(
streetAddress_data
));
// OID for the "SURNAME=" attribute, denoting a person's surname.
public
static
final
ObjectIdentifier
SURNAME_OID
=
/** OID for the "T=" attribute, denoting a person's title. */
ObjectIdentifier
.
newInternal
(
SURNAME_DATA
);
title_oid
=
intern
(
ObjectIdentifier
.
newInternal
(
title_data
));
// OID for the "GIVENNAME=" attribute, denoting a person's given name.
/** OID for the "DNQUALIFIER=" or "DNQ=" attribute, denoting DN
public
static
final
ObjectIdentifier
GIVENNAME_OID
=
disambiguating information.*/
ObjectIdentifier
.
newInternal
(
GIVENNAME_DATA
);
DNQUALIFIER_OID
=
intern
(
ObjectIdentifier
.
newInternal
(
DNQUALIFIER_DATA
));
// OID for the "INITIALS=" attribute, denoting a person's initials.
/** OID for the "SURNAME=" attribute, denoting a person's surname.*/
public
static
final
ObjectIdentifier
INITIALS_OID
=
SURNAME_OID
=
intern
(
ObjectIdentifier
.
newInternal
(
SURNAME_DATA
));
ObjectIdentifier
.
newInternal
(
INITIALS_DATA
);
/** OID for the "GIVENNAME=" attribute, denoting a person's given name.*/
// OID for the "GENERATION=" attribute, denoting Jr., II, etc.
GIVENNAME_OID
=
intern
(
ObjectIdentifier
.
newInternal
(
GIVENNAME_DATA
));
public
static
final
ObjectIdentifier
GENERATIONQUALIFIER_OID
=
ObjectIdentifier
.
newInternal
(
GENERATIONQUALIFIER_DATA
);
/** OID for the "INITIALS=" attribute, denoting a person's initials.*/
INITIALS_OID
=
intern
(
ObjectIdentifier
.
newInternal
(
INITIALS_DATA
));
// OIDs from other sources which show up in X.500 names we
// expect to deal with often.
/** OID for the "GENERATION=" attribute, denoting Jr., II, etc.*/
//
GENERATIONQUALIFIER_OID
=
// OID for "IP=" IP address attributes, used with SKIP.
intern
(
ObjectIdentifier
.
newInternal
(
GENERATIONQUALIFIER_DATA
));
public
static
final
ObjectIdentifier
ipAddress_oid
=
ObjectIdentifier
.
newInternal
(
ipAddress_data
);
/*
* OIDs from other sources which show up in X.500 names we
// Domain component OID from RFC 1274, RFC 2247, RFC 5280.
* expect to deal with often
//
*/
// OID for "DC=" domain component attributes, used with DNSNames in DN
/** OID for "IP=" IP address attributes, used with SKIP. */
// format.
ipAddress_oid
=
intern
(
ObjectIdentifier
.
newInternal
(
ipAddress_data
));
public
static
final
ObjectIdentifier
DOMAIN_COMPONENT_OID
=
ObjectIdentifier
.
newInternal
(
DOMAIN_COMPONENT_DATA
);
/*
* Domain component OID from RFC 1274, RFC 2247, RFC 5280
// OID for "UID=" denoting a user id, defined in RFCs 1274 & 2798.
*/
public
static
final
ObjectIdentifier
userid_oid
=
ObjectIdentifier
.
newInternal
(
userid_data
);
/*
* OID for "DC=" domain component attributes, used with DNSNames in DN
* format
*/
DOMAIN_COMPONENT_OID
=
intern
(
ObjectIdentifier
.
newInternal
(
DOMAIN_COMPONENT_DATA
));
/** OID for "UID=" denoting a user id, defined in RFCs 1274 & 2798. */
userid_oid
=
intern
(
ObjectIdentifier
.
newInternal
(
userid_data
));
}
/**
/**
* Return constraint type:<ul>
* Return constraint type:<ul>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录