Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
07a8ad88
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
07a8ad88
编写于
1月 25, 2016
作者:
A
asaha
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
ac994f3e
9f2ff119
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
151 addition
and
245 deletion
+151
-245
.hgtags
.hgtags
+13
-0
src/share/classes/com/sun/crypto/provider/GaloisCounterMode.java
...re/classes/com/sun/crypto/provider/GaloisCounterMode.java
+9
-3
src/share/classes/java/io/ObjectInputStream.java
src/share/classes/java/io/ObjectInputStream.java
+15
-4
src/share/classes/java/security/ProtectionDomain.java
src/share/classes/java/security/ProtectionDomain.java
+5
-0
src/share/classes/javax/security/auth/SubjectDomainCombiner.java
...re/classes/javax/security/auth/SubjectDomainCombiner.java
+11
-1
src/share/classes/sun/misc/JavaSecurityProtectionDomainAccess.java
.../classes/sun/misc/JavaSecurityProtectionDomainAccess.java
+5
-0
src/share/classes/sun/security/jgss/wrapper/GSSNameElement.java
...are/classes/sun/security/jgss/wrapper/GSSNameElement.java
+3
-1
src/share/classes/sun/security/provider/DSA.java
src/share/classes/sun/security/provider/DSA.java
+27
-221
src/share/native/sun/font/layout/DeviceTables.cpp
src/share/native/sun/font/layout/DeviceTables.cpp
+4
-1
src/share/native/sun/font/layout/LigatureSubstProc.cpp
src/share/native/sun/font/layout/LigatureSubstProc.cpp
+20
-0
src/share/native/sun/font/layout/LigatureSubstProc2.cpp
src/share/native/sun/font/layout/LigatureSubstProc2.cpp
+16
-0
src/share/native/sun/font/layout/StateTableProcessor2.cpp
src/share/native/sun/font/layout/StateTableProcessor2.cpp
+1
-0
src/share/native/sun/java2d/cmm/lcms/cmscgats.c
src/share/native/sun/java2d/cmm/lcms/cmscgats.c
+2
-0
src/solaris/native/sun/awt/fontpath.c
src/solaris/native/sun/awt/fontpath.c
+16
-6
test/java/security/Signature/TestInitSignWithMyOwnRandom.java
.../java/security/Signature/TestInitSignWithMyOwnRandom.java
+3
-3
test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java
test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java
+0
-4
test/sun/security/provider/DSA/TestDSA2.java
test/sun/security/provider/DSA/TestDSA2.java
+1
-1
未找到文件。
.hgtags
浏览文件 @
07a8ad88
...
...
@@ -432,6 +432,7 @@ ee86422973691bb7efae58d201e5a382ea0bb150 jdk8u51-b16
f94ea276f608b22d78281d70361092ba4864038e jdk8u51-b31
887dde3afb3bb233958775de22eafb3328af6437 jdk8u51-b32
dc7b827522bc3a804f7e8951cc27414f19a7c427 jdk8u51-b33
55ecfc5067721bd27282a14419e5784f7c7d212d jdk8u51-b34
5c31204d19e5976f025026db3d5c17331e8c44db jdk8u60-b00
c46daef6edb5385d11876ed40f292a4b62e96867 jdk8u60-b01
c10fd784956cc7099657181029ac3e790267b678 jdk8u60-b02
...
...
@@ -496,6 +497,11 @@ ea602badedd0cd0c352c072220a884e8f1335e33 jdk8u66-b15
e6d562c0f079dfd1e21c3734b2dca16f4b2e2494 jdk8u66-b17
fd2fe69089aca0f187901a5f6f8bfe261ff17f5b jdk8u66-b18
f712dceafb546ea5833aeea507b5736e7e45f1ae jdk8u66-b31
74cfe16ae44c1c6d511dbeabf13a516da3799d55 jdk8u66-b32
ea7a705eab9e6495d08a92ff21e0370b68374c54 jdk8u66-b33
72ab45285f0e8293aa63e889bc75f0287b6e0436 jdk8u66-b34
e169a214f1f096af6b57169eeb0ba66ee5e9caa3 jdk8u66-b35
430a8d04d8358206b682323f61405f951f43c773 jdk8u66-b36
9a2747ef337bdee71bc8225dea77eb403cca1179 jdk8u71-b00
e8b5e10a19d66a77d04f12d4677e6fec66f79651 jdk8u71-b01
25d689a73bc037e1710f95f6d4acf0671d22047d jdk8u71-b02
...
...
@@ -528,6 +534,13 @@ d7cc3225f1050de03b236b92e12c547f21697013 jdk8u72-b11
d841d3fdae44f120883dab0a3a809a054cd0274b jdk8u72-b13
f6d24d424cd2af4d2612f7737d3d9a25f58b882d jdk8u72-b14
f3e86cc607260bae368b52d88d7bc8883ee767e3 jdk8u72-b15
1d4b343084874b1afa1cdd504b9b1e50bab7f121 jdk8u72-b31
7cfd2c51c501df909833aa0fb6e40c50c61621ed jdk8u75-b00
9e00a43602f87930c2318b2567002871ad9c59dd jdk8u75-b01
9de301db625bb1b462aad3ebd8347118b94bb728 jdk8u75-b02
dcacefa73649a2d821267b6bff1d70aa10a06801 jdk8u75-b03
de91f05824c5398cb2d2f666ff404aaa165498de jdk8u75-b04
4138b3f27ffea524185a604c3f4f149c7e5ba780 jdk8u75-b05
39baa472e20c13c0eb1243eb5dce589e82f78143 jdk8u76-b00
6ea3aea950d19d803475b3f4d704a2942e71b302 jdk8u76-b01
4de4cffb5988cd68959ce4bbd14c6d4547078c91 jdk8u76-b02
...
...
src/share/classes/com/sun/crypto/provider/GaloisCounterMode.java
浏览文件 @
07a8ad88
...
...
@@ -519,11 +519,17 @@ final class GaloisCounterMode extends FeedbackCipher {
byte
[]
sOut
=
new
byte
[
s
.
length
];
GCTR
gctrForSToTag
=
new
GCTR
(
embeddedCipher
,
this
.
preCounterBlock
);
gctrForSToTag
.
doFinal
(
s
,
0
,
s
.
length
,
sOut
,
0
);
// check entire authentication tag for time-consistency
int
mismatch
=
0
;
for
(
int
i
=
0
;
i
<
tagLenBytes
;
i
++)
{
if
(
tag
[
i
]
!=
sOut
[
i
])
{
throw
new
AEADBadTagException
(
"Tag mismatch!"
);
}
mismatch
|=
tag
[
i
]
^
sOut
[
i
];
}
if
(
mismatch
!=
0
)
{
throw
new
AEADBadTagException
(
"Tag mismatch!"
);
}
return
len
;
}
...
...
src/share/classes/java/io/ObjectInputStream.java
浏览文件 @
07a8ad88
...
...
@@ -1890,6 +1890,8 @@ public class ObjectInputStream
if
(
obj
==
null
||
handles
.
lookupException
(
passHandle
)
!=
null
)
{
defaultReadFields
(
null
,
slotDesc
);
// skip field values
}
else
if
(
slotDesc
.
hasReadObjectMethod
())
{
ThreadDeath
t
=
null
;
boolean
reset
=
false
;
SerialCallbackContext
oldContext
=
curContext
;
if
(
oldContext
!=
null
)
oldContext
.
check
();
...
...
@@ -1908,10 +1910,19 @@ public class ObjectInputStream
*/
handles
.
markException
(
passHandle
,
ex
);
}
finally
{
curContext
.
setUsed
();
if
(
oldContext
!=
null
)
oldContext
.
check
();
curContext
=
oldContext
;
do
{
try
{
curContext
.
setUsed
();
if
(
oldContext
!=
null
)
oldContext
.
check
();
curContext
=
oldContext
;
reset
=
true
;
}
catch
(
ThreadDeath
x
)
{
t
=
x
;
// defer until reset is true
}
}
while
(!
reset
);
if
(
t
!=
null
)
throw
t
;
}
/*
...
...
src/share/classes/java/security/ProtectionDomain.java
浏览文件 @
07a8ad88
...
...
@@ -475,6 +475,11 @@ public class ProtectionDomain {
}
};
}
@Override
public
boolean
getStaticPermissionsField
(
ProtectionDomain
pd
)
{
return
pd
.
staticPermissions
;
}
});
}
}
src/share/classes/javax/security/auth/SubjectDomainCombiner.java
浏览文件 @
07a8ad88
...
...
@@ -37,6 +37,8 @@ import java.security.Security;
import
java.util.Set
;
import
java.util.WeakHashMap
;
import
java.lang.ref.WeakReference
;
import
sun.misc.SharedSecrets
;
import
sun.misc.JavaSecurityProtectionDomainAccess
;
/**
* A {@code SubjectDomainCombiner} updates ProtectionDomains
...
...
@@ -65,6 +67,9 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
private
static
final
boolean
allowCaching
=
(
useJavaxPolicy
&&
cachePolicy
());
private
static
final
JavaSecurityProtectionDomainAccess
pdAccess
=
SharedSecrets
.
getJavaSecurityProtectionDomainAccess
();
/**
* Associate the provided {@code Subject} with this
* {@code SubjectDomainCombiner}.
...
...
@@ -239,10 +244,15 @@ public class SubjectDomainCombiner implements java.security.DomainCombiner {
subjectPd
=
cachedPDs
.
getValue
(
pd
);
if
(
subjectPd
==
null
)
{
subjectPd
=
new
ProtectionDomain
(
pd
.
getCodeSource
(),
if
(
pdAccess
.
getStaticPermissionsField
(
pd
))
{
// Need to keep static ProtectionDomain objects static
subjectPd
=
pd
;
}
else
{
subjectPd
=
new
ProtectionDomain
(
pd
.
getCodeSource
(),
pd
.
getPermissions
(),
pd
.
getClassLoader
(),
principals
);
}
cachedPDs
.
putValue
(
pd
,
subjectPd
);
}
else
{
allNew
=
false
;
...
...
src/share/classes/sun/misc/JavaSecurityProtectionDomainAccess.java
浏览文件 @
07a8ad88
...
...
@@ -36,4 +36,9 @@ public interface JavaSecurityProtectionDomainAccess {
* Returns the ProtectionDomainCache.
*/
ProtectionDomainCache
getProtectionDomainCache
();
/**
* Returns the staticPermissions field of the specified object
*/
boolean
getStaticPermissionsField
(
ProtectionDomain
pd
);
}
src/share/classes/sun/security/jgss/wrapper/GSSNameElement.java
浏览文件 @
07a8ad88
...
...
@@ -159,7 +159,9 @@ public class GSSNameElement implements GSSNameSpi {
int
atPos
=
krbName
.
lastIndexOf
(
'@'
);
if
(
atPos
!=
-
1
)
{
String
atRealm
=
krbName
.
substring
(
atPos
);
if
(
nameType
.
equals
(
GSSUtil
.
NT_GSS_KRB5_PRINCIPAL
)
// getNativeNameType() can modify NT_GSS_KRB5_PRINCIPAL to null
if
((
nameType
==
null
||
nameType
.
equals
(
GSSUtil
.
NT_GSS_KRB5_PRINCIPAL
))
&&
new
String
(
nameBytes
).
endsWith
(
atRealm
))
{
// Created from Kerberos name with realm, no need to check
}
else
{
...
...
src/share/classes/sun/security/provider/DSA.java
浏览文件 @
07a8ad88
...
...
@@ -94,6 +94,18 @@ abstract class DSA extends SignatureSpi {
this
.
md
=
md
;
}
private
static
void
checkKey
(
DSAParams
params
,
int
digestLen
,
String
mdAlgo
)
throws
InvalidKeyException
{
// FIPS186-3 states in sec4.2 that a hash function which provides
// a lower security strength than the (L, N) pair ordinarily should
// not be used.
int
valueN
=
params
.
getQ
().
bitLength
();
if
(
valueN
>
digestLen
)
{
throw
new
InvalidKeyException
(
"The security strength of "
+
mdAlgo
+
" digest algorithm is not sufficient for this key size"
);
}
}
/**
* Initialize the DSA object with a DSA private key.
*
...
...
@@ -118,6 +130,12 @@ abstract class DSA extends SignatureSpi {
throw
new
InvalidKeyException
(
"DSA private key lacks parameters"
);
}
// check key size against hash output size for signing
// skip this check for verification to minimize impact on existing apps
if
(
md
.
getAlgorithm
()
!=
"NullDigest20"
)
{
checkKey
(
params
,
md
.
getDigestLength
()*
8
,
md
.
getAlgorithm
());
}
this
.
params
=
params
;
this
.
presetX
=
priv
.
getX
();
this
.
presetY
=
null
;
...
...
@@ -148,7 +166,6 @@ abstract class DSA extends SignatureSpi {
if
(
params
==
null
)
{
throw
new
InvalidKeyException
(
"DSA public key lacks parameters"
);
}
this
.
params
=
params
;
this
.
presetY
=
pub
.
getY
();
this
.
presetX
=
null
;
...
...
@@ -349,20 +366,13 @@ abstract class DSA extends SignatureSpi {
return
t5
.
mod
(
q
);
}
// NOTE: This following impl is defined in FIPS 186-3 AppendixB.2.2.
// Original DSS algos such as SHA1withDSA and RawDSA uses a different
// algorithm defined in FIPS 186-1 Sec3.2, and thus need to override this.
// NOTE: This following impl is defined in FIPS 186-4 AppendixB.2.1.
protected
BigInteger
generateK
(
BigInteger
q
)
{
SecureRandom
random
=
getSigningRandom
();
byte
[]
kValue
=
new
byte
[
q
.
bitLength
()/
8
];
byte
[]
kValue
=
new
byte
[
(
q
.
bitLength
()
+
7
)/
8
+
8
];
while
(
true
)
{
random
.
nextBytes
(
kValue
);
BigInteger
k
=
new
BigInteger
(
1
,
kValue
).
mod
(
q
);
if
(
k
.
signum
()
>
0
&&
k
.
compareTo
(
q
)
<
0
)
{
return
k
;
}
}
random
.
nextBytes
(
kValue
);
return
new
BigInteger
(
1
,
kValue
).
mod
(
q
.
subtract
(
BigInteger
.
ONE
)).
add
(
BigInteger
.
ONE
);
}
// Use the application-specified SecureRandom Object if provided.
...
...
@@ -429,214 +439,10 @@ abstract class DSA extends SignatureSpi {
}
}
static
class
LegacyDSA
extends
DSA
{
/* The random seed used to generate k */
private
int
[]
kSeed
;
/* The random seed used to generate k (specified by application) */
private
byte
[]
kSeedAsByteArray
;
/*
* The random seed used to generate k
* (prevent the same Kseed from being used twice in a row
*/
private
int
[]
kSeedLast
;
public
LegacyDSA
(
MessageDigest
md
)
throws
NoSuchAlgorithmException
{
super
(
md
);
}
@Deprecated
protected
void
engineSetParameter
(
String
key
,
Object
param
)
{
if
(
key
.
equals
(
"KSEED"
))
{
if
(
param
instanceof
byte
[])
{
kSeed
=
byteArray2IntArray
((
byte
[])
param
);
kSeedAsByteArray
=
(
byte
[])
param
;
}
else
{
debug
(
"unrecognized param: "
+
key
);
throw
new
InvalidParameterException
(
"kSeed not a byte array"
);
}
}
else
{
throw
new
InvalidParameterException
(
"Unsupported parameter"
);
}
}
@Deprecated
protected
Object
engineGetParameter
(
String
key
)
{
if
(
key
.
equals
(
"KSEED"
))
{
return
kSeedAsByteArray
;
}
else
{
return
null
;
}
}
/*
* Please read bug report 4044247 for an alternative, faster,
* NON-FIPS approved method to generate K
*/
@Override
protected
BigInteger
generateK
(
BigInteger
q
)
{
BigInteger
k
=
null
;
// The application specified a kSeed for us to use.
// Note: we dis-allow usage of the same Kseed twice in a row
if
(
kSeed
!=
null
&&
!
Arrays
.
equals
(
kSeed
,
kSeedLast
))
{
k
=
generateKUsingKSeed
(
kSeed
,
q
);
if
(
k
.
signum
()
>
0
&&
k
.
compareTo
(
q
)
<
0
)
{
kSeedLast
=
kSeed
.
clone
();
return
k
;
}
}
// The application did not specify a Kseed for us to use.
// We'll generate a new Kseed by getting random bytes from
// a SecureRandom object.
SecureRandom
random
=
getSigningRandom
();
while
(
true
)
{
int
[]
seed
=
new
int
[
5
];
for
(
int
i
=
0
;
i
<
5
;
i
++)
seed
[
i
]
=
random
.
nextInt
();
k
=
generateKUsingKSeed
(
seed
,
q
);
if
(
k
.
signum
()
>
0
&&
k
.
compareTo
(
q
)
<
0
)
{
kSeedLast
=
seed
;
return
k
;
}
}
}
/**
* Compute k for the DSA signature as defined in the original DSS,
* i.e. FIPS186.
*
* @param seed the seed for generating k. This seed should be
* secure. This is what is referred to as the KSEED in the DSA
* specification.
*
* @param g the g parameter from the DSA key pair.
*/
private
BigInteger
generateKUsingKSeed
(
int
[]
seed
,
BigInteger
q
)
{
// check out t in the spec.
int
[]
t
=
{
0xEFCDAB89
,
0x98BADCFE
,
0x10325476
,
0xC3D2E1F0
,
0x67452301
};
//
int
[]
tmp
=
SHA_7
(
seed
,
t
);
byte
[]
tmpBytes
=
new
byte
[
tmp
.
length
*
4
];
for
(
int
i
=
0
;
i
<
tmp
.
length
;
i
++)
{
int
k
=
tmp
[
i
];
for
(
int
j
=
0
;
j
<
4
;
j
++)
{
tmpBytes
[(
i
*
4
)
+
j
]
=
(
byte
)
(
k
>>>
(
24
-
(
j
*
8
)));
}
}
BigInteger
k
=
new
BigInteger
(
1
,
tmpBytes
).
mod
(
q
);
return
k
;
}
// Constants for each round
private
static
final
int
round1_kt
=
0x5a827999
;
private
static
final
int
round2_kt
=
0x6ed9eba1
;
private
static
final
int
round3_kt
=
0x8f1bbcdc
;
private
static
final
int
round4_kt
=
0xca62c1d6
;
/**
* Computes set 1 thru 7 of SHA-1 on m1. */
static
int
[]
SHA_7
(
int
[]
m1
,
int
[]
h
)
{
int
[]
W
=
new
int
[
80
];
System
.
arraycopy
(
m1
,
0
,
W
,
0
,
m1
.
length
);
int
temp
=
0
;
for
(
int
t
=
16
;
t
<=
79
;
t
++){
temp
=
W
[
t
-
3
]
^
W
[
t
-
8
]
^
W
[
t
-
14
]
^
W
[
t
-
16
];
W
[
t
]
=
((
temp
<<
1
)
|
(
temp
>>>(
32
-
1
)));
}
int
a
=
h
[
0
],
b
=
h
[
1
],
c
=
h
[
2
],
d
=
h
[
3
],
e
=
h
[
4
];
for
(
int
i
=
0
;
i
<
20
;
i
++)
{
temp
=
((
a
<<
5
)
|
(
a
>>>(
32
-
5
)))
+
((
b
&
c
)|((~
b
)&
d
))+
e
+
W
[
i
]
+
round1_kt
;
e
=
d
;
d
=
c
;
c
=
((
b
<<
30
)
|
(
b
>>>(
32
-
30
)));
b
=
a
;
a
=
temp
;
}
// Round 2
for
(
int
i
=
20
;
i
<
40
;
i
++)
{
temp
=
((
a
<<
5
)
|
(
a
>>>(
32
-
5
)))
+
(
b
^
c
^
d
)
+
e
+
W
[
i
]
+
round2_kt
;
e
=
d
;
d
=
c
;
c
=
((
b
<<
30
)
|
(
b
>>>(
32
-
30
)));
b
=
a
;
a
=
temp
;
}
// Round 3
for
(
int
i
=
40
;
i
<
60
;
i
++)
{
temp
=
((
a
<<
5
)
|
(
a
>>>(
32
-
5
)))
+
((
b
&
c
)|(
b
&
d
)|(
c
&
d
))
+
e
+
W
[
i
]
+
round3_kt
;
e
=
d
;
d
=
c
;
c
=
((
b
<<
30
)
|
(
b
>>>(
32
-
30
)));
b
=
a
;
a
=
temp
;
}
// Round 4
for
(
int
i
=
60
;
i
<
80
;
i
++)
{
temp
=
((
a
<<
5
)
|
(
a
>>>(
32
-
5
)))
+
(
b
^
c
^
d
)
+
e
+
W
[
i
]
+
round4_kt
;
e
=
d
;
d
=
c
;
c
=
((
b
<<
30
)
|
(
b
>>>(
32
-
30
)));
b
=
a
;
a
=
temp
;
}
int
[]
md
=
new
int
[
5
];
md
[
0
]
=
h
[
0
]
+
a
;
md
[
1
]
=
h
[
1
]
+
b
;
md
[
2
]
=
h
[
2
]
+
c
;
md
[
3
]
=
h
[
3
]
+
d
;
md
[
4
]
=
h
[
4
]
+
e
;
return
md
;
}
/*
* Utility routine for converting a byte array into an int array
*/
private
int
[]
byteArray2IntArray
(
byte
[]
byteArray
)
{
int
j
=
0
;
byte
[]
newBA
;
int
mod
=
byteArray
.
length
%
4
;
// guarantee that the incoming byteArray is a multiple of 4
// (pad with 0's)
switch
(
mod
)
{
case
3
:
newBA
=
new
byte
[
byteArray
.
length
+
1
];
break
;
case
2
:
newBA
=
new
byte
[
byteArray
.
length
+
2
];
break
;
case
1
:
newBA
=
new
byte
[
byteArray
.
length
+
3
];
break
;
default
:
newBA
=
new
byte
[
byteArray
.
length
+
0
];
break
;
}
System
.
arraycopy
(
byteArray
,
0
,
newBA
,
0
,
byteArray
.
length
);
// copy each set of 4 bytes in the byte array into an integer
int
[]
newSeed
=
new
int
[
newBA
.
length
/
4
];
for
(
int
i
=
0
;
i
<
newBA
.
length
;
i
+=
4
)
{
newSeed
[
j
]
=
newBA
[
i
+
3
]
&
0xFF
;
newSeed
[
j
]
|=
(
newBA
[
i
+
2
]
<<
8
)
&
0xFF00
;
newSeed
[
j
]
|=
(
newBA
[
i
+
1
]
<<
16
)
&
0xFF0000
;
newSeed
[
j
]
|=
(
newBA
[
i
+
0
]
<<
24
)
&
0xFF000000
;
j
++;
}
return
newSeed
;
}
}
public
static
final
class
SHA1withDSA
extends
LegacyDSA
{
/**
* Standard SHA1withDSA implementation.
*/
public
static
final
class
SHA1withDSA
extends
DSA
{
public
SHA1withDSA
()
throws
NoSuchAlgorithmException
{
super
(
MessageDigest
.
getInstance
(
"SHA-1"
));
}
...
...
@@ -649,7 +455,7 @@ abstract class DSA extends SignatureSpi {
* not, a SignatureException is thrown when sign()/verify() is called
* per JCA spec.
*/
public
static
final
class
RawDSA
extends
Legacy
DSA
{
public
static
final
class
RawDSA
extends
DSA
{
// Internal special-purpose MessageDigest impl for RawDSA
// Only override whatever methods used
// NOTE: no clone support
...
...
src/share/native/sun/font/layout/DeviceTables.cpp
浏览文件 @
07a8ad88
...
...
@@ -45,9 +45,12 @@ const le_uint16 DeviceTable::fieldBits[] = { 2, 4, 8};
le_int16
DeviceTable
::
getAdjustment
(
const
LEReferenceTo
<
DeviceTable
>&
base
,
le_uint16
ppem
,
LEErrorCode
&
success
)
const
{
le_int16
result
=
0
;
if
(
LE_FAILURE
(
success
))
{
return
result
;
}
le_uint16
start
=
SWAPW
(
startSize
);
le_uint16
format
=
SWAPW
(
deltaFormat
)
-
1
;
le_int16
result
=
0
;
if
(
ppem
>=
start
&&
ppem
<=
SWAPW
(
endSize
)
&&
format
<
FORMAT_COUNT
)
{
le_uint16
sizeIndex
=
ppem
-
start
;
...
...
src/share/native/sun/font/layout/LigatureSubstProc.cpp
浏览文件 @
07a8ad88
...
...
@@ -71,6 +71,10 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
{
LEErrorCode
success
=
LE_NO_ERROR
;
const
LigatureSubstitutionStateEntry
*
entry
=
entryTable
.
getAlias
(
index
,
success
);
if
(
LE_FAILURE
(
success
))
{
currGlyph
++
;
return
0
;
}
ByteOffset
newState
=
SWAPW
(
entry
->
newStateOffset
);
le_uint16
flags
=
SWAPW
(
entry
->
flags
);
...
...
@@ -91,6 +95,10 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
if
(
actionOffset
!=
0
)
{
LEReferenceTo
<
LigatureActionEntry
>
ap
(
stHeader
,
success
,
actionOffset
);
if
(
LE_FAILURE
(
success
))
{
currGlyph
++
;
return
newState
;
}
LigatureActionEntry
action
;
le_int32
offset
,
i
=
0
,
j
=
0
;
le_int32
stack
[
nComponents
];
...
...
@@ -101,6 +109,10 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
if
(
j
++
>
0
)
{
ap
.
addObject
(
success
);
if
(
LE_FAILURE
(
success
))
{
currGlyph
++
;
return
newState
;
}
}
action
=
SWAPL
(
*
ap
.
getAlias
());
...
...
@@ -124,9 +136,17 @@ ByteOffset LigatureSubstitutionProcessor::processStateEntry(LEGlyphStorage &glyp
return
newState
;
// get out! bad font
}
i
+=
SWAPW
(
offsetTable
.
getObject
(
LE_GET_GLYPH
(
glyphStorage
[
componentGlyph
]),
success
));
if
(
LE_FAILURE
(
success
))
{
currGlyph
++
;
return
newState
;
}
if
(
action
&
(
lafLast
|
lafStore
))
{
LEReferenceTo
<
TTGlyphID
>
ligatureOffset
(
stHeader
,
success
,
i
);
if
(
LE_FAILURE
(
success
))
{
currGlyph
++
;
return
newState
;
}
TTGlyphID
ligatureGlyph
=
SWAPW
(
*
ligatureOffset
.
getAlias
());
glyphStorage
[
componentGlyph
]
=
LE_SET_GLYPH
(
glyphStorage
[
componentGlyph
],
ligatureGlyph
);
...
...
src/share/native/sun/font/layout/LigatureSubstProc2.cpp
浏览文件 @
07a8ad88
...
...
@@ -95,6 +95,10 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp
if
(
actionOffset
!=
0
)
{
LEReferenceTo
<
LigatureActionEntry
>
ap
(
stHeader
,
success
,
ligActionOffset
);
// byte offset
if
(
LE_FAILURE
(
success
))
{
currGlyph
+=
dir
;
return
nextStateIndex
;
}
ap
.
addObject
(
ligActionIndex
,
success
);
LEReferenceToArrayOf
<
TTGlyphID
>
ligatureTable
(
stHeader
,
success
,
ligatureOffset
,
LE_UNBOUNDED_ARRAY
);
LigatureActionEntry
action
;
...
...
@@ -114,6 +118,10 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp
if
(
j
++
>
0
)
{
ap
.
addObject
(
success
);
}
if
(
LE_FAILURE
(
success
))
{
currGlyph
+=
dir
;
return
nextStateIndex
;
}
action
=
SWAPL
(
*
ap
.
getAlias
());
...
...
@@ -129,9 +137,17 @@ le_uint16 LigatureSubstitutionProcessor2::processStateEntry(LEGlyphStorage &glyp
return
nextStateIndex
;
// get out! bad font
}
i
+=
SWAPW
(
componentTable
(
LE_GET_GLYPH
(
glyphStorage
[
componentGlyph
])
+
(
SignExtend
(
offset
,
lafComponentOffsetMask
)),
success
));
if
(
LE_FAILURE
(
success
))
{
currGlyph
+=
dir
;
return
nextStateIndex
;
}
if
(
action
&
(
lafLast
|
lafStore
))
{
TTGlyphID
ligatureGlyph
=
SWAPW
(
ligatureTable
(
i
,
success
));
if
(
LE_FAILURE
(
success
))
{
currGlyph
+=
dir
;
return
nextStateIndex
;
}
glyphStorage
[
componentGlyph
]
=
LE_SET_GLYPH
(
glyphStorage
[
componentGlyph
],
ligatureGlyph
);
if
(
mm
==
nComponents
)
{
LE_DEBUG_BAD_FONT
(
"exceeded nComponents"
);
...
...
src/share/native/sun/font/layout/StateTableProcessor2.cpp
浏览文件 @
07a8ad88
...
...
@@ -60,6 +60,7 @@ StateTableProcessor2::StateTableProcessor2(const LEReferenceTo<MorphSubtableHead
entryTableOffset
=
SWAPL
(
stHeader
->
entryTableOffset
);
classTable
=
LEReferenceTo
<
LookupTable
>
(
stHeader
,
success
,
classTableOffset
);
if
(
LE_FAILURE
(
success
))
return
;
format
=
SWAPW
(
classTable
->
format
);
stateArray
=
LEReferenceToArrayOf
<
EntryTableIndex2
>
(
stHeader
,
success
,
stateArrayOffset
,
LE_UNBOUNDED_ARRAY
);
...
...
src/share/native/sun/java2d/cmm/lcms/cmscgats.c
浏览文件 @
07a8ad88
...
...
@@ -2545,9 +2545,11 @@ int LocateSample(cmsIT8* it8, const char* cSample)
for
(
i
=
0
;
i
<
t
->
nSamples
;
i
++
)
{
fld
=
GetDataFormat
(
it8
,
i
);
if
(
fld
!=
NULL
)
{
if
(
cmsstrcasecmp
(
fld
,
cSample
)
==
0
)
return
i
;
}
}
return
-
1
;
...
...
src/solaris/native/sun/awt/fontpath.c
浏览文件 @
07a8ad88
...
...
@@ -1155,8 +1155,8 @@ Java_sun_font_FontConfigManager_getFontConfig
continue
;
}
pattern
=
(
*
FcNameParse
)((
FcChar8
*
)
fcName
);
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
fcNameStr
,
(
const
char
*
)
fcName
);
if
(
pattern
==
NULL
)
{
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
fcNameStr
,
(
const
char
*
)
fcName
);
closeFontConfig
(
libfontconfig
,
JNI_FALSE
);
return
;
}
...
...
@@ -1174,7 +1174,6 @@ Java_sun_font_FontConfigManager_getFontConfig
fontset
=
(
*
FcFontSort
)(
NULL
,
pattern
,
FcTrue
,
NULL
,
&
result
);
if
(
fontset
==
NULL
)
{
(
*
FcPatternDestroy
)(
pattern
);
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
fcNameStr
,
(
const
char
*
)
fcName
);
closeFontConfig
(
libfontconfig
,
JNI_FALSE
);
return
;
}
...
...
@@ -1206,7 +1205,6 @@ Java_sun_font_FontConfigManager_getFontConfig
}
(
*
FcPatternDestroy
)(
pattern
);
(
*
FcFontSetDestroy
)(
fontset
);
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
fcNameStr
,
(
const
char
*
)
fcName
);
closeFontConfig
(
libfontconfig
,
JNI_FALSE
);
return
;
}
...
...
@@ -1248,8 +1246,6 @@ Java_sun_font_FontConfigManager_getFontConfig
free
(
file
);
(
*
FcPatternDestroy
)(
pattern
);
(
*
FcFontSetDestroy
)(
fontset
);
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
fcNameStr
,
(
const
char
*
)
fcName
);
closeFontConfig
(
libfontconfig
,
JNI_FALSE
);
return
;
}
...
...
@@ -1297,6 +1293,16 @@ Java_sun_font_FontConfigManager_getFontConfig
if
(
includeFallbacks
)
{
fcFontArr
=
(
*
env
)
->
NewObjectArray
(
env
,
fontCount
,
fcFontClass
,
NULL
);
if
(
IS_NULL
(
fcFontArr
))
{
free
(
family
);
free
(
fullname
);
free
(
styleStr
);
free
(
file
);
(
*
FcPatternDestroy
)(
pattern
);
(
*
FcFontSetDestroy
)(
fontset
);
closeFontConfig
(
libfontconfig
,
JNI_FALSE
);
return
;
}
(
*
env
)
->
SetObjectField
(
env
,
fcCompFontObj
,
fcAllFontsID
,
fcFontArr
);
}
fn
=
0
;
...
...
@@ -1305,18 +1311,23 @@ Java_sun_font_FontConfigManager_getFontConfig
if
(
family
[
j
]
!=
NULL
)
{
jobject
fcFont
=
(
*
env
)
->
NewObject
(
env
,
fcFontClass
,
fcFontCons
);
if
(
IS_NULL
(
fcFont
))
break
;
jstr
=
(
*
env
)
->
NewStringUTF
(
env
,
(
const
char
*
)
family
[
j
]);
if
(
IS_NULL
(
jstr
))
break
;
(
*
env
)
->
SetObjectField
(
env
,
fcFont
,
familyNameID
,
jstr
);
if
(
file
[
j
]
!=
NULL
)
{
jstr
=
(
*
env
)
->
NewStringUTF
(
env
,
(
const
char
*
)
file
[
j
]);
if
(
IS_NULL
(
jstr
))
break
;
(
*
env
)
->
SetObjectField
(
env
,
fcFont
,
fontFileID
,
jstr
);
}
if
(
styleStr
[
j
]
!=
NULL
)
{
jstr
=
(
*
env
)
->
NewStringUTF
(
env
,
(
const
char
*
)
styleStr
[
j
]);
if
(
IS_NULL
(
jstr
))
break
;
(
*
env
)
->
SetObjectField
(
env
,
fcFont
,
styleNameID
,
jstr
);
}
if
(
fullname
[
j
]
!=
NULL
)
{
jstr
=
(
*
env
)
->
NewStringUTF
(
env
,
(
const
char
*
)
fullname
[
j
]);
if
(
IS_NULL
(
jstr
))
break
;
(
*
env
)
->
SetObjectField
(
env
,
fcFont
,
fullNameID
,
jstr
);
}
if
(
fn
==
0
)
{
...
...
@@ -1330,7 +1341,6 @@ Java_sun_font_FontConfigManager_getFontConfig
}
}
}
(
*
env
)
->
ReleaseStringUTFChars
(
env
,
fcNameStr
,
(
const
char
*
)
fcName
);
(
*
FcFontSetDestroy
)(
fontset
);
(
*
FcPatternDestroy
)(
pattern
);
free
(
family
);
...
...
test/java/security/Signature/TestInitSignWithMyOwnRandom.java
浏览文件 @
07a8ad88
/*
* Copyright (c) 2002, 20
03
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 20
15
, 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
...
...
@@ -55,9 +55,9 @@ class TestRandomSource extends SecureRandom {
int
count
=
0
;
public
int
nextInt
()
{
@Override
public
void
nextBytes
(
byte
[]
rs
)
{
count
++;
return
0
;
}
public
boolean
isUsed
()
{
...
...
test/sun/security/pkcs11/sslecc/ClientJSSEServerJSSE.java
浏览文件 @
07a8ad88
...
...
@@ -57,10 +57,6 @@ public class ClientJSSEServerJSSE extends PKCS11Test {
}
public
void
main
(
Provider
p
)
throws
Exception
{
// MD5 is used in this test case, don't disable MD5 algorithm.
Security
.
setProperty
(
"jdk.certpath.disabledAlgorithms"
,
"MD2, RSA keySize < 1024"
);
String
testWithoutSunEC
=
System
.
getProperty
(
"testWithoutSunEC"
);
if
(
p
.
getService
(
"KeyFactory"
,
"EC"
)
==
null
)
{
...
...
test/sun/security/provider/DSA/TestDSA2.java
浏览文件 @
07a8ad88
...
...
@@ -50,7 +50,7 @@ public class TestDSA2 {
public
static
void
main
(
String
[]
args
)
throws
Exception
{
boolean
[]
expectedToPass
=
{
true
,
true
,
true
};
test
(
1024
,
expectedToPass
);
boolean
[]
expectedToPass2
=
{
tru
e
,
true
,
true
};
boolean
[]
expectedToPass2
=
{
fals
e
,
true
,
true
};
test
(
2048
,
expectedToPass2
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录