Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
d0a65b59
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d0a65b59
编写于
2月 15, 2012
作者:
M
mullan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7024604: OID.1 causes IAE in X500Principal constructor
Reviewed-by: vinnie
上级
260dbba1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
43 addition
and
14 deletion
+43
-14
src/share/classes/javax/security/auth/x500/X500Principal.java
...share/classes/javax/security/auth/x500/X500Principal.java
+18
-4
src/share/classes/javax/security/auth/x500/package.html
src/share/classes/javax/security/auth/x500/package.html
+14
-5
test/javax/security/auth/x500/X500Principal/Parse.java
test/javax/security/auth/x500/X500Principal/Parse.java
+11
-5
未找到文件。
src/share/classes/javax/security/auth/x500/X500Principal.java
浏览文件 @
d0a65b59
/*
* Copyright (c) 2000, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
2
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -107,10 +107,17 @@ public final class X500Principal implements Principal, java.io.Serializable {
* defined in RFC 1779 and RFC 2253
* (and listed in {@link #getName(String format) getName(String format)}),
* as well as the T, DNQ or DNQUALIFIER, SURNAME, GIVENNAME, INITIALS,
* GENERATION, EMAILADDRESS, and SERIALNUMBER keywords whose O
IDs are
* defined in RFC 3280 and its successor.
* GENERATION, EMAILADDRESS, and SERIALNUMBER keywords whose O
bject
*
Identifiers (OIDs) are
defined in RFC 3280 and its successor.
* Any other attribute type must be specified as an OID.
*
* <p>This implementation enforces a more restrictive OID syntax than
* defined in RFC 1779 and 2253. It uses the more correct syntax defined in
* <a href="http://www.ietf.org/rfc/rfc4512.txt">RFC 4512</a>, which
* specifies that OIDs contain at least 2 digits:
*
* <p>{@code numericoid = number 1*( DOT number ) }
*
* @param name an X.500 distinguished name in RFC 1779 or RFC 2253 format
* @exception NullPointerException if the <code>name</code>
* is <code>null</code>
...
...
@@ -135,10 +142,17 @@ public final class X500Principal implements Principal, java.io.Serializable {
* keywords recognized by <code>X500Principal(String)</code>. Keywords
* MUST be specified in all upper-case, otherwise they will be ignored.
* Improperly specified keywords are ignored; however if a keyword in the
* name maps to an improperly specified O
ID
, an
* name maps to an improperly specified O
bject Identifier (OID)
, an
* <code>IllegalArgumentException</code> is thrown. It is permissible to
* have 2 different keywords that map to the same OID.
*
* <p>This implementation enforces a more restrictive OID syntax than
* defined in RFC 1779 and 2253. It uses the more correct syntax defined in
* <a href="http://www.ietf.org/rfc/rfc4512.txt">RFC 4512</a>, which
* specifies that OIDs contain at least 2 digits:
*
* <p>{@code numericoid = number 1*( DOT number ) }
*
* @param name an X.500 distinguished name in RFC 1779 or RFC 2253 format
* @param keywordMap an attribute type keyword map, where each key is a
* keyword String that maps to a corresponding object identifier in String
...
...
src/share/classes/javax/security/auth/x500/package.html
浏览文件 @
d0a65b59
...
...
@@ -2,7 +2,7 @@
<html>
<head>
<!--
Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2000,
2012,
Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
...
...
@@ -30,17 +30,26 @@ questions.
<body
bgcolor=
"white"
>
This package contains the classes that should be used to store
X500 Principal and X500 Private Cre
n
dentials in a
X500 Principal and X500 Private Credentials in a
<i>
Subject
</i>
.
<!--
<h2>
Package Specification
</h2>
##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
<ul>
<li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>
<li><a
href=
"http://www.ietf.org/rfc/rfc1779.txt"
>
RFC 1779: A String Representation of Distinguished Names
</a></li>
<li><a
href=
"http://www.ietf.org/rfc/rfc2253.txt"
>
RFC 2253: Lightweight Directory Access Protocol (v3):
UTF-8 String Representation of Distinguished Names
</a></li>
<li><a
href=
"http://www.ietf.org/rfc/rfc3280.txt"
>
RFC 3280: Internet X.509 Public Key Infrastructure
Certificate and Certificate Revocation List (CRL) Profile
</a></li>
<li><a
href=
"http://www.ietf.org/rfc/rfc4512.txt"
>
RFC 4512: Lightweight Directory Access Protocol (LDAP):
Directory Information Models
</a></li>
</ul>
<!--
<h2>Related Documentation</h2>
For overviews, tutorials, examples, guides, and tool documentation, please see:
...
...
test/javax/security/auth/x500/X500Principal/Parse.java
浏览文件 @
d0a65b59
/*
* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011,
2012,
Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -23,7 +23,7 @@
/*
* @test
* @bug 7024771
* @bug 7024771
7024604
* @summary various X500Principal DN parsing tests
*/
...
...
@@ -32,12 +32,18 @@ import javax.security.auth.x500.X500Principal;
public
class
Parse
{
private
static
TestCase
[]
testCases
=
{
new
TestCase
(
"CN=prefix\\<>suffix"
,
false
)
new
TestCase
(
"CN=prefix\\<>suffix"
,
false
),
new
TestCase
(
"OID.1=value"
,
false
),
new
TestCase
(
"oid.1=value"
,
false
),
new
TestCase
(
"OID.1.2=value"
,
true
),
new
TestCase
(
"oid.1.2=value"
,
true
),
new
TestCase
(
"1=value"
,
false
),
new
TestCase
(
"1.2=value"
,
true
)
};
public
static
void
main
(
String
args
[])
throws
Exception
{
for
(
int
i
=
0
;
i
<
testCases
.
length
;
i
++
)
{
testCase
s
[
i
]
.
run
();
for
(
TestCase
testCase
:
testCases
)
{
testCase
.
run
();
}
System
.
out
.
println
(
"Test completed ok."
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录