Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
620bc844
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
620bc844
编写于
7月 05, 2017
作者:
D
duke
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
72eb2a25
be0fa613
变更
35
隐藏空白更改
内联
并排
Showing
35 changed file
with
579 addition
and
1627 deletion
+579
-1627
.hgtags-top-repo
.hgtags-top-repo
+1
-0
corba/.hgtags
corba/.hgtags
+1
-0
hotspot/.hgtags
hotspot/.hgtags
+1
-0
jdk/.hgtags
jdk/.hgtags
+1
-0
jdk/make/CopyIntoClasses.gmk
jdk/make/CopyIntoClasses.gmk
+0
-1
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd
...org/apache/xml/internal/security/resource/schema/etsi.xsd
+0
-347
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xenc-schema.rng
...che/xml/internal/security/resource/schema/xenc-schema.rng
+0
-219
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xenc-schema.xsd
...che/xml/internal/security/resource/schema/xenc-schema.xsd
+0
-146
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.dtd
...internal/security/resource/schema/xmldsig-core-schema.dtd
+0
-171
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.rng
...internal/security/resource/schema/xmldsig-core-schema.rng
+0
-339
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.xsd
...internal/security/resource/schema/xmldsig-core-schema.xsd
+0
-318
jdk/src/share/classes/jdk/internal/util/xml/impl/Parser.java
jdk/src/share/classes/jdk/internal/util/xml/impl/Parser.java
+67
-13
jdk/src/share/classes/sun/nio/ch/ServerSocketAdaptor.java
jdk/src/share/classes/sun/nio/ch/ServerSocketAdaptor.java
+2
-2
jdk/src/share/classes/sun/security/krb5/KdcComm.java
jdk/src/share/classes/sun/security/krb5/KdcComm.java
+27
-3
jdk/src/share/classes/sun/security/smartcardio/CardImpl.java
jdk/src/share/classes/sun/security/smartcardio/CardImpl.java
+1
-1
jdk/src/share/classes/sun/security/tools/jarsigner/Main.java
jdk/src/share/classes/sun/security/tools/jarsigner/Main.java
+18
-4
jdk/src/share/native/sun/security/smartcardio/pcsc.c
jdk/src/share/native/sun/security/smartcardio/pcsc.c
+24
-16
jdk/src/solaris/classes/java/lang/UNIXProcess.java
jdk/src/solaris/classes/java/lang/UNIXProcess.java
+1
-0
jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c
jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c
+4
-0
jdk/test/ProblemList.txt
jdk/test/ProblemList.txt
+4
-0
jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java
...test/java/lang/invoke/lambda/LogGeneratedClassesTest.java
+48
-18
jdk/test/java/util/Properties/LoadAndStoreXML.java
jdk/test/java/util/Properties/LoadAndStoreXML.java
+23
-6
jdk/test/sun/nio/ch/ServerSocketAdaptorTest.java
jdk/test/sun/nio/ch/ServerSocketAdaptorTest.java
+64
-0
jdk/test/sun/security/krb5/auto/KDC.java
jdk/test/sun/security/krb5/auto/KDC.java
+22
-10
jdk/test/sun/security/krb5/auto/UdpTcp.java
jdk/test/sun/security/krb5/auto/UdpTcp.java
+10
-4
jdk/test/sun/security/pkcs11/PKCS11Test.java
jdk/test/sun/security/pkcs11/PKCS11Test.java
+2
-2
jdk/test/sun/security/tools/jarsigner/certpolicy.sh
jdk/test/sun/security/tools/jarsigner/certpolicy.sh
+80
-0
jdk/test/sun/security/tools/keytool/autotest.sh
jdk/test/sun/security/tools/keytool/autotest.sh
+3
-1
nashorn/.hgtags
nashorn/.hgtags
+1
-0
nashorn/make/build.xml
nashorn/make/build.xml
+18
-3
nashorn/samples/filebrowser.js
nashorn/samples/filebrowser.js
+100
-0
nashorn/samples/word_histogram.js
nashorn/samples/word_histogram.js
+53
-0
nashorn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java
...orn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java
+1
-0
nashorn/src/jdk/nashorn/api/scripting/package-info.java
nashorn/src/jdk/nashorn/api/scripting/package-info.java
+2
-1
nashorn/src/jdk/nashorn/internal/ir/annotations/Reference.java
...rn/src/jdk/nashorn/internal/ir/annotations/Reference.java
+0
-2
未找到文件。
.hgtags-top-repo
浏览文件 @
620bc844
...
...
@@ -257,3 +257,4 @@ ab55a18a95e1990a588929d5d29db3eb9985fea0 jdk9-b11
59f6350295f9681fe5956d8bc889bf341914c6cb jdk9-b12
5800456add07e1a68170a229fb5e27376f8875e5 jdk9-b13
4e3aa9723e9972623e3dafc321b368e7db7e9b3b jdk9-b14
b114474fb25af4e73cb7219f7c04bd8994da03a5 jdk9-b15
corba/.hgtags
浏览文件 @
620bc844
...
...
@@ -257,3 +257,4 @@ a4bf701ac316946c2e5e83138ad8e687da6a4b30 jdk9-b06
e212cdcc8c11f0ba5acf6f5ddb596c4c545a93f9 jdk9-b12
088eec4c36f4d7f250fcd19c4969bf698e3d2cdc jdk9-b13
a2b82f863ba95a596da555a4c1b871c404863e7e jdk9-b14
e54022d0dd92106fff7f7fe670010cd7e6517ee3 jdk9-b15
hotspot/.hgtags
浏览文件 @
620bc844
...
...
@@ -417,3 +417,4 @@ ebc44d040cd149d2120d69fe183a3dae7840f4b4 jdk9-b10
1c383bb39e2849ca62cb763f4e182a29b421d60a jdk9-b12
456ad9c99133803d4e1433124c85a6fd141b9ac9 jdk9-b13
bd333491bb6c012d7b606939406d0fa9a5ac7ffd jdk9-b14
170f6d733d7aec062f743a6b8c1cce940a7a984a jdk9-b15
jdk/.hgtags
浏览文件 @
620bc844
...
...
@@ -257,3 +257,4 @@ ab06ba2894313a47e4969ca37792ff119c49e711 jdk9-b10
83d9bc20973de232cae45b139fdff8a4549c130f jdk9-b12
c7c8002d02721e02131d104549ebeb8b379fb8d2 jdk9-b13
5c7a17a81afd0906b53ee31d95a3211c96ff6b25 jdk9-b14
4537360f09fe23ab339ee588747b657feb12d0c8 jdk9-b15
jdk/make/CopyIntoClasses.gmk
浏览文件 @
620bc844
...
...
@@ -30,7 +30,6 @@ COPY_PATTERNS := .icu _dict .dat _options .js aliasmap .spp .wav .css \
# These directories should not be copied at all
EXCLUDES += \
com/sun/org/apache/xml/internal/security/resource/schema \
java/awt/doc-files \
java/lang/doc-files \
javax/swing/doc-files \
...
...
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/etsi.xsd
已删除
100644 → 0
浏览文件 @
72eb2a25
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by XMLSpy v4 (Altova) -->
<xsd:schema
targetNamespace=
"http://uri.etsi.org/01903/v1.1.1#"
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns=
"http://uri.etsi.org/01903/v1.1.1#"
xmlns:ds=
"http://www.w3.org/2000/09/xmldsig#"
elementFormDefault=
"qualified"
xsi:schemaLocation=
"http://www.w3.org/2000/09/xmldsig# xmldsig-core-schema.xsd"
>
<xsd:element
name=
"Any"
type=
"AnyType"
/>
<xsd:complexType
name=
"AnyType"
mixed=
"true"
>
<xsd:sequence>
<xsd:any
namespace=
"##any"
/>
</xsd:sequence>
<xsd:anyAttribute
namespace=
"##any"
/>
</xsd:complexType>
<xsd:element
name=
"ObjectIdentifier"
type=
"ObjectIdentifierType"
/>
<xsd:complexType
name=
"ObjectIdentifierType"
>
<xsd:sequence>
<xsd:element
name=
"Identifier"
type=
"IdentifierType"
/>
<xsd:element
name=
"Description"
type=
"xsd:string"
minOccurs=
"0"
/>
<xsd:element
name=
"DocumentationReferences"
type=
"DocumentationReferencesType"
minOccurs=
"0"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"IdentifierType"
>
<xsd:simpleContent>
<xsd:extension
base=
"xsd:anyURI"
>
<xsd:attribute
name=
"Qualifier"
type=
"QualifierType"
use=
"optional"
/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType
name=
"QualifierType"
>
<xsd:restriction
base=
"xsd:string"
>
<xsd:enumeration
value=
"OIDAsURI"
/>
<xsd:enumeration
value=
"OIDAsURN"
/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType
name=
"DocumentationReferencesType"
>
<xsd:sequence
maxOccurs=
"unbounded"
>
<xsd:element
name=
"DocumentationReference"
type=
"xsd:anyURI"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"EncapsulatedPKIData"
type=
"EncapsulatedPKIDataType"
/>
<xsd:complexType
name=
"EncapsulatedPKIDataType"
>
<xsd:simpleContent>
<xsd:extension
base=
"xsd:base64Binary"
>
<xsd:attribute
name=
"Id"
type=
"xsd:ID"
use=
"optional"
/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:element
name=
"TimeStamp"
type=
"TimeStampType"
/>
<xsd:complexType
name=
"TimeStampType"
>
<xsd:sequence>
<xsd:element
name=
"HashDataInfo"
type=
"HashDataInfoType"
maxOccurs=
"unbounded"
/>
<xsd:choice>
<xsd:element
name=
"EncapsulatedTimeStamp"
type=
"EncapsulatedPKIDataType"
/>
<xsd:element
name=
"XMLTimeStamp"
type=
"AnyType"
/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"HashDataInfoType"
>
<xsd:sequence>
<xsd:element
name=
"Transforms"
type=
"ds:TransformsType"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"uri"
type=
"xsd:anyURI"
use=
"required"
/>
</xsd:complexType>
<xsd:element
name=
"QualifyingProperties"
type=
"QualifyingPropertiesType"
/>
<xsd:complexType
name=
"QualifyingPropertiesType"
>
<xsd:sequence>
<xsd:element
name=
"SignedProperties"
type=
"SignedPropertiesType"
minOccurs=
"0"
/>
<xsd:element
name=
"UnsignedProperties"
type=
"UnsignedPropertiesType"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"Target"
type=
"xsd:anyURI"
use=
"required"
/>
<xsd:attribute
name=
"Id"
type=
"xsd:ID"
use=
"optional"
/>
</xsd:complexType>
<xsd:element
name=
"SignedProperties"
type=
"SignedPropertiesType"
/>
<xsd:complexType
name=
"SignedPropertiesType"
>
<xsd:sequence>
<xsd:element
name=
"SignedSignatureProperties"
type=
"SignedSignaturePropertiesType"
/>
<xsd:element
name=
"SignedDataObjectProperties"
type=
"SignedDataObjectPropertiesType"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"Id"
type=
"xsd:ID"
use=
"optional"
/>
</xsd:complexType>
<xsd:element
name=
"UnsignedProperties"
type=
"UnsignedPropertiesType"
/>
<xsd:complexType
name=
"UnsignedPropertiesType"
>
<xsd:sequence>
<xsd:element
name=
"UnsignedSignatureProperties"
type=
"UnsignedSignaturePropertiesType"
minOccurs=
"0"
/>
<xsd:element
name=
"UnsignedDataObjectProperties"
type=
"UnsignedDataObjectPropertiesType"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"Id"
type=
"xsd:ID"
use=
"optional"
/>
</xsd:complexType>
<xsd:element
name=
"SignedSignatureProperties"
type=
"SignedSignaturePropertiesType"
/>
<xsd:complexType
name=
"SignedSignaturePropertiesType"
>
<xsd:sequence>
<xsd:element
name=
"SigningTime"
type=
"xsd:dateTime"
/>
<xsd:element
name=
"SigningCertificate"
type=
"CertIDListType"
/>
<xsd:element
name=
"SignaturePolicyIdentifier"
type=
"SignaturePolicyIdentifierType"
/>
<xsd:element
name=
"SignatureProductionPlace"
type=
"SignatureProductionPlaceType"
minOccurs=
"0"
/>
<xsd:element
name=
"SignerRole"
type=
"SignerRoleType"
minOccurs=
"0"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"SignedDataObjectProperties"
type=
"SignedDataObjectPropertiesType"
/>
<xsd:complexType
name=
"SignedDataObjectPropertiesType"
>
<xsd:sequence>
<xsd:element
name=
"DataObjectFormat"
type=
"DataObjectFormatType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
<xsd:element
name=
"CommitmentTypeIndication"
type=
"CommitmentTypeIndicationType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
<xsd:element
name=
"AllDataObjectsTimeStamp"
type=
"TimeStampType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
<xsd:element
name=
"IndividualDataObjectsTimeStamp"
type=
"TimeStampType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"UnsignedSignatureProperties"
type=
"UnsignedSignaturePropertiesType"
/>
<xsd:complexType
name=
"UnsignedSignaturePropertiesType"
>
<xsd:sequence>
<xsd:element
name=
"CounterSignature"
type=
"CounterSignatureType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
<xsd:element
name=
"SignatureTimeStamp"
type=
"TimeStampType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
<xsd:element
name=
"CompleteCertificateRefs"
type=
"CompleteCertificateRefsType"
minOccurs=
"0"
/>
<xsd:element
name=
"CompleteRevocationRefs"
type=
"CompleteRevocationRefsType"
minOccurs=
"0"
/>
<xsd:choice>
<xsd:element
name=
"SigAndRefsTimeStamp"
type=
"TimeStampType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
<xsd:element
name=
"RefsOnlyTimeStamp"
type=
"TimeStampType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</xsd:choice>
<xsd:element
name=
"CertificateValues"
type=
"CertificateValuesType"
minOccurs=
"0"
/>
<xsd:element
name=
"RevocationValues"
type=
"RevocationValuesType"
minOccurs=
"0"
/>
<xsd:element
name=
"ArchiveTimeStamp"
type=
"TimeStampType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"UnsignedDataObjectProperties"
type=
"UnsignedDataObjectPropertiesType"
/>
<xsd:complexType
name=
"UnsignedDataObjectPropertiesType"
>
<xsd:sequence>
<xsd:element
name=
"UnsignedDataObjectProperty"
type=
"AnyType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"QualifyingPropertiesReference"
type=
"QualifyingPropertiesReferenceType"
/>
<xsd:complexType
name=
"QualifyingPropertiesReferenceType"
>
<xsd:sequence>
<xsd:element
name=
"Transforms"
type=
"ds:TransformsType"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"URI"
type=
"xsd:anyURI"
use=
"required"
/>
<xsd:attribute
name=
"Id"
type=
"xsd:ID"
use=
"optional"
/>
</xsd:complexType>
<xsd:element
name=
"SigningTime"
type=
"xsd:dateTime"
/>
<xsd:element
name=
"SigningCertificate"
type=
"CertIDListType"
/>
<xsd:complexType
name=
"CertIDListType"
>
<xsd:sequence>
<xsd:element
name=
"Cert"
type=
"CertIDType"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"CertIDType"
>
<xsd:sequence>
<xsd:element
name=
"CertDigest"
type=
"DigestAlgAndValueType"
/>
<xsd:element
name=
"IssuerSerial"
type=
"ds:X509IssuerSerialType"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"DigestAlgAndValueType"
>
<xsd:sequence>
<xsd:element
name=
"DigestMethod"
type=
"ds:DigestMethodType"
/>
<xsd:element
name=
"DigestValue"
type=
"ds:DigestValueType"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"SignaturePolicyIdentifier"
type=
"SignaturePolicyIdentifierType"
/>
<xsd:complexType
name=
"SignaturePolicyIdentifierType"
>
<xsd:choice>
<xsd:element
name=
"SignaturePolicyId"
type=
"SignaturePolicyIdType"
/>
<xsd:element
name=
"SignaturePolicyImplied"
/>
</xsd:choice>
</xsd:complexType>
<xsd:complexType
name=
"SignaturePolicyIdType"
>
<xsd:sequence>
<xsd:element
name=
"SigPolicyId"
type=
"ObjectIdentifierType"
/>
<xsd:element
ref=
"ds:Transforms"
minOccurs=
"0"
/>
<xsd:element
name=
"SigPolicyHash"
type=
"DigestAlgAndValueType"
/>
<xsd:element
name=
"SigPolicyQualifiers"
type=
"SigPolicyQualifiersListType"
minOccurs=
"0"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"SigPolicyQualifiersListType"
>
<xsd:sequence>
<xsd:element
name=
"SigPolicyQualifier"
type=
"AnyType"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"SPURI"
type=
"xsd:anyURI"
/>
<xsd:element
name=
"SPUserNotice"
type=
"SPUserNoticeType"
/>
<xsd:complexType
name=
"SPUserNoticeType"
>
<xsd:sequence>
<xsd:element
name=
"NoticeRef"
type=
"NoticeReferenceType"
minOccurs=
"0"
/>
<xsd:element
name=
"ExplicitText"
type=
"xsd:string"
minOccurs=
"0"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"NoticeReferenceType"
>
<xsd:sequence>
<xsd:element
name=
"Organization"
type=
"xsd:string"
/>
<xsd:element
name=
"NoticeNumbers"
type=
"IntegerListType"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"IntegerListType"
>
<xsd:sequence>
<xsd:element
name=
"int"
type=
"xsd:integer"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"CounterSignature"
type=
"CounterSignatureType"
/>
<xsd:complexType
name=
"CounterSignatureType"
>
<xsd:sequence>
<xsd:element
ref=
"ds:Signature"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"DataObjectFormat"
type=
"DataObjectFormatType"
/>
<xsd:complexType
name=
"DataObjectFormatType"
>
<xsd:sequence>
<xsd:element
name=
"Description"
type=
"xsd:string"
minOccurs=
"0"
/>
<xsd:element
name=
"ObjectIdentifier"
type=
"ObjectIdentifierType"
minOccurs=
"0"
/>
<xsd:element
name=
"MimeType"
type=
"xsd:string"
minOccurs=
"0"
/>
<xsd:element
name=
"Encoding"
type=
"xsd:anyURI"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"ObjectReference"
type=
"xsd:anyURI"
use=
"required"
/>
</xsd:complexType>
<xsd:element
name=
"CommitmentTypeIndication"
type=
"CommitmentTypeIndicationType"
/>
<xsd:complexType
name=
"CommitmentTypeIndicationType"
>
<xsd:sequence>
<xsd:element
name=
"CommitmentTypeId"
type=
"ObjectIdentifierType"
/>
<xsd:choice>
<xsd:element
name=
"ObjectReference"
type=
"xsd:anyURI"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
<xsd:element
name=
"AllSignedDataObjects"
/>
</xsd:choice>
<xsd:element
name=
"CommitmentTypeQualifiers"
type=
"CommitmentTypeQualifiersListType"
minOccurs=
"0"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"CommitmentTypeQualifiersListType"
>
<xsd:sequence>
<xsd:element
name=
"CommitmentTypeQualifier"
type=
"AnyType"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"SignatureProductionPlace"
type=
"SignatureProductionPlaceType"
/>
<xsd:complexType
name=
"SignatureProductionPlaceType"
>
<xsd:sequence>
<xsd:element
name=
"City"
type=
"xsd:string"
minOccurs=
"0"
/>
<xsd:element
name=
"StateOrProvince"
type=
"xsd:string"
minOccurs=
"0"
/>
<xsd:element
name=
"PostalCode"
type=
"xsd:string"
minOccurs=
"0"
/>
<xsd:element
name=
"CountryName"
type=
"xsd:string"
minOccurs=
"0"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"SignerRole"
type=
"SignerRoleType"
/>
<xsd:complexType
name=
"SignerRoleType"
>
<xsd:sequence>
<xsd:element
name=
"ClaimedRoles"
type=
"ClaimedRolesListType"
minOccurs=
"0"
/>
<xsd:element
name=
"CertifiedRoles"
type=
"CertifiedRolesListType"
minOccurs=
"0"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"ClaimedRolesListType"
>
<xsd:sequence>
<xsd:element
name=
"ClaimedRole"
type=
"AnyType"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"CertifiedRolesListType"
>
<xsd:sequence>
<xsd:element
name=
"CertifiedRole"
type=
"EncapsulatedPKIDataType"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"AllDataObjectsTimeStamp"
type=
"TimeStampType"
/>
<xsd:element
name=
"IndividualDataObjectsTimeStamp"
type=
"TimeStampType"
/>
<xsd:element
name=
"SignatureTimeStamp"
type=
"TimeStampType"
/>
<xsd:element
name=
"CompleteCertificateRefs"
type=
"CompleteCertificateRefsType"
/>
<xsd:complexType
name=
"CompleteCertificateRefsType"
>
<xsd:sequence>
<xsd:element
name=
"CertRefs"
type=
"CertIDListType"
/>
</xsd:sequence>
<xsd:attribute
name=
"Id"
type=
"xsd:ID"
use=
"optional"
/>
</xsd:complexType>
<xsd:element
name=
"CompleteRevocationRefs"
type=
"CompleteRevocationRefsType"
/>
<xsd:complexType
name=
"CompleteRevocationRefsType"
>
<xsd:sequence>
<xsd:element
name=
"CRLRefs"
type=
"CRLRefsType"
minOccurs=
"0"
/>
<xsd:element
name=
"OCSPRefs"
type=
"OCSPRefsType"
minOccurs=
"0"
/>
<xsd:element
name=
"OtherRefs"
type=
"OtherCertStatusRefsType"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"Id"
type=
"xsd:ID"
use=
"optional"
/>
</xsd:complexType>
<xsd:complexType
name=
"CRLRefsType"
>
<xsd:sequence>
<xsd:element
name=
"CRLRef"
type=
"CRLRefType"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"CRLRefType"
>
<xsd:sequence>
<xsd:element
name=
"DigestAlgAndValue"
type=
"DigestAlgAndValueType"
/>
<xsd:element
name=
"CRLIdentifier"
type=
"CRLIdentifierType"
minOccurs=
"0"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"CRLIdentifierType"
>
<xsd:sequence>
<xsd:element
name=
"Issuer"
type=
"xsd:string"
/>
<xsd:element
name=
"IssueTime"
type=
"xsd:dateTime"
/>
<xsd:element
name=
"Number"
type=
"xsd:integer"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"URI"
type=
"xsd:anyURI"
use=
"optional"
/>
</xsd:complexType>
<xsd:complexType
name=
"OCSPRefsType"
>
<xsd:sequence>
<xsd:element
name=
"OCSPRef"
type=
"OCSPRefType"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"OCSPRefType"
>
<xsd:sequence>
<xsd:element
name=
"OCSPIdentifier"
type=
"OCSPIdentifierType"
/>
<xsd:element
name=
"DigestAlgAndValue"
type=
"DigestAlgAndValueType"
minOccurs=
"0"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"OCSPIdentifierType"
>
<xsd:sequence>
<xsd:element
name=
"ResponderID"
type=
"xsd:string"
/>
<xsd:element
name=
"ProducedAt"
type=
"xsd:dateTime"
/>
</xsd:sequence>
<xsd:attribute
name=
"URI"
type=
"xsd:anyURI"
use=
"optional"
/>
</xsd:complexType>
<xsd:complexType
name=
"OtherCertStatusRefsType"
>
<xsd:sequence>
<xsd:element
name=
"OtherRef"
type=
"AnyType"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"SigAndRefsTimeStamp"
type=
"TimeStampType"
/>
<xsd:element
name=
"RefsOnlyTimeStamp"
type=
"TimeStampType"
/>
<xsd:element
name=
"CertificateValues"
type=
"CertificateValuesType"
/>
<xsd:complexType
name=
"CertificateValuesType"
>
<xsd:choice
minOccurs=
"0"
maxOccurs=
"unbounded"
>
<xsd:element
name=
"EncapsulatedX509Certificate"
type=
"EncapsulatedPKIDataType"
/>
<xsd:element
name=
"OtherCertificate"
type=
"AnyType"
/>
</xsd:choice>
<xsd:attribute
name=
"Id"
type=
"xsd:ID"
use=
"optional"
/>
</xsd:complexType>
<xsd:element
name=
"RevocationValues"
type=
"RevocationValuesType"
/>
<xsd:complexType
name=
"RevocationValuesType"
>
<xsd:sequence>
<xsd:element
name=
"CRLValues"
type=
"CRLValuesType"
minOccurs=
"0"
/>
<xsd:element
name=
"OCSPValues"
type=
"OCSPValuesType"
minOccurs=
"0"
/>
<xsd:element
name=
"OtherValues"
type=
"OtherCertStatusValuesType"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"Id"
type=
"xsd:ID"
use=
"optional"
/>
</xsd:complexType>
<xsd:complexType
name=
"CRLValuesType"
>
<xsd:sequence>
<xsd:element
name=
"EncapsulatedCRLValue"
type=
"EncapsulatedPKIDataType"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"OCSPValuesType"
>
<xsd:sequence>
<xsd:element
name=
"EncapsulatedOCSPValue"
type=
"EncapsulatedPKIDataType"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType
name=
"OtherCertStatusValuesType"
>
<xsd:sequence>
<xsd:element
name=
"OtherValue"
type=
"AnyType"
maxOccurs=
"unbounded"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:element
name=
"ArchiveTimeStamp"
type=
"TimeStampType"
/>
</xsd:schema>
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xenc-schema.rng
已删除
100644 → 0
浏览文件 @
72eb2a25
<?xml version="1.0" encoding="UTF-8"?>
<!-- http://www.xml.com/lpt/a/2002/01/23/relaxng.html -->
<!-- http://www.oasis-open.org/committees/relax-ng/tutorial-20011203.html -->
<!-- http://www.zvon.org/xxl/XMLSchemaTutorial/Output/ser_wildcards_st8.html -->
<!-- http://lists.oasis-open.org/archives/relax-ng-comment/200206/maillist.html -->
<grammar
xmlns=
'http://relaxng.org/ns/structure/1.0'
xmlns:ds=
'http://www.w3.org/2000/09/xmldsig#'
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
ns=
"http://www.w3.org/2001/04/xmlenc#"
datatypeLibrary=
"http://www.w3.org/2001/XMLSchema-datatypes"
>
<include
href=
"http://www.w3.org/Signature/Drafts/xmldsig-core/xmldsig-core-schema.rng"
>
<!-- Used for DigestMethod, KeyInfoType and anyThing -->
<!-- Since xmldsig-core also has a start, I have to include it
in the include for redefinition. -->
<start>
<choice>
<!-- We get to define the permissible root elements! -->
<element
name=
"EncryptedData"
><ref
name=
"EncryptedDataType"
/></element>
<element
name=
"EncryptedKey"
><ref
name=
"EncryptedKeyType"
/></element>
</choice>
</start>
<define
name=
'anyThing'
>
<zeroOrMore>
<choice>
<text/>
<element>
<anyName>
<except>
<nsName/>
<nsName
ns=
'http://www.w3.org/2000/09/xmldsig#'
/>
</except>
</anyName>
<ref
name=
'anyThing'
/>
<zeroOrMore>
<attribute>
<anyName/>
</attribute>
</zeroOrMore>
</element>
</choice>
</zeroOrMore>
</define>
</include>
<!-- Import definitions from the xmldsig rng -->
<define
name=
"KeyInfoType"
combine=
"interleave"
>
<zeroOrMore>
<choice>
<element
name=
"EncryptedKey"
><ref
name=
"EncryptedKeyType"
/></element>
<element
name=
"AgreementMethod"
><ref
name=
"AgreementMethodType"
/></element>
</choice>
</zeroOrMore>
</define>
<define
name=
"DigestMethodType"
combine=
"choice"
>
<notAllowed/>
</define>
<define
name=
"TransformType"
combine=
"choice"
>
<notAllowed/>
</define>
<!-- Now redefined in the include statement
<define name="anyThing" combine="choice">
<notAllowed/>
</define>
-->
<!-- End import -->
<define
name=
"EncryptedDataType"
>
<ref
name=
"EncryptedType"
/>
</define>
<define
name=
"EncryptedKeyType"
>
<ref
name=
"EncryptedType"
/>
<optional><element
name=
'ReferenceList'
>
<ref
name=
"ReferenceListType"
/></element>
</optional>
<optional><element
name=
'CarriedKeyName'
><data
type=
"string"
/></element></optional>
<optional><attribute
name=
'Recipient'
>
<data
type=
"string"
/></attribute></optional>
</define>
<define
name=
"EncryptedType"
>
<element
name=
"EncryptionMethod"
><ref
name=
"EncryptionMethodType"
/></element>
<optional>
<element
name=
"KeyInfo"
ns=
"http://www.w3.org/2000/09/xmldsig#"
>
<ref
name=
"KeyInfoType"
/>
</element>
</optional>
<optional>
<element
name=
"CipherData"
><ref
name=
"CipherDataType"
/></element>
</optional>
<optional>
<element
name=
"EncryptionProperties"
><ref
name=
"EncryptionPropertiesType"
/></element>
</optional>
<optional><attribute
name=
"Id"
><data
type=
"ID"
/></attribute></optional>
<optional><attribute
name=
"Type"
><data
type=
"anyURI"
/></attribute></optional>
<optional><attribute
name=
"MimeType"
><data
type=
"string"
/></attribute></optional>
<optional><attribute
name=
"Encoding"
><data
type=
"anyURI"
/></attribute></optional>
<optional><attribute
name=
'xsi:schemaLocation'
/></optional>
</define>
<define
name=
"EncryptionMethodType"
>
<zeroOrMore>
<choice>
<element
name=
"KeySize"
>
<data
type=
"integer"
/>
</element>
<element
name=
"OAEPparams"
>
<data
type=
"base64Binary"
/>
</element>
<text/>
<element
name=
'DigestMethod'
ns=
"http://www.w3.org/2000/09/xmldsig#"
>
<ref
name=
"DigestMethodType"
/>
</element>
</choice>
</zeroOrMore>
<attribute
name=
"Algorithm"
><data
type=
"anyURI"
/></attribute>
</define>
<define
name=
"AgreementMethodType"
>
<zeroOrMore>
<choice>
<element
name=
"KA-Nonce"
>
<data
type=
"base64Binary"
/>
</element>
<element
name=
'DigestMethod'
ns=
"http://www.w3.org/2000/09/xmldsig#"
>
<ref
name=
"DigestMethodType"
/>
</element>
<text/>
<element>
<nsName
ns=
"http://www.w3.org/2000/09/xmldsig#"
/>
<ref
name=
"anyThing"
/>
</element>
<element
name=
"OriginatorKeyInfo"
><ref
name=
"KeyInfoType"
/></element>
<element
name=
"RecipientKeyInfo"
><ref
name=
"KeyInfoType"
/></element>
</choice>
</zeroOrMore>
<attribute
name=
"Algorithm"
><data
type=
"anyURI"
/></attribute>
</define>
<define
name=
"ReferenceListType"
>
<oneOrMore>
<choice>
<element
name=
"DataReference"
>
<text/>
<attribute
name=
"URI"
><data
type=
"anyURI"
/></attribute>
</element>
<element
name=
"KeyReference"
>
<text/>
<attribute
name=
"URI"
><data
type=
"anyURI"
/></attribute>
</element>
</choice>
</oneOrMore>
</define>
<define
name=
"CipherDataType"
>
<choice>
<element
name=
"CipherValue"
><data
type=
"base64Binary"
/></element>
<element
name=
"CipherReference"
>
<element
name=
"Transforms"
>
<oneOrMore>
<element
name=
'Transform'
ns=
"http://www.w3.org/2000/09/xmldsig#"
>
<ref
name=
'TransformType'
/>
</element>
</oneOrMore>
</element>
<attribute
name=
"URI"
>
<data
type=
"anyURI"
/>
</attribute>
</element>
</choice>
</define>
<define
name=
"EncryptionPropertiesType"
>
<element
name=
"EncryptionProperty"
>
<zeroOrMore>
<element>
<anyName/>
<text/>
</element>
</zeroOrMore>
<optional>
<attribute
name=
"Target"
>
<data
type=
"anyURI"
/>
</attribute>
</optional>
<optional>
<attribute
name=
"Id"
>
<data
type=
"ID"
/>
</attribute>
</optional>
</element>
<optional>
<attribute
name=
"Id"
>
<data
type=
"ID"
/>
</attribute>
</optional>
<zeroOrMore>
<attribute><nsName
ns=
"http://www.w3.org/XML/1998/namespace"
/></attribute>
</zeroOrMore>
</define>
</grammar>
\ No newline at end of file
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xenc-schema.xsd
已删除
100644 → 0
浏览文件 @
72eb2a25
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSchema 200102//EN"
"http://www.w3.org/2001/XMLSchema.dtd"
[
<!ATTLIST schema
xmlns:xenc CDATA #FIXED 'http://www.w3.org/2001/04/xmlenc#'
xmlns:ds CDATA #FIXED 'http://www.w3.org/2000/09/xmldsig#'>
<!ENTITY xenc 'http://www.w3.org/2001/04/xmlenc#'>
<!ENTITY % p ''>
<!ENTITY % s ''>
]>
<schema
xmlns=
'http://www.w3.org/2001/XMLSchema'
version=
'1.0'
xmlns:xenc=
'http://www.w3.org/2001/04/xmlenc#'
xmlns:ds=
'http://www.w3.org/2000/09/xmldsig#'
targetNamespace=
'http://www.w3.org/2001/04/xmlenc#'
elementFormDefault=
'qualified'
>
<import
namespace=
'http://www.w3.org/2000/09/xmldsig#'
schemaLocation=
'http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd'
/>
<complexType
name=
'EncryptedType'
abstract=
'true'
>
<sequence>
<element
name=
'EncryptionMethod'
type=
'xenc:EncryptionMethodType'
minOccurs=
'0'
/>
<element
ref=
'ds:KeyInfo'
minOccurs=
'0'
/>
<element
ref=
'xenc:CipherData'
/>
<element
ref=
'xenc:EncryptionProperties'
minOccurs=
'0'
/>
</sequence>
<attribute
name=
'Id'
type=
'ID'
use=
'optional'
/>
<attribute
name=
'Type'
type=
'anyURI'
use=
'optional'
/>
<attribute
name=
'MimeType'
type=
'string'
use=
'optional'
/>
<attribute
name=
'Encoding'
type=
'anyURI'
use=
'optional'
/>
</complexType>
<complexType
name=
'EncryptionMethodType'
mixed=
'true'
>
<sequence>
<element
name=
'KeySize'
minOccurs=
'0'
type=
'xenc:KeySizeType'
/>
<element
name=
'OAEPparams'
minOccurs=
'0'
type=
'base64Binary'
/>
<any
namespace=
'##other'
minOccurs=
'0'
maxOccurs=
'unbounded'
/>
</sequence>
<attribute
name=
'Algorithm'
type=
'anyURI'
use=
'required'
/>
</complexType>
<simpleType
name=
'KeySizeType'
>
<restriction
base=
"integer"
/>
</simpleType>
<element
name=
'CipherData'
type=
'xenc:CipherDataType'
/>
<complexType
name=
'CipherDataType'
>
<choice>
<element
name=
'CipherValue'
type=
'base64Binary'
/>
<element
ref=
'xenc:CipherReference'
/>
</choice>
</complexType>
<element
name=
'CipherReference'
type=
'xenc:CipherReferenceType'
/>
<complexType
name=
'CipherReferenceType'
>
<choice>
<element
name=
'Transforms'
type=
'xenc:TransformsType'
minOccurs=
'0'
/>
</choice>
<attribute
name=
'URI'
type=
'anyURI'
use=
'required'
/>
</complexType>
<complexType
name=
'TransformsType'
>
<sequence>
<element
ref=
'ds:Transform'
maxOccurs=
'unbounded'
/>
</sequence>
</complexType>
<element
name=
'EncryptedData'
type=
'xenc:EncryptedDataType'
/>
<complexType
name=
'EncryptedDataType'
>
<complexContent>
<extension
base=
'xenc:EncryptedType'
>
</extension>
</complexContent>
</complexType>
<!-- Children of ds:KeyInfo -->
<element
name=
'EncryptedKey'
type=
'xenc:EncryptedKeyType'
/>
<complexType
name=
'EncryptedKeyType'
>
<complexContent>
<extension
base=
'xenc:EncryptedType'
>
<sequence>
<element
ref=
'xenc:ReferenceList'
minOccurs=
'0'
/>
<element
name=
'CarriedKeyName'
type=
'string'
minOccurs=
'0'
/>
</sequence>
<attribute
name=
'Recipient'
type=
'string'
use=
'optional'
/>
</extension>
</complexContent>
</complexType>
<element
name=
"AgreementMethod"
type=
"xenc:AgreementMethodType"
/>
<complexType
name=
"AgreementMethodType"
mixed=
"true"
>
<sequence>
<element
name=
"KA-Nonce"
minOccurs=
"0"
type=
"base64Binary"
/>
<!-- <element ref="ds:DigestMethod" minOccurs="0"/> -->
<any
namespace=
"##other"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
<element
name=
"OriginatorKeyInfo"
minOccurs=
"0"
type=
"ds:KeyInfoType"
/>
<element
name=
"RecipientKeyInfo"
minOccurs=
"0"
type=
"ds:KeyInfoType"
/>
</sequence>
<attribute
name=
"Algorithm"
type=
"anyURI"
use=
"required"
/>
</complexType>
<!-- End Children of ds:KeyInfo -->
<element
name=
'ReferenceList'
>
<complexType>
<choice
minOccurs=
'1'
maxOccurs=
'unbounded'
>
<element
name=
'DataReference'
type=
'xenc:ReferenceType'
/>
<element
name=
'KeyReference'
type=
'xenc:ReferenceType'
/>
</choice>
</complexType>
</element>
<complexType
name=
'ReferenceType'
>
<sequence>
<any
namespace=
'##other'
minOccurs=
'0'
maxOccurs=
'unbounded'
/>
</sequence>
<attribute
name=
'URI'
type=
'anyURI'
use=
'required'
/>
</complexType>
<element
name=
'EncryptionProperties'
type=
'xenc:EncryptionPropertiesType'
/>
<complexType
name=
'EncryptionPropertiesType'
>
<sequence>
<element
ref=
'xenc:EncryptionProperty'
maxOccurs=
'unbounded'
/>
</sequence>
<attribute
name=
'Id'
type=
'ID'
use=
'optional'
/>
</complexType>
<element
name=
'EncryptionProperty'
type=
'xenc:EncryptionPropertyType'
/>
<complexType
name=
'EncryptionPropertyType'
mixed=
'true'
>
<choice
maxOccurs=
'unbounded'
>
<any
namespace=
'##other'
processContents=
'lax'
/>
</choice>
<attribute
name=
'Target'
type=
'anyURI'
use=
'optional'
/>
<attribute
name=
'Id'
type=
'ID'
use=
'optional'
/>
<anyAttribute
namespace=
"http://www.w3.org/XML/1998/namespace"
/>
</complexType>
</schema>
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.dtd
已删除
100644 → 0
浏览文件 @
72eb2a25
<!-- DTD for XML Signatures
http://www.w3.org/2000/09/xmldsig#
Joseph Reagle $last changed 20001215$
http://www.w3.org/2000/09/xmldsig#
$Revision: 1.6 $ on $Date: 2008/07/24 16:15:03 $ by $Author: mullan $
Copyright 2001 The Internet Society and W3C (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved.
http://www.w3.org/Consortium/Legal/
This document is governed by the W3C Software License [1] as described
in the FAQ [2].
[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
-->
<!--
The following entity declarations enable external/flexible content in
the Signature content model.
#PCDATA emulates schema string; when combined with element types it
emulates schema's mixed content type.
%foo.ANY permits the user to include their own element types from
other namespaces, for example:
<!ENTITY % KeyValue.ANY '| ecds:ECDSAKeyValue'>
...
<!ELEMENT ecds:ECDSAKeyValue (#PCDATA) >
-->
<!ENTITY % Object.ANY ''>
<!ENTITY % Method.ANY ''>
<!ENTITY % Transform.ANY ''>
<!ENTITY % SignatureProperty.ANY ''>
<!ENTITY % KeyInfo.ANY ''>
<!ENTITY % KeyValue.ANY ''>
<!ENTITY % PGPData.ANY ''>
<!ENTITY % X509Data.ANY ''>
<!ENTITY % SPKIData.ANY ''>
<!-- Start Core Signature declarations, these should NOT be altered -->
<!ELEMENT Signature (SignedInfo, SignatureValue, KeyInfo?, Object*) >
<!ATTLIST Signature
xmlns CDATA #FIXED 'http://www.w3.org/2000/09/xmldsig#'
Id ID #IMPLIED >
<!ELEMENT SignatureValue (#PCDATA) >
<!ATTLIST SignatureValue
Id ID #IMPLIED>
<!ELEMENT SignedInfo (CanonicalizationMethod,
SignatureMethod, Reference+) >
<!ATTLIST SignedInfo
Id ID #IMPLIED
>
<!ELEMENT CanonicalizationMethod (#PCDATA %Method.ANY;)* >
<!ATTLIST CanonicalizationMethod
Algorithm CDATA #REQUIRED >
<!ELEMENT SignatureMethod (#PCDATA|HMACOutputLength %Method.ANY;)* >
<!ATTLIST SignatureMethod
Algorithm CDATA #REQUIRED >
<!ELEMENT Reference (Transforms?, DigestMethod, DigestValue) >
<!ATTLIST Reference
Id ID #IMPLIED
URI CDATA #IMPLIED
Type CDATA #IMPLIED>
<!ELEMENT Transforms (Transform+)>
<!ELEMENT Transform (#PCDATA|XPath %Transform.ANY;)* >
<!ATTLIST Transform
Algorithm CDATA #REQUIRED >
<!ELEMENT XPath (#PCDATA) >
<!ELEMENT DigestMethod (#PCDATA %Method.ANY;)* >
<!ATTLIST DigestMethod
Algorithm CDATA #REQUIRED >
<!ELEMENT DigestValue (#PCDATA) >
<!ELEMENT KeyInfo (#PCDATA|KeyName|KeyValue|RetrievalMethod|
X509Data|PGPData|SPKIData|MgmtData %KeyInfo.ANY;)* >
<!ATTLIST KeyInfo
Id ID #IMPLIED >
<!-- Key Information -->
<!ELEMENT KeyName (#PCDATA) >
<!ELEMENT KeyValue (#PCDATA|DSAKeyValue|RSAKeyValue %KeyValue.ANY;)* >
<!ELEMENT MgmtData (#PCDATA) >
<!ELEMENT RetrievalMethod (Transforms?) >
<!ATTLIST RetrievalMethod
URI CDATA #REQUIRED
Type CDATA #IMPLIED >
<!-- X.509 Data -->
<!ELEMENT X509Data ((X509IssuerSerial | X509SKI | X509SubjectName |
X509Certificate | X509CRL )+ %X509Data.ANY;)>
<!ELEMENT X509IssuerSerial (X509IssuerName, X509SerialNumber) >
<!ELEMENT X509IssuerName (#PCDATA) >
<!ELEMENT X509SubjectName (#PCDATA) >
<!ELEMENT X509SerialNumber (#PCDATA) >
<!ELEMENT X509SKI (#PCDATA) >
<!ELEMENT X509Certificate (#PCDATA) >
<!ELEMENT X509CRL (#PCDATA) >
<!-- PGPData -->
<!ELEMENT PGPData ((PGPKeyID, PGPKeyPacket?) | (PGPKeyPacket) %PGPData.ANY;) >
<!ELEMENT PGPKeyPacket (#PCDATA) >
<!ELEMENT PGPKeyID (#PCDATA) >
<!-- SPKI Data -->
<!ELEMENT SPKIData (SPKISexp %SPKIData.ANY;) >
<!ELEMENT SPKISexp (#PCDATA) >
<!-- Extensible Content -->
<!ELEMENT Object (#PCDATA|Signature|SignatureProperties|Manifest %Object.ANY;)* >
<!ATTLIST Object
Id ID #IMPLIED
MimeType CDATA #IMPLIED
Encoding CDATA #IMPLIED >
<!ELEMENT Manifest (Reference+) >
<!ATTLIST Manifest
Id ID #IMPLIED >
<!ELEMENT SignatureProperties (SignatureProperty+) >
<!ATTLIST SignatureProperties
Id ID #IMPLIED >
<!ELEMENT SignatureProperty (#PCDATA %SignatureProperty.ANY;)* >
<!ATTLIST SignatureProperty
Target CDATA #REQUIRED
Id ID #IMPLIED >
<!-- Algorithm Parameters -->
<!ELEMENT HMACOutputLength (#PCDATA) >
<!ELEMENT DSAKeyValue ((P, Q)?, G?, Y, J?, (Seed, PgenCounter)?) >
<!ELEMENT P (#PCDATA) >
<!ELEMENT Q (#PCDATA) >
<!ELEMENT G (#PCDATA) >
<!ELEMENT Y (#PCDATA) >
<!ELEMENT J (#PCDATA) >
<!ELEMENT Seed (#PCDATA) >
<!ELEMENT PgenCounter (#PCDATA) >
<!ELEMENT RSAKeyValue (Modulus, Exponent) >
<!ELEMENT Modulus (#PCDATA) >
<!ELEMENT Exponent (#PCDATA) >
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.rng
已删除
100644 → 0
浏览文件 @
72eb2a25
<?xml version='1.0' encoding='UTF-8'?>
<!-- http://www.xml.com/lpt/a/2002/01/23/relaxng.html -->
<!-- http://www.oasis-open.org/committees/relax-ng/tutorial-20011203.html -->
<!-- http://www.zvon.org/xxl/XMLSchemaTutorial/Output/ser_wildcards_st8.html -->
<!-- http://lists.oasis-open.org/archives/relax-ng-comment/200206/maillist.html -->
<grammar
xmlns=
'http://relaxng.org/ns/structure/1.0'
xmlns:ds=
'http://www.w3.org/2000/09/xmldsig#'
xmlns:xsi=
'http://www.w3.org/2001/XMLSchema-instance'
ns=
'http://www.w3.org/2000/09/xmldsig#'
datatypeLibrary=
'http://www.w3.org/2001/XMLSchema-datatypes'
>
<start>
<element
name=
'Signature'
><ref
name=
'SignatureType'
/></element>
</start>
<define
name=
'CryptoBinary'
>
<data
type=
'base64Binary'
/>
</define>
<define
name=
'SignatureType'
>
<element
name=
'SignedInfo'
><ref
name=
'SignedInfoType'
/></element>
<element
name=
'SignatureValue'
><ref
name=
'SignatureValueType'
/></element>
<optional><element
name=
'KeyInfo'
><ref
name=
'KeyInfoType'
/></element></optional>
<zeroOrMore><element
name=
'Object'
><ref
name=
'ObjectType'
/></element></zeroOrMore>
<optional><attribute
name=
'Id'
><data
type=
'ID'
/></attribute></optional>
<optional><attribute
name=
'xsi:schemaLocation'
/></optional>
</define>
<define
name=
'SignatureValueType'
>
<data
type=
'base64Binary'
/>
<optional><attribute
name=
'Id'
><data
type=
'ID'
/></attribute></optional>
</define>
<!-- Start SignedInfo -->
<define
name=
'SignedInfoType'
>
<element
name=
'CanonicalizationMethod'
><ref
name=
'CanonicalizationMethodType'
/></element>
<element
name=
'SignatureMethod'
><ref
name=
'SignatureMethodType'
/></element>
<optional><element
name=
'KeyInfo'
><ref
name=
'KeyInfoType'
/></element></optional>
<oneOrMore><element
name=
'Reference'
><ref
name=
'ReferenceType'
/></element></oneOrMore>
<optional><attribute
name=
'Id'
><data
type=
'ID'
/></attribute></optional>
</define>
<define
name=
'CanonicalizationMethodType'
>
<zeroOrMore><ref
name=
'anyThing'
/></zeroOrMore>
<optional><attribute
name=
'Algorithm'
><data
type=
'anyURI'
/></attribute></optional>
</define>
<define
name=
'SignatureMethodType'
>
<optional><element
name=
'HMACOutputLength'
><data
type=
'integer'
/></element></optional>
<zeroOrMore><ref
name=
'anyThing'
/></zeroOrMore>
<optional><attribute
name=
'Algorithm'
><data
type=
'anyURI'
/></attribute></optional>
</define>
<!-- Start Reference -->
<define
name=
'ReferenceType'
>
<optional><element
name=
'Transforms'
><ref
name=
'TransformsType'
/></element></optional>
<element
name=
'DigestMethod'
><ref
name=
'DigestMethodType'
/></element>
<element
name=
'DigestValue'
><ref
name=
'DigestValueType'
/></element>
<optional><attribute
name=
'Type'
><data
type=
'anyURI'
/></attribute></optional>
<optional><attribute
name=
'URI'
><data
type=
'anyURI'
/></attribute></optional>
<optional><attribute
name=
'Id'
><data
type=
'ID'
/></attribute></optional>
</define>
<define
name=
'TransformsType'
>
<oneOrMore><element
name=
'Transform'
><ref
name=
'TransformType'
/></element></oneOrMore>
</define>
<define
name=
'TransformType'
>
<optional><element
name=
'XPath'
><data
type=
'string'
/></element></optional>
<zeroOrMore><ref
name=
'anyThing'
/></zeroOrMore>
<attribute
name=
'Algorithm'
><data
type=
'anyURI'
/></attribute>
</define>
<!-- End Reference -->
<define
name=
'DigestMethodType'
>
<zeroOrMore><ref
name=
'anyThing'
/></zeroOrMore>
<attribute
name=
'Algorithm'
><data
type=
'anyURI'
/></attribute>
</define>
<define
name=
'DigestValueType'
>
<data
type=
'base64Binary'
/>
</define>
<!-- End SignedInfo -->
<!-- Start KeyInfo -->
<define
name=
'KeyInfoType'
>
<oneOrMore>
<choice>
<element
name=
'KeyName'
><data
type=
'string'
/></element>
<element
name=
'KeyValue'
><ref
name=
'KeyValueType'
/></element>
<element
name=
'RetrievalMethod'
><ref
name=
'RetrievalMethodType'
/></element>
<element
name=
'X509Data'
><ref
name=
'X509DataType'
/></element>
<element
name=
'PGPData'
><ref
name=
'PGPDataType'
/></element>
<element
name=
'SPKIData'
><ref
name=
'SPKIDataType'
/></element>
<element
name=
'MgmtData'
><data
type=
'string'
/></element>
<ref
name=
'anyThing'
/>
</choice>
</oneOrMore>
<optional><attribute
name=
'Id'
><data
type=
'ID'
/></attribute></optional>
</define>
<define
name=
'KeyValueType'
>
<choice>
<text/>
<element
name=
'DSAKeyValue'
><ref
name=
'DSAKeyValueType'
/></element>
<element
name=
'RSAKeyValue'
><ref
name=
'RSAKeyValueType'
/></element>
<ref
name=
'anyThing'
/>
</choice>
</define>
<define
name=
'RetrievalMethodType'
>
<optional><element
name=
'Transforms'
><ref
name=
'TransformsType'
/></element></optional>
<optional><attribute
name=
'Type'
><data
type=
'anyURI'
/></attribute></optional>
<optional><attribute
name=
'URI'
><data
type=
'anyURI'
/></attribute></optional>
</define>
<!-- Start X509Data -->
<define
name=
'X509DataType'
>
<oneOrMore>
<choice>
<element
name=
'X509IssuerSerial'
>
<element
name=
'X509IssuerName'
>
<data
type=
'string'
/>
</element>
<element
name=
'X509SerialNumber'
>
<data
type=
'integer'
/>
</element>
</element>
<element
name=
'X509SKI'
>
<data
type=
'base64Binary'
/>
</element>
<element
name=
'X509SubjectName'
>
<data
type=
'string'
/>
</element>
<element
name=
'X509Certificate'
>
<data
type=
'base64Binary'
/>
</element>
<element
name=
'X509CRL'
>
<data
type=
'base64Binary'
/>
</element>
<ref
name=
'anyThing'
/>
</choice>
</oneOrMore>
</define>
<!-- End X509Data -->
<!-- Begin PGPData -->
<define
name=
'PGPDataType'
>
<choice>
<group>
<element
name=
'PGPKeyID'
>
<data
type=
'base64Binary'
/>
</element>
<optional>
<element
name=
'PGPKeyPacket'
>
<data
type=
'base64Binary'
/>
</element>
</optional>
<zeroOrMore>
<ref
name=
'anyThing'
/>
</zeroOrMore>
</group>
<group>
<element
name=
'PGPKeyPacket'
>
<data
type=
'base64Binary'
/>
</element>
<zeroOrMore>
<ref
name=
'anyThing'
/>
</zeroOrMore>
</group>
</choice>
</define>
<!-- End PGPData -->
<!-- Begin SPKIData -->
<define
name=
'SPKIDataType'
>
<oneOrMore>
<element
name=
'SPKISexp'
>
<data
type=
'base64Binary'
/>
</element>
<optional>
<ref
name=
'anyThing'
/>
</optional>
</oneOrMore>
</define>
<!-- End SPKIData -->
<!-- End KeyInfo -->
<!-- Start Object (Manifest, SignatureProperty) -->
<define
name=
'ObjectType'
>
<zeroOrMore>
<choice>
<element
name=
'Manifest'
><ref
name=
'ManifestType'
/></element>
<element
name=
'SignatureProperties'
><ref
name=
'SignaturePropertiesType'
/></element>
<ref
name=
'anyThing'
/>
</choice>
</zeroOrMore>
<optional>
<attribute
name=
'Encoding'
>
<data
type=
'anyURI'
/>
</attribute>
</optional>
<optional>
<attribute
name=
'MimeType'
>
<data
type=
'string'
/>
</attribute>
</optional>
<optional>
<attribute
name=
'Id'
>
<data
type=
'ID'
/>
</attribute>
</optional>
</define>
<define
name=
'ManifestType'
>
<oneOrMore>
<element
name=
'Reference'
><ref
name=
'ReferenceType'
/></element>
</oneOrMore>
<optional><attribute
name=
'Id'
><data
type=
'ID'
/></attribute></optional>
</define>
<define
name=
'SignaturePropertiesType'
>
<oneOrMore>
<element
name=
'SignatureProperty'
><ref
name=
'SignaturePropertyType'
/></element>
</oneOrMore>
<optional>
<attribute
name=
'Id'
>
<data
type=
'ID'
/>
</attribute>
</optional>
</define>
<define
name=
'SignaturePropertyType'
>
<oneOrMore><ref
name=
'anyThing'
/></oneOrMore>
<optional>
<attribute
name=
'Id'
>
<data
type=
'ID'
/>
</attribute>
</optional>
<attribute
name=
'Target'
>
<data
type=
'anyURI'
/>
</attribute>
</define>
<!-- End Object (Manifest, SignatureProperty) -->
<!-- Start KeyValue Element-types -->
<define
name=
'DSAKeyValueType'
>
<optional>
<element
name=
'P'
>
<ref
name=
'CryptoBinary'
/>
</element>
<element
name=
'Q'
>
<ref
name=
'CryptoBinary'
/>
</element>
</optional>
<optional>
<element
name=
'G'
>
<ref
name=
'CryptoBinary'
/>
</element>
</optional>
<element
name=
'Y'
>
<ref
name=
'CryptoBinary'
/>
</element>
<optional>
<element
name=
'J'
>
<ref
name=
'CryptoBinary'
/>
</element>
</optional>
<optional>
<element
name=
'Seed'
>
<ref
name=
'CryptoBinary'
/>
</element>
<element
name=
'PgenCounter'
>
<ref
name=
'CryptoBinary'
/>
</element>
</optional>
</define>
<define
name=
'RSAKeyValueType'
>
<element
name=
'Modulus'
>
<ref
name=
'CryptoBinary'
/>
</element>
<element
name=
'Exponent'
>
<ref
name=
'CryptoBinary'
/>
</element>
</define>
<!-- End KeyValue Element-types -->
<!-- End Signature -->
<!-- This should emulate the ANY content model under lax validation -->
<define
name=
'anyThing'
>
<zeroOrMore>
<choice>
<text/>
<element>
<!-- "except" provided for DTD compatibility -->
<!-- [1] ns='http://www.oasis-open.org/committees/relax-ng/compatibility.html#id' -->
<anyName>
<except>
<nsName/>
<!-- <nsName ns='http://www.w3.org/2001/04/xmlenc#'/> -->
</except>
</anyName>
<ref
name=
'anyThing'
/>
<zeroOrMore>
<attribute>
<anyName/>
</attribute>
</zeroOrMore>
</element>
</choice>
</zeroOrMore>
</define>
</grammar>
\ No newline at end of file
jdk/src/share/classes/com/sun/org/apache/xml/internal/security/resource/schema/xmldsig-core-schema.xsd
已删除
100644 → 0
浏览文件 @
72eb2a25
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE schema
PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"
[
<!ATTLIST schema
xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
<!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
<!ENTITY % p ''>
<!ENTITY % s ''>
]>
<!-- Schema for XML Signatures
http://www.w3.org/2000/09/xmldsig#
$Revision: 1.6 $ on $Date: 2008/07/24 16:15:03 $ by $Author: mullan $
Copyright 2001 The Internet Society and W3C (Massachusetts Institute
of Technology, Institut National de Recherche en Informatique et en
Automatique, Keio University). All Rights Reserved.
http://www.w3.org/Consortium/Legal/
This document is governed by the W3C Software License [1] as described
in the FAQ [2].
[1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
[2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
-->
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
xmlns:ds=
"http://www.w3.org/2000/09/xmldsig#"
targetNamespace=
"http://www.w3.org/2000/09/xmldsig#"
version=
"0.1"
elementFormDefault=
"qualified"
>
<!-- Basic Types Defined for Signatures -->
<simpleType
name=
"CryptoBinary"
>
<restriction
base=
"base64Binary"
>
</restriction>
</simpleType>
<!-- Start Signature -->
<element
name=
"Signature"
type=
"ds:SignatureType"
/>
<complexType
name=
"SignatureType"
>
<sequence>
<element
ref=
"ds:SignedInfo"
/>
<element
ref=
"ds:SignatureValue"
/>
<element
ref=
"ds:KeyInfo"
minOccurs=
"0"
/>
<element
ref=
"ds:Object"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</sequence>
<attribute
name=
"Id"
type=
"ID"
use=
"optional"
/>
</complexType>
<element
name=
"SignatureValue"
type=
"ds:SignatureValueType"
/>
<complexType
name=
"SignatureValueType"
>
<simpleContent>
<extension
base=
"base64Binary"
>
<attribute
name=
"Id"
type=
"ID"
use=
"optional"
/>
</extension>
</simpleContent>
</complexType>
<!-- Start SignedInfo -->
<element
name=
"SignedInfo"
type=
"ds:SignedInfoType"
/>
<complexType
name=
"SignedInfoType"
>
<sequence>
<element
ref=
"ds:CanonicalizationMethod"
/>
<element
ref=
"ds:SignatureMethod"
/>
<element
ref=
"ds:Reference"
maxOccurs=
"unbounded"
/>
</sequence>
<attribute
name=
"Id"
type=
"ID"
use=
"optional"
/>
</complexType>
<element
name=
"CanonicalizationMethod"
type=
"ds:CanonicalizationMethodType"
/>
<complexType
name=
"CanonicalizationMethodType"
mixed=
"true"
>
<sequence>
<any
namespace=
"##any"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
<!-- (0,unbounded) elements from (1,1) namespace -->
</sequence>
<attribute
name=
"Algorithm"
type=
"anyURI"
use=
"required"
/>
</complexType>
<element
name=
"SignatureMethod"
type=
"ds:SignatureMethodType"
/>
<complexType
name=
"SignatureMethodType"
mixed=
"true"
>
<sequence>
<element
name=
"HMACOutputLength"
minOccurs=
"0"
type=
"ds:HMACOutputLengthType"
/>
<any
namespace=
"##other"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
<!-- (0,unbounded) elements from (1,1) external namespace -->
</sequence>
<attribute
name=
"Algorithm"
type=
"anyURI"
use=
"required"
/>
</complexType>
<!-- Start Reference -->
<element
name=
"Reference"
type=
"ds:ReferenceType"
/>
<complexType
name=
"ReferenceType"
>
<sequence>
<element
ref=
"ds:Transforms"
minOccurs=
"0"
/>
<element
ref=
"ds:DigestMethod"
/>
<element
ref=
"ds:DigestValue"
/>
</sequence>
<attribute
name=
"Id"
type=
"ID"
use=
"optional"
/>
<attribute
name=
"URI"
type=
"anyURI"
use=
"optional"
/>
<attribute
name=
"Type"
type=
"anyURI"
use=
"optional"
/>
</complexType>
<element
name=
"Transforms"
type=
"ds:TransformsType"
/>
<complexType
name=
"TransformsType"
>
<sequence>
<element
ref=
"ds:Transform"
maxOccurs=
"unbounded"
/>
</sequence>
</complexType>
<element
name=
"Transform"
type=
"ds:TransformType"
/>
<complexType
name=
"TransformType"
mixed=
"true"
>
<choice
minOccurs=
"0"
maxOccurs=
"unbounded"
>
<any
namespace=
"##other"
processContents=
"lax"
/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
<element
name=
"XPath"
type=
"string"
/>
</choice>
<attribute
name=
"Algorithm"
type=
"anyURI"
use=
"required"
/>
</complexType>
<!-- End Reference -->
<element
name=
"DigestMethod"
type=
"ds:DigestMethodType"
/>
<complexType
name=
"DigestMethodType"
mixed=
"true"
>
<sequence>
<any
namespace=
"##other"
processContents=
"lax"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</sequence>
<attribute
name=
"Algorithm"
type=
"anyURI"
use=
"required"
/>
</complexType>
<element
name=
"DigestValue"
type=
"ds:DigestValueType"
/>
<simpleType
name=
"DigestValueType"
>
<restriction
base=
"base64Binary"
/>
</simpleType>
<!-- End SignedInfo -->
<!-- Start KeyInfo -->
<element
name=
"KeyInfo"
type=
"ds:KeyInfoType"
/>
<complexType
name=
"KeyInfoType"
mixed=
"true"
>
<choice
maxOccurs=
"unbounded"
>
<element
ref=
"ds:KeyName"
/>
<element
ref=
"ds:KeyValue"
/>
<element
ref=
"ds:RetrievalMethod"
/>
<element
ref=
"ds:X509Data"
/>
<element
ref=
"ds:PGPData"
/>
<element
ref=
"ds:SPKIData"
/>
<element
ref=
"ds:MgmtData"
/>
<any
processContents=
"lax"
namespace=
"##other"
/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
</choice>
<attribute
name=
"Id"
type=
"ID"
use=
"optional"
/>
</complexType>
<element
name=
"KeyName"
type=
"string"
/>
<element
name=
"MgmtData"
type=
"string"
/>
<element
name=
"KeyValue"
type=
"ds:KeyValueType"
/>
<complexType
name=
"KeyValueType"
mixed=
"true"
>
<choice>
<element
ref=
"ds:DSAKeyValue"
/>
<element
ref=
"ds:RSAKeyValue"
/>
<any
namespace=
"##other"
processContents=
"lax"
/>
</choice>
</complexType>
<element
name=
"RetrievalMethod"
type=
"ds:RetrievalMethodType"
/>
<complexType
name=
"RetrievalMethodType"
>
<sequence>
<element
ref=
"ds:Transforms"
minOccurs=
"0"
/>
</sequence>
<attribute
name=
"URI"
type=
"anyURI"
/>
<attribute
name=
"Type"
type=
"anyURI"
use=
"optional"
/>
</complexType>
<!-- Start X509Data -->
<element
name=
"X509Data"
type=
"ds:X509DataType"
/>
<complexType
name=
"X509DataType"
>
<sequence
maxOccurs=
"unbounded"
>
<choice>
<element
name=
"X509IssuerSerial"
type=
"ds:X509IssuerSerialType"
/>
<element
name=
"X509SKI"
type=
"base64Binary"
/>
<element
name=
"X509SubjectName"
type=
"string"
/>
<element
name=
"X509Certificate"
type=
"base64Binary"
/>
<element
name=
"X509CRL"
type=
"base64Binary"
/>
<any
namespace=
"##other"
processContents=
"lax"
/>
</choice>
</sequence>
</complexType>
<complexType
name=
"X509IssuerSerialType"
>
<sequence>
<element
name=
"X509IssuerName"
type=
"string"
/>
<element
name=
"X509SerialNumber"
type=
"integer"
/>
</sequence>
</complexType>
<!-- End X509Data -->
<!-- Begin PGPData -->
<element
name=
"PGPData"
type=
"ds:PGPDataType"
/>
<complexType
name=
"PGPDataType"
>
<choice>
<sequence>
<element
name=
"PGPKeyID"
type=
"base64Binary"
/>
<element
name=
"PGPKeyPacket"
type=
"base64Binary"
minOccurs=
"0"
/>
<any
namespace=
"##other"
processContents=
"lax"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</sequence>
<sequence>
<element
name=
"PGPKeyPacket"
type=
"base64Binary"
/>
<any
namespace=
"##other"
processContents=
"lax"
minOccurs=
"0"
maxOccurs=
"unbounded"
/>
</sequence>
</choice>
</complexType>
<!-- End PGPData -->
<!-- Begin SPKIData -->
<element
name=
"SPKIData"
type=
"ds:SPKIDataType"
/>
<complexType
name=
"SPKIDataType"
>
<sequence
maxOccurs=
"unbounded"
>
<element
name=
"SPKISexp"
type=
"base64Binary"
/>
<any
namespace=
"##other"
processContents=
"lax"
minOccurs=
"0"
/>
</sequence>
</complexType>
<!-- End SPKIData -->
<!-- End KeyInfo -->
<!-- Start Object (Manifest, SignatureProperty) -->
<element
name=
"Object"
type=
"ds:ObjectType"
/>
<complexType
name=
"ObjectType"
mixed=
"true"
>
<sequence
minOccurs=
"0"
maxOccurs=
"unbounded"
>
<any
namespace=
"##any"
processContents=
"lax"
/>
</sequence>
<attribute
name=
"Id"
type=
"ID"
use=
"optional"
/>
<attribute
name=
"MimeType"
type=
"string"
use=
"optional"
/>
<!-- add a grep facet -->
<attribute
name=
"Encoding"
type=
"anyURI"
use=
"optional"
/>
</complexType>
<element
name=
"Manifest"
type=
"ds:ManifestType"
/>
<complexType
name=
"ManifestType"
>
<sequence>
<element
ref=
"ds:Reference"
maxOccurs=
"unbounded"
/>
</sequence>
<attribute
name=
"Id"
type=
"ID"
use=
"optional"
/>
</complexType>
<element
name=
"SignatureProperties"
type=
"ds:SignaturePropertiesType"
/>
<complexType
name=
"SignaturePropertiesType"
>
<sequence>
<element
ref=
"ds:SignatureProperty"
maxOccurs=
"unbounded"
/>
</sequence>
<attribute
name=
"Id"
type=
"ID"
use=
"optional"
/>
</complexType>
<element
name=
"SignatureProperty"
type=
"ds:SignaturePropertyType"
/>
<complexType
name=
"SignaturePropertyType"
mixed=
"true"
>
<choice
maxOccurs=
"unbounded"
>
<any
namespace=
"##other"
processContents=
"lax"
/>
<!-- (1,1) elements from (1,unbounded) namespaces -->
</choice>
<attribute
name=
"Target"
type=
"anyURI"
use=
"required"
/>
<attribute
name=
"Id"
type=
"ID"
use=
"optional"
/>
</complexType>
<!-- End Object (Manifest, SignatureProperty) -->
<!-- Start Algorithm Parameters -->
<simpleType
name=
"HMACOutputLengthType"
>
<restriction
base=
"integer"
/>
</simpleType>
<!-- Start KeyValue Element-types -->
<element
name=
"DSAKeyValue"
type=
"ds:DSAKeyValueType"
/>
<complexType
name=
"DSAKeyValueType"
>
<sequence>
<sequence
minOccurs=
"0"
>
<element
name=
"P"
type=
"ds:CryptoBinary"
/>
<element
name=
"Q"
type=
"ds:CryptoBinary"
/>
</sequence>
<element
name=
"G"
type=
"ds:CryptoBinary"
minOccurs=
"0"
/>
<element
name=
"Y"
type=
"ds:CryptoBinary"
/>
<element
name=
"J"
type=
"ds:CryptoBinary"
minOccurs=
"0"
/>
<sequence
minOccurs=
"0"
>
<element
name=
"Seed"
type=
"ds:CryptoBinary"
/>
<element
name=
"PgenCounter"
type=
"ds:CryptoBinary"
/>
</sequence>
</sequence>
</complexType>
<element
name=
"RSAKeyValue"
type=
"ds:RSAKeyValueType"
/>
<complexType
name=
"RSAKeyValueType"
>
<sequence>
<element
name=
"Modulus"
type=
"ds:CryptoBinary"
/>
<element
name=
"Exponent"
type=
"ds:CryptoBinary"
/>
</sequence>
</complexType>
<!-- End KeyValue Element-types -->
<!-- End Signature -->
</schema>
jdk/src/share/classes/jdk/internal/util/xml/impl/Parser.java
浏览文件 @
620bc844
...
...
@@ -2860,14 +2860,25 @@ public abstract class Parser {
}
else
{
// Get encoding from BOM or the xml text decl.
reader
=
bom
(
is
.
getByteStream
(),
' '
);
/**
* [#4.3.3] requires BOM for UTF-16, however, it's not uncommon
* that it may be missing. A mature technique exists in Xerces
* to further check for possible UTF-16 encoding
*/
if
(
reader
==
null
)
{
reader
=
utf16
(
is
.
getByteStream
());
}
if
(
reader
==
null
)
{
// Encoding is defined by the xml text decl.
reader
=
enc
(
"UTF-8"
,
is
.
getByteStream
());
expenc
=
xml
(
reader
);
if
(
expenc
.
startsWith
(
"UTF-16"
))
{
panic
(
FAULT
);
// UTF-16 must have BOM [#4.3.3]
if
(!
expenc
.
equals
(
"UTF-8"
))
{
if
(
expenc
.
startsWith
(
"UTF-16"
))
{
panic
(
FAULT
);
// UTF-16 must have BOM [#4.3.3]
}
reader
=
enc
(
expenc
,
is
.
getByteStream
());
}
reader
=
enc
(
expenc
,
is
.
getByteStream
());
}
else
{
// Encoding is defined by the BOM.
xml
(
reader
);
...
...
@@ -2956,6 +2967,49 @@ public abstract class Parser {
}
}
/**
* Using a mature technique from Xerces, this method checks further after
* the bom method above to see if the encoding is UTF-16
*
* @param is A byte stream of the entity.
* @return a reader, may be null
* @exception Exception is parser specific exception form panic method.
* @exception IOException
*/
private
Reader
utf16
(
InputStream
is
)
throws
Exception
{
if
(
mChIdx
!=
0
)
{
//The bom method has read ONE byte into the buffer.
byte
b0
=
(
byte
)
mChars
[
0
];
if
(
b0
==
0x00
||
b0
==
0x3C
)
{
int
b1
=
is
.
read
();
int
b2
=
is
.
read
();
int
b3
=
is
.
read
();
if
(
b0
==
0x00
&&
b1
==
0x3C
&&
b2
==
0x00
&&
b3
==
0x3F
)
{
// UTF-16, big-endian, no BOM
mChars
[
0
]
=
(
char
)(
b1
);
mChars
[
mChIdx
++]
=
(
char
)(
b3
);
return
new
ReaderUTF16
(
is
,
'b'
);
}
else
if
(
b0
==
0x3C
&&
b1
==
0x00
&&
b2
==
0x3F
&&
b3
==
0x00
)
{
// UTF-16, little-endian, no BOM
mChars
[
0
]
=
(
char
)(
b0
);
mChars
[
mChIdx
++]
=
(
char
)(
b2
);
return
new
ReaderUTF16
(
is
,
'l'
);
}
else
{
/**not every InputStream supports reset, so we have to remember
* the state for further parsing
**/
mChars
[
0
]
=
(
char
)(
b0
);
mChars
[
mChIdx
++]
=
(
char
)(
b1
);
mChars
[
mChIdx
++]
=
(
char
)(
b2
);
mChars
[
mChIdx
++]
=
(
char
)(
b3
);
}
}
}
return
null
;
}
/**
* Parses the xml text declaration.
*
...
...
@@ -2974,17 +3028,17 @@ public abstract class Parser {
String
enc
=
"UTF-8"
;
char
ch
;
int
val
;
short
st
;
// Read the xml text declaration into the buffer
if
(
mChIdx
!=
0
)
{
// The bom method have read ONE char into the buffer.
st
=
(
short
)
((
mChars
[
0
]
==
'<'
)
?
1
:
-
1
);
}
else
{
st
=
0
;
}
short
st
=
0
;
int
byteRead
=
mChIdx
;
//number of bytes read prior to entering this method
while
(
st
>=
0
&&
mChIdx
<
mChars
.
length
)
{
ch
=
((
val
=
reader
.
read
())
>=
0
)
?
(
char
)
val
:
EOS
;
mChars
[
mChIdx
++]
=
ch
;
if
(
st
<
byteRead
)
{
ch
=
mChars
[
st
];
}
else
{
ch
=
((
val
=
reader
.
read
())
>=
0
)
?
(
char
)
val
:
EOS
;
mChars
[
mChIdx
++]
=
ch
;
}
switch
(
st
)
{
case
0
:
// read '<' of xml declaration
switch
(
ch
)
{
...
...
jdk/src/share/classes/sun/nio/ch/ServerSocketAdaptor.java
浏览文件 @
620bc844
...
...
@@ -93,9 +93,9 @@ public class ServerSocketAdaptor // package-private
public
Socket
accept
()
throws
IOException
{
synchronized
(
ssc
.
blockingLock
())
{
if
(!
ssc
.
isBound
())
throw
new
IllegalBlockingModeException
();
try
{
if
(!
ssc
.
isBound
())
throw
new
NotYetBoundException
();
if
(
timeout
==
0
)
{
SocketChannel
sc
=
ssc
.
accept
();
if
(
sc
==
null
&&
!
ssc
.
isBlocking
())
...
...
jdk/src/share/classes/sun/security/krb5/KdcComm.java
浏览文件 @
620bc844
/*
* Copyright (c) 2000, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
4
, 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
...
...
@@ -144,7 +144,8 @@ public final class KdcComm {
try
{
Config
cfg
=
Config
.
getInstance
();
String
temp
=
cfg
.
get
(
"libdefaults"
,
"kdc_timeout"
);
timeout
=
parsePositiveIntString
(
temp
);
timeout
=
parseTimeString
(
temp
);
temp
=
cfg
.
get
(
"libdefaults"
,
"max_retries"
);
max_retries
=
parsePositiveIntString
(
temp
);
temp
=
cfg
.
get
(
"libdefaults"
,
"udp_preference_limit"
);
...
...
@@ -425,6 +426,25 @@ public final class KdcComm {
}
}
/**
* Parses a time value string. If it ends with "s", parses as seconds.
* Otherwise, parses as milliseconds.
* @param s the time string
* @return the integer value in milliseconds, or -1 if input is null or
* has an invalid format
*/
private
static
int
parseTimeString
(
String
s
)
{
if
(
s
==
null
)
{
return
-
1
;
}
if
(
s
.
endsWith
(
"s"
))
{
int
seconds
=
parsePositiveIntString
(
s
.
substring
(
0
,
s
.
length
()-
1
));
return
(
seconds
<
0
)
?
-
1
:
(
seconds
*
1000
);
}
else
{
return
parsePositiveIntString
(
s
);
}
}
/**
* Returns krb5.conf setting of {@code key} for a specific realm,
* which can be:
...
...
@@ -446,7 +466,11 @@ public final class KdcComm {
try
{
String
value
=
Config
.
getInstance
().
get
(
"realms"
,
realm
,
key
);
temp
=
parsePositiveIntString
(
value
);
if
(
key
.
equals
(
"kdc_timeout"
))
{
temp
=
parseTimeString
(
value
);
}
else
{
temp
=
parsePositiveIntString
(
value
);
}
}
catch
(
Exception
exc
)
{
// Ignored, defValue will be picked up
}
...
...
jdk/src/share/classes/sun/security/smartcardio/CardImpl.java
浏览文件 @
620bc844
...
...
@@ -246,7 +246,7 @@ final class CardImpl extends Card {
}
checkExclusive
();
try
{
SCardDisconnect
(
cardId
,
(
reset
?
SCARD_
LEAVE_CARD
:
SCARD_RESET
_CARD
));
SCardDisconnect
(
cardId
,
(
reset
?
SCARD_
RESET_CARD
:
SCARD_LEAVE
_CARD
));
}
catch
(
PCSCException
e
)
{
throw
new
CardException
(
"disconnect() failed"
,
e
);
}
finally
{
...
...
jdk/src/share/classes/sun/security/tools/jarsigner/Main.java
浏览文件 @
620bc844
...
...
@@ -1560,8 +1560,7 @@ public class Main {
first
=
false
;
}
try
{
CertPath
cp
=
certificateFactory
.
generateCertPath
(
certs
);
validator
.
validate
(
cp
,
pkixParameters
);
validateCertChain
(
certs
);
}
catch
(
Exception
e
)
{
if
(
debug
)
{
e
.
printStackTrace
();
...
...
@@ -1871,8 +1870,7 @@ public class Main {
printCert
(
""
,
certChain
[
0
],
true
,
null
,
true
);
try
{
CertPath
cp
=
certificateFactory
.
generateCertPath
(
Arrays
.
asList
(
certChain
));
validator
.
validate
(
cp
,
pkixParameters
);
validateCertChain
(
Arrays
.
asList
(
certChain
));
}
catch
(
Exception
e
)
{
if
(
debug
)
{
e
.
printStackTrace
();
...
...
@@ -1937,6 +1935,22 @@ public class Main {
System
.
exit
(
1
);
}
void
validateCertChain
(
List
<?
extends
Certificate
>
certs
)
throws
Exception
{
int
cpLen
=
0
;
out:
for
(;
cpLen
<
certs
.
size
();
cpLen
++)
{
for
(
TrustAnchor
ta:
pkixParameters
.
getTrustAnchors
())
{
if
(
ta
.
getTrustedCert
().
equals
(
certs
.
get
(
cpLen
)))
{
break
out
;
}
}
}
if
(
cpLen
>
0
)
{
CertPath
cp
=
certificateFactory
.
generateCertPath
(
(
cpLen
==
certs
.
size
())?
certs:
certs
.
subList
(
0
,
cpLen
));
validator
.
validate
(
cp
,
pkixParameters
);
}
}
char
[]
getPass
(
String
prompt
)
{
System
.
err
.
print
(
prompt
);
...
...
jdk/src/share/native/sun/security/smartcardio/pcsc.c
浏览文件 @
620bc844
...
...
@@ -125,7 +125,7 @@ JNIEXPORT jlong JNICALL Java_sun_security_smartcardio_PCSC_SCardEstablishContext
jobjectArray
pcsc_multi2jstring
(
JNIEnv
*
env
,
char
*
spec
)
{
jobjectArray
result
;
jclass
stringClass
;
char
*
cp
,
**
tab
;
char
*
cp
,
**
tab
=
NULL
;
jstring
js
;
int
cnt
=
0
;
...
...
@@ -179,7 +179,7 @@ JNIEXPORT jobjectArray JNICALL Java_sun_security_smartcardio_PCSC_SCardListReade
{
SCARDCONTEXT
context
=
(
SCARDCONTEXT
)
jContext
;
LONG
rv
;
LPTSTR
mszReaders
;
LPTSTR
mszReaders
=
NULL
;
DWORD
size
=
0
;
jobjectArray
result
;
...
...
@@ -190,18 +190,20 @@ JNIEXPORT jobjectArray JNICALL Java_sun_security_smartcardio_PCSC_SCardListReade
}
dprintf1
(
"-size: %d
\n
"
,
size
);
mszReaders
=
malloc
(
size
);
if
(
mszReaders
==
NULL
)
{
throwOutOfMemoryError
(
env
,
NULL
);
return
NULL
;
}
if
(
size
)
{
mszReaders
=
malloc
(
size
);
if
(
mszReaders
==
NULL
)
{
throwOutOfMemoryError
(
env
,
NULL
);
return
NULL
;
}
rv
=
CALL_SCardListReaders
(
context
,
NULL
,
mszReaders
,
&
size
);
if
(
handleRV
(
env
,
rv
))
{
free
(
mszReaders
);
return
NULL
;
rv
=
CALL_SCardListReaders
(
context
,
NULL
,
mszReaders
,
&
size
);
if
(
handleRV
(
env
,
rv
))
{
free
(
mszReaders
);
return
NULL
;
}
dprintf1
(
"-String: %s
\n
"
,
mszReaders
);
}
dprintf1
(
"-String: %s
\n
"
,
mszReaders
);
result
=
pcsc_multi2jstring
(
env
,
mszReaders
);
free
(
mszReaders
);
...
...
@@ -336,7 +338,7 @@ JNIEXPORT jintArray JNICALL Java_sun_security_smartcardio_PCSC_SCardGetStatusCha
const
char
*
readerName
;
readerState
=
calloc
(
readers
,
sizeof
(
SCARD_READERSTATE
));
if
(
readerState
==
NULL
)
{
if
(
readerState
==
NULL
&&
readers
>
0
)
{
throwOutOfMemoryError
(
env
,
NULL
);
return
NULL
;
}
...
...
@@ -347,6 +349,10 @@ JNIEXPORT jintArray JNICALL Java_sun_security_smartcardio_PCSC_SCardGetStatusCha
return
NULL
;
}
for
(
i
=
0
;
i
<
readers
;
i
++
)
{
readerState
[
i
].
szReader
=
NULL
;
}
for
(
i
=
0
;
i
<
readers
;
i
++
)
{
jobject
jReaderName
=
(
*
env
)
->
GetObjectArrayElement
(
env
,
jReaderNames
,
i
);
if
((
*
env
)
->
ExceptionCheck
(
env
))
{
...
...
@@ -369,9 +375,11 @@ JNIEXPORT jintArray JNICALL Java_sun_security_smartcardio_PCSC_SCardGetStatusCha
(
*
env
)
->
DeleteLocalRef
(
env
,
jReaderName
);
}
rv
=
CALL_SCardGetStatusChange
(
context
,
(
DWORD
)
jTimeout
,
readerState
,
readers
);
if
(
handleRV
(
env
,
rv
))
{
goto
cleanup
;
if
(
readers
>
0
)
{
rv
=
CALL_SCardGetStatusChange
(
context
,
(
DWORD
)
jTimeout
,
readerState
,
readers
);
if
(
handleRV
(
env
,
rv
))
{
goto
cleanup
;
}
}
jEventState
=
(
*
env
)
->
NewIntArray
(
env
,
readers
);
...
...
jdk/src/solaris/classes/java/lang/UNIXProcess.java
浏览文件 @
620bc844
...
...
@@ -97,6 +97,7 @@ final class UNIXProcess extends Process {
EnumSet
.
copyOf
(
Arrays
.
asList
(
launchMechanisms
));
}
@SuppressWarnings
(
"fallthrough"
)
private
String
helperPath
(
String
javahome
,
String
osArch
)
{
switch
(
this
)
{
case
SOLARIS:
...
...
jdk/src/solaris/native/sun/security/smartcardio/pcsc_md.c
浏览文件 @
620bc844
...
...
@@ -136,5 +136,9 @@ JNIEXPORT void JNICALL Java_sun_security_smartcardio_PlatformPCSC_initialize
if
((
*
env
)
->
ExceptionCheck
(
env
))
{
return
;
}
#ifndef __APPLE__
scardControl
=
(
FPTR_SCardControl
)
findFunction
(
env
,
hModule
,
"SCardControl"
);
#else
scardControl
=
(
FPTR_SCardControl
)
findFunction
(
env
,
hModule
,
"SCardControl132"
);
#endif // __APPLE__
}
jdk/test/ProblemList.txt
浏览文件 @
620bc844
...
...
@@ -261,6 +261,10 @@ com/sun/jdi/JdbMethodExitTest.sh generic-all
# 8041934
com/sun/jdi/RepStep.java generic-all
# 8044419
com/sun/jdi/JdbReadTwiceTest.sh generic-all
############################################################################
# jdk_util
...
...
jdk/test/java/lang/invoke/lambda/LogGeneratedClassesTest.java
浏览文件 @
620bc844
...
...
@@ -33,11 +33,9 @@ import java.io.IOException;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.nio.file.Files
;
import
java.nio.file.LinkOption
;
import
java.nio.file.Path
;
import
java.nio.file.Paths
;
import
java.nio.file.attribute.PosixFileAttributeView
;
import
java.util.stream.Stream
;
import
org.testng.annotations.AfterClass
;
import
org.testng.annotations.BeforeClass
;
...
...
@@ -163,34 +161,66 @@ public class LogGeneratedClassesTest extends LUtils {
tr
.
assertZero
(
"Should still return 0"
);
}
private
static
boolean
isWriteableDirectory
(
Path
p
)
{
if
(!
Files
.
isDirectory
(
p
))
{
return
false
;
}
Path
test
=
p
.
resolve
(
Paths
.
get
(
"test"
));
try
{
Files
.
createFile
(
test
);
assertTrue
(
Files
.
exists
(
test
));
return
true
;
}
catch
(
IOException
e
)
{
assertFalse
(
Files
.
exists
(
test
));
return
false
;
}
finally
{
if
(
Files
.
exists
(
test
))
{
try
{
Files
.
delete
(
test
);
}
catch
(
IOException
e
)
{
throw
new
Error
(
e
);
}
}
}
}
@Test
public
void
testDumpDirNotWritable
()
throws
IOException
{
if
(!
Files
.
getFileStore
(
Paths
.
get
(
"."
))
.
supportsFileAttributeView
(
PosixFileAttributeView
.
class
))
{
if
(!
Files
.
getFileStore
(
Paths
.
get
(
"."
))
.
supportsFileAttributeView
(
PosixFileAttributeView
.
class
))
{
// No easy way to setup readonly directory without POSIX
// We would like to skip the test with a cause with
// throw new SkipException("Posix not supported");
// but jtreg will report failure so we just pass the test
// which we can look at if jtreg changed its behavior
System
.
out
.
println
(
"WARNING: POSIX is not supported. Skipping testDumpDirNotWritable test."
);
return
;
}
Files
.
createDirectory
(
Paths
.
get
(
"readOnly"
),
asFileAttribute
(
fromString
(
"r-xr-xr-x"
)));
TestResult
tr
=
doExec
(
JAVA_CMD
.
getAbsolutePath
(),
"-cp"
,
"."
,
"-Djdk.internal.lambda.dumpProxyClasses=readOnly"
,
"-Djava.security.manager"
,
"com.example.TestLambda"
);
assertEquals
(
tr
.
testOutput
.
stream
()
.
filter
(
s
->
s
.
startsWith
(
"WARNING"
))
.
peek
(
s
->
assertTrue
(
s
.
contains
(
"not writable"
)))
.
count
(),
1
,
"only show error once"
);
tr
.
assertZero
(
"Should still return 0"
);
TestUtil
.
removeAll
(
Paths
.
get
(
"readOnly"
));
try
{
if
(
isWriteableDirectory
(
Paths
.
get
(
"readOnly"
)))
{
// Skipping the test: it's allowed to write into read-only directory
// (e.g. current user is super user).
System
.
out
.
println
(
"WARNING: readOnly directory is writeable. Skipping testDumpDirNotWritable test."
);
return
;
}
TestResult
tr
=
doExec
(
JAVA_CMD
.
getAbsolutePath
(),
"-cp"
,
"."
,
"-Djdk.internal.lambda.dumpProxyClasses=readOnly"
,
"-Djava.security.manager"
,
"com.example.TestLambda"
);
assertEquals
(
tr
.
testOutput
.
stream
()
.
filter
(
s
->
s
.
startsWith
(
"WARNING"
))
.
peek
(
s
->
assertTrue
(
s
.
contains
(
"not writable"
)))
.
count
(),
1
,
"only show error once"
);
tr
.
assertZero
(
"Should still return 0"
);
}
finally
{
TestUtil
.
removeAll
(
Paths
.
get
(
"readOnly"
));
}
}
@Test
...
...
jdk/test/java/util/Properties/LoadAndStoreXML.java
浏览文件 @
620bc844
...
...
@@ -32,6 +32,7 @@ import java.io.ByteArrayOutputStream;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.UnsupportedEncodingException
;
import
java.nio.charset.Charset
;
import
java.nio.file.DirectoryStream
;
import
java.nio.file.Files
;
import
java.nio.file.Path
;
...
...
@@ -47,6 +48,7 @@ import java.util.Properties;
import
java.util.PropertyPermission
;
public
class
LoadAndStoreXML
{
static
final
String
bomChar
=
"\uFEFF"
;
/**
* Simple policy implementation that grants a set of permissions to
...
...
@@ -125,13 +127,14 @@ public class LoadAndStoreXML {
* Sanity test that properties saved with Properties#storeToXML can be
* read with Properties#loadFromXML.
*/
static
void
testLoadAndStore
(
String
encoding
)
throws
IOException
{
static
void
testLoadAndStore
(
String
encoding
,
boolean
appendBOM
)
throws
IOException
{
System
.
out
.
println
(
"testLoadAndStore, encoding="
+
encoding
);
Properties
props
=
new
Properties
();
props
.
put
(
"k0"
,
"\u6C34"
);
props
.
put
(
"k1"
,
"foo"
);
props
.
put
(
"k2"
,
"bar"
);
props
.
put
(
"k3"
,
"\
\u0020\\u0391\\u0392\\u0393\\u0394\\u0395\\u0396\
\u0397"
);
props
.
put
(
"k3"
,
"\
u0020\u0391\u0392\u0393\u0394\u0395\u0396
\u0397"
);
props
.
put
(
"k4"
,
"\u7532\u9aa8\u6587"
);
props
.
put
(
"k5"
,
"<java.home>/lib/jaxp.properties"
);
...
...
@@ -141,7 +144,17 @@ public class LoadAndStoreXML {
throw
new
RuntimeException
(
"OutputStream closed by storeToXML"
);
Properties
p
=
new
Properties
();
TestInputStream
in
=
new
TestInputStream
(
out
.
toByteArray
());
TestInputStream
in
;
if
(
appendBOM
)
{
byte
[]
byteOrderMark
=
bomChar
.
getBytes
(
Charset
.
forName
(
encoding
));
byte
[]
outArray
=
out
.
toByteArray
();
byte
[]
inputArray
=
new
byte
[
byteOrderMark
.
length
+
outArray
.
length
];
System
.
arraycopy
(
byteOrderMark
,
0
,
inputArray
,
0
,
byteOrderMark
.
length
);
System
.
arraycopy
(
outArray
,
0
,
inputArray
,
byteOrderMark
.
length
,
outArray
.
length
);
in
=
new
TestInputStream
(
inputArray
);
}
else
{
in
=
new
TestInputStream
(
out
.
toByteArray
());
}
p
.
loadFromXML
(
in
);
if
(
in
.
isOpen
())
throw
new
RuntimeException
(
"InputStream not closed by loadFromXML"
);
...
...
@@ -231,8 +244,12 @@ public class LoadAndStoreXML {
public
static
void
main
(
String
[]
args
)
throws
IOException
{
testLoadAndStore
(
"UTF-8"
);
testLoadAndStore
(
"UTF-16"
);
testLoadAndStore
(
"UTF-8"
,
false
);
testLoadAndStore
(
"UTF-16"
,
false
);
testLoadAndStore
(
"UTF-16BE"
,
false
);
testLoadAndStore
(
"UTF-16LE"
,
false
);
testLoadAndStore
(
"UTF-16BE"
,
true
);
testLoadAndStore
(
"UTF-16LE"
,
true
);
testLoadWithoutEncoding
();
testLoadWithBadEncoding
();
testStoreWithBadEncoding
();
...
...
@@ -250,7 +267,7 @@ public class LoadAndStoreXML {
Policy
.
setPolicy
(
p
);
System
.
setSecurityManager
(
new
SecurityManager
());
try
{
testLoadAndStore
(
"UTF-8"
);
testLoadAndStore
(
"UTF-8"
,
false
);
}
finally
{
// turn off security manager and restore policy
System
.
setSecurityManager
(
null
);
...
...
jdk/test/sun/nio/ch/ServerSocketAdaptorTest.java
0 → 100644
浏览文件 @
620bc844
/*
* Copyright (c) 2014, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 8024832
*/
import
java.io.IOException
;
import
java.net.ServerSocket
;
import
java.net.SocketException
;
import
java.nio.channels.ServerSocketChannel
;
public
class
ServerSocketAdaptorTest
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
String
message
=
null
;
try
(
ServerSocket
s
=
new
ServerSocket
())
{
s
.
accept
();
throw
new
AssertionError
();
}
catch
(
IOException
e
)
{
message
=
e
.
getMessage
();
}
try
(
ServerSocket
ss
=
ServerSocketChannel
.
open
().
socket
())
{
assert
!
ss
.
isBound
()
:
"the assumption !ss.isBound() doesn't hold"
;
try
{
ss
.
accept
();
throw
new
AssertionError
();
}
catch
(
Exception
e
)
{
if
(
e
instanceof
SocketException
&&
message
.
equals
(
e
.
getMessage
()))
{
return
;
}
else
{
throw
new
AssertionError
(
"Expected to throw SocketException with a particular message"
,
e
);
}
}
}
}
}
jdk/test/sun/security/krb5/auto/KDC.java
浏览文件 @
620bc844
...
...
@@ -141,6 +141,8 @@ public class KDC {
private
BlockingQueue
<
Job
>
q
=
new
ArrayBlockingQueue
<>(
100
);
// Options
private
Map
<
Option
,
Object
>
options
=
new
HashMap
<>();
// Realm-specific krb5.conf settings
private
List
<
String
>
conf
=
new
ArrayList
<>();
private
Thread
thread1
,
thread2
,
thread3
;
DatagramSocket
u1
=
null
;
...
...
@@ -243,7 +245,7 @@ public class KDC {
/**
* Sets an option
* @param key the option name
* @param
obj
the value
* @param
value
the value
*/
public
void
setOption
(
Option
key
,
Object
value
)
{
if
(
value
==
null
)
{
...
...
@@ -372,6 +374,13 @@ public class KDC {
return
kdc
;
}
/**
* Add realm-specific krb5.conf setting
*/
public
void
addConf
(
String
s
)
{
conf
.
add
(
s
);
}
/**
* Writes a krb5.conf for one or more KDC that includes KDC locations for
* each realm and the default realm name. You can also add extra strings
...
...
@@ -397,6 +406,7 @@ public class KDC {
* [realms]
* REALM.NAME = {
* kdc = host:port_number
* # realm-specific settings
* }
* </pre>
*
...
...
@@ -444,10 +454,10 @@ public class KDC {
}
}
sb
.
append
(
"\n[realms]\n"
);
sb
.
append
(
realmLineForKDC
(
kdc
));
sb
.
append
(
kdc
.
realmLine
(
));
for
(
Object
o:
more
)
{
if
(
o
instanceof
KDC
)
{
sb
.
append
(
realmLineForKDC
((
KDC
)
o
));
sb
.
append
(
((
KDC
)
o
).
realmLine
(
));
}
}
FileOutputStream
fos
=
new
FileOutputStream
(
f
);
...
...
@@ -1133,14 +1143,16 @@ public class KDC {
/**
* Generates a line for a KDC to put inside [realms] of krb5.conf
* @param kdc the KDC
* @return REALM.NAME = { kdc = host:port }
* @return REALM.NAME = { kdc = host:port etc }
*/
private
static
String
realmLineForKDC
(
KDC
kdc
)
{
return
String
.
format
(
"%s = {\n kdc = %s:%d\n}\n"
,
kdc
.
realm
,
kdc
.
kdc
,
kdc
.
port
);
private
String
realmLine
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
realm
).
append
(
" = {\n kdc = "
)
.
append
(
kdc
).
append
(
':'
).
append
(
port
).
append
(
'\n'
);
for
(
String
s:
conf
)
{
sb
.
append
(
" "
).
append
(
s
).
append
(
'\n'
);
}
return
sb
.
append
(
"}\n"
).
toString
();
}
/**
...
...
jdk/test/sun/security/krb5/auto/UdpTcp.java
浏览文件 @
620bc844
...
...
@@ -43,9 +43,15 @@ public class UdpTcp {
OneKDC
kdc
=
new
OneKDC
(
null
);
kdc
.
writeJAASConf
();
KDC
.
saveConfig
(
OneKDC
.
KRB5_CONF
,
kdc
,
"udp_preference_limit = "
+
(
args
[
0
].
equals
(
"UDP"
)
?
"1000"
:
"100"
));
// Two styles of kdc_timeout setting. One global, one realm-specific.
if
(
args
[
0
].
equals
(
"UDP"
))
{
KDC
.
saveConfig
(
OneKDC
.
KRB5_CONF
,
kdc
,
"kdc_timeout = 10s"
);
}
else
{
kdc
.
addConf
(
"kdc_timeout = 10s"
);
KDC
.
saveConfig
(
OneKDC
.
KRB5_CONF
,
kdc
,
"udp_preference_limit = 1"
);
}
Config
.
refresh
();
ByteArrayOutputStream
bo
=
new
ByteArrayOutputStream
();
...
...
@@ -56,7 +62,7 @@ public class UdpTcp {
for
(
String
line:
new
String
(
bo
.
toByteArray
()).
split
(
"\n"
))
{
if
(
line
.
contains
(
">>> KDCCommunication"
))
{
if
(!
line
.
contains
(
args
[
0
]))
{
if
(!
line
.
contains
(
args
[
0
])
||
!
line
.
contains
(
"timeout=10000"
)
)
{
throw
new
Exception
(
"No "
+
args
[
0
]
+
" in: "
+
line
);
}
}
...
...
jdk/test/sun/security/pkcs11/PKCS11Test.java
浏览文件 @
620bc844
/*
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
4
, 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
...
...
@@ -457,7 +457,7 @@ public abstract class PKCS11Test {
osMap
.
put
(
"SunOS-x86-32"
,
new
String
[]{
"/usr/lib/mps/"
});
osMap
.
put
(
"SunOS-amd64-64"
,
new
String
[]{
"/usr/lib/mps/64/"
});
osMap
.
put
(
"Linux-i386-32"
,
new
String
[]{
"/usr/lib/i386-linux-gnu/"
,
"/usr/lib/"
});
"/usr/lib/i386-linux-gnu/"
,
"/usr/lib
32/"
,
"/usr/lib
/"
});
osMap
.
put
(
"Linux-amd64-64"
,
new
String
[]{
"/usr/lib/x86_64-linux-gnu/"
,
"/usr/lib/x86_64-linux-gnu/nss/"
,
"/usr/lib64/"
});
...
...
jdk/test/sun/security/tools/jarsigner/certpolicy.sh
0 → 100644
浏览文件 @
620bc844
#
# Copyright (c) 2014, 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
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# @test
# @bug 8036709
# @summary Java 7 jarsigner displays warning about cert policy tree
#
# @run shell certpolicy.sh
#
if
[
"
${
TESTJAVA
}
"
=
""
]
;
then
JAVAC_CMD
=
`
which javac
`
TESTJAVA
=
`
dirname
$JAVAC_CMD
`
/..
fi
KT
=
"
$TESTJAVA
/bin/keytool
$TESTTOOLVMOPTS
\
-keypass changeit -storepass changeit -keystore ks -keyalg rsa"
JS
=
"
$TESTJAVA
/bin/jarsigner
$TESTTOOLVMOPTS
-storepass changeit -keystore ks"
JAR
=
"
$TESTJAVA
/bin/jar
$TESTTOOLVMOPTS
"
rm
ks 2> /dev/null
$KT
-genkeypair
-alias
ca
-dname
CN
=
CA
-ext
bc
$KT
-genkeypair
-alias
int
-dname
CN
=
Int
$KT
-genkeypair
-alias
ee
-dname
CN
=
EE
# CertificatePolicies [[PolicyId: [1.2.3]], [PolicyId: [1.2.4]]]
# PolicyConstraints: [Require: 0; Inhibit: unspecified]
$KT
-certreq
-alias
int |
\
$KT
-gencert
-rfc
-alias
ca
\
-ext
2.5.29.32
=
"30 0C 30 04 06 02 2A 03 30 04 06 02 2A 04"
\
-ext
"2.5.29.36=30 03 80 01 00"
-ext
bc |
\
$KT
-import
-alias
int
# CertificatePolicies [[PolicyId: [1.2.3]]]
$KT
-certreq
-alias
ee |
\
$KT
-gencert
-rfc
-alias
int
\
-ext
2.5.29.32
=
"30 06 30 04 06 02 2A 03"
|
\
$KT
-import
-alias
ee
$KT
-export
-alias
ee
-rfc
>
cc
$KT
-export
-alias
int
-rfc
>>
cc
$KT
-export
-alias
ca
-rfc
>>
cc
$KT
-delete
-alias
int
ERR
=
''
$JAR
cvf a.jar cc
# Make sure the certchain in the signed jar contains all 3 certs
$JS
-strict
-certchain
cc a.jar ee
-debug
||
ERR
=
"sign"
$JS
-strict
-verify
a.jar
-debug
||
ERR
=
"
$ERR
verify"
if
[
"
$ERR
"
=
""
]
;
then
echo
"Success"
exit
0
else
echo
"Failed:
$ERR
"
exit
1
fi
jdk/test/sun/security/tools/keytool/autotest.sh
浏览文件 @
620bc844
#
# Copyright (c) 2006, 201
3
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2006, 201
4
, 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
...
...
@@ -72,6 +72,8 @@ case "$OS" in
Linux
)
if
[
$B32
=
true
]
;
then
LIBNAME
=
`
find_one
\
"/usr/lib32/libsoftokn3.so"
\
"/usr/lib32/nss/libsoftokn3.so"
\
"/usr/lib/libsoftokn3.so"
\
"/usr/lib/i386-linux-gnu/nss/libsoftokn3.so"
\
"/usr/lib/nss/libsoftokn3.so"
`
...
...
nashorn/.hgtags
浏览文件 @
620bc844
...
...
@@ -248,3 +248,4 @@ b3517e51f40477f10db8bc30a557aa0ea712c274 jdk9-b02
282e9a675e079cc84dbfaa4c10050f08397faab0 jdk9-b12
be4580ae56e2ef0ce521d3f840753eaa83cacf33 jdk9-b13
806df06b6ac58d3e9c9c6a680dbdd7a6c94ca700 jdk9-b14
32b66f4661eac52f8b04fb3d7703feb2c96febb7 jdk9-b15
nashorn/make/build.xml
浏览文件 @
620bc844
...
...
@@ -196,14 +196,16 @@
</jar>
</target>
<target
name=
"javadoc"
depends=
"prepare"
>
<javadoc
destdir=
"${dist.javadoc.dir}"
use=
"yes"
overview=
"src/overview.html"
windowtitle=
"${nashorn.product.name} ${nashorn.version}"
additionalparam=
"-quiet"
failonerror=
"true"
>
<target
name=
"javadoc"
depends=
"jar"
>
<javadoc
destdir=
"${dist.javadoc.dir}"
use=
"yes"
overview=
"src/overview.html"
extdirs=
"${nashorn.ext.path}"
windowtitle=
"${nashorn.product.name} ${nashorn.version}"
additionalparam=
"-quiet"
failonerror=
"true"
>
<classpath>
<pathelement
location=
"${build.classes.dir}"
/>
</classpath>
<fileset
dir=
"${src.dir}"
includes=
"**/*.java"
/>
<fileset
dir=
"${jdk.asm.src.dir}"
includes=
"**/*.java"
/>
<link
href=
"http://docs.oracle.com/javase/
7
/docs/api/"
/>
<link
href=
"http://docs.oracle.com/javase/
8
/docs/api/"
/>
<!-- The following tags are used only in ASM sources - just ignore these -->
<tag
name=
"label"
description=
"label tag in ASM sources"
enabled=
"false"
/>
<tag
name=
"linked"
description=
"linked tag in ASM sources"
enabled=
"false"
/>
...
...
@@ -211,6 +213,19 @@
</javadoc>
</target>
<!-- generate javadoc only for nashorn extension api classes -->
<target
name=
"javadocapi"
depends=
"jar"
>
<javadoc
destdir=
"${dist.javadoc.dir}"
use=
"yes"
extdirs=
"${nashorn.ext.path}"
windowtitle=
"${nashorn.product.name}"
additionalparam=
"-quiet"
failonerror=
"true"
>
<classpath>
<pathelement
location=
"${build.classes.dir}"
/>
</classpath>
<fileset
dir=
"${src.dir}"
includes=
"jdk/nashorn/api/**/*.java"
/>
<link
href=
"http://docs.oracle.com/javase/8/docs/api/"
/>
</javadoc>
</target>
<!-- generate shell.html for shell tool documentation -->
<target
name=
"shelldoc"
depends=
"jar"
>
<java
classname=
"${nashorn.shell.tool}"
dir=
"${basedir}"
output=
"${dist.dir}/shell.html"
failonerror=
"true"
fork=
"true"
>
...
...
nashorn/samples/filebrowser.js
0 → 100644
浏览文件 @
620bc844
#
// Usage: jjs -fx filebrowser.js -- <start_dir>
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// Uses -fx and javafx TreeView to visualize directories
if
(
!
$OPTIONS
.
_fx
)
{
print
(
"
Usage: jjs -fx filebrowser.js -- <start_dir>
"
);
exit
(
1
);
}
// Java classes used
var
File
=
Java
.
type
(
"
java.io.File
"
);
var
Files
=
Java
.
type
(
"
java.nio.file.Files
"
);
// check directory argument, if passed
var
dir
=
arguments
.
length
>
0
?
new
File
(
arguments
[
0
])
:
new
File
(
"
.
"
);
if
(
!
dir
.
isDirectory
())
{
print
(
dir
+
"
is not a directory!
"
);
exit
(
2
);
}
// JavaFX classes used
var
FXCollections
=
Java
.
type
(
"
javafx.collections.FXCollections
"
);
var
Scene
=
Java
.
type
(
"
javafx.scene.Scene
"
);
var
TreeItem
=
Java
.
type
(
"
javafx.scene.control.TreeItem
"
);
var
TreeView
=
Java
.
type
(
"
javafx.scene.control.TreeView
"
);
// create a subclass of JavaFX TreeItem class
var
LazyTreeItem
=
Java
.
extend
(
TreeItem
);
// lazily filling children of a directory LazyTreeItem
function
buildChildren
(
dir
)
{
var
children
=
FXCollections
.
observableArrayList
();
var
stream
=
Files
.
list
(
dir
.
toPath
());
stream
.
forEach
(
function
(
path
)
{
var
file
=
path
.
toFile
();
var
item
=
file
.
isDirectory
()?
makeLazyTreeItem
(
file
)
:
new
TreeItem
(
file
.
name
);
children
.
add
(
item
);
});
stream
.
close
();
return
children
;
}
// create an instance LazyTreeItem with override methods
function
makeLazyTreeItem
(
dir
)
{
var
item
=
new
LazyTreeItem
(
dir
.
name
)
{
expanded
:
false
,
isLeaf
:
function
()
false
,
getChildren
:
function
()
{
if
(
!
this
.
expanded
)
{
// call super class (TreeItem) method
Java
.
super
(
item
).
getChildren
().
setAll
(
buildChildren
(
dir
));
this
.
expanded
=
true
;
}
// call super class (TreeItem) method
return
Java
.
super
(
item
).
getChildren
();
}
}
return
item
;
}
// JavaFX start method
function
start
(
stage
)
{
stage
.
title
=
dir
.
absolutePath
;
var
rootItem
=
makeLazyTreeItem
(
dir
);
rootItem
.
expanded
=
true
;
var
tree
=
new
TreeView
(
rootItem
);
stage
.
scene
=
new
Scene
(
tree
,
300
,
450
);
stage
.
show
();
}
nashorn/samples/word_histogram.js
0 → 100644
浏览文件 @
620bc844
#
nashorn
word
histogram
of
a
file
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* - Neither the name of Oracle nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/*
* This example demonstrates how to print word histogram
* of a given text file using regex, array and JSON
* functions.
*/
if
(
arguments
.
length
<
1
)
{
print
(
"
Usage: jjs -scripting word_histogram.js -- <file>
"
);
exit
(
1
);
}
var
obj
=
{};
readFully
(
arguments
[
0
]).
split
(
/
[^\w
+
]
/
).
forEach
(
function
(
x
)
(
x
in
obj
?
obj
[
x
]
++
:
obj
[
x
]
=
1
));
print
(
JSON
.
stringify
(
obj
));
nashorn/src/jdk/nashorn/api/scripting/ScriptObjectMirror.java
浏览文件 @
620bc844
...
...
@@ -621,6 +621,7 @@ public final class ScriptObjectMirror extends AbstractJSObject implements Bindin
/**
* Utilitity to convert this script object to the given type.
*
* @param <T> destination type to convert to
* @param type destination type to convert to
* @return converted object
*/
...
...
nashorn/src/jdk/nashorn/api/scripting/package-info.java
浏览文件 @
620bc844
...
...
@@ -32,7 +32,8 @@
* ScriptEngine nashornEngine = new ScriptEngineManager().getEngineByName("Nashorn");
* </pre>
* <p>Nashorn script engines implement the optional {@link javax.script.Invocable} and {@link javax.script.Compilable}
* interfaces, allowing for efficient pre-compilation and repeated execution of scripts. See
* interfaces, allowing for efficient pre-compilation and repeated execution of scripts. In addition,
* this package provides nashorn specific extension classes, interfaces and methods. See
* {@link jdk.nashorn.api.scripting.NashornScriptEngineFactory} for further details.
*/
package
jdk.nashorn.api.scripting
;
nashorn/src/jdk/nashorn/internal/ir/annotations/Reference.java
浏览文件 @
620bc844
...
...
@@ -32,9 +32,7 @@ import java.lang.annotation.RetentionPolicy;
* Reference node in AST, i.e. anything not a copy. Important for
* AST traversal and cloning. Cloning currently as a rule uses
* existingOrSame for references and otherwise existingOrCopy
* <p>
*/
@Retention
(
value
=
RetentionPolicy
.
RUNTIME
)
public
@interface
Reference
{
// EMPTY
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录