Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
257251a7
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
257251a7
编写于
8月 27, 2018
作者:
C
coffeys
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8208585: Make crypto code more robust
Reviewed-by: ascarpino, mschoene
上级
5cb29584
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
9 deletion
+13
-9
src/share/classes/com/sun/crypto/provider/RSACipher.java
src/share/classes/com/sun/crypto/provider/RSACipher.java
+2
-2
src/share/classes/sun/security/pkcs11/P11Signature.java
src/share/classes/sun/security/pkcs11/P11Signature.java
+5
-1
src/share/classes/sun/security/provider/DSA.java
src/share/classes/sun/security/provider/DSA.java
+3
-3
src/windows/classes/sun/security/mscapi/RSASignature.java
src/windows/classes/sun/security/mscapi/RSASignature.java
+3
-3
未找到文件。
src/share/classes/com/sun/crypto/provider/RSACipher.java
浏览文件 @
257251a7
/*
/*
* Copyright (c) 2003, 201
5
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -329,7 +329,7 @@ public final class RSACipher extends CipherSpi {
...
@@ -329,7 +329,7 @@ public final class RSACipher extends CipherSpi {
if
((
inLen
==
0
)
||
(
in
==
null
))
{
if
((
inLen
==
0
)
||
(
in
==
null
))
{
return
;
return
;
}
}
if
(
bufOfs
+
inLen
>
buffer
.
length
)
{
if
(
inLen
>
(
buffer
.
length
-
bufOfs
)
)
{
bufOfs
=
buffer
.
length
+
1
;
bufOfs
=
buffer
.
length
+
1
;
return
;
return
;
}
}
...
...
src/share/classes/sun/security/pkcs11/P11Signature.java
浏览文件 @
257251a7
/*
/*
* Copyright (c) 2003, 201
6
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -472,6 +472,10 @@ final class P11Signature extends SignatureSpi {
...
@@ -472,6 +472,10 @@ final class P11Signature extends SignatureSpi {
if
(
len
==
0
)
{
if
(
len
==
0
)
{
return
;
return
;
}
}
// check for overflow
if
(
len
+
bytesProcessed
<
0
)
{
throw
new
ProviderException
(
"Processed bytes limits exceeded."
);
}
switch
(
type
)
{
switch
(
type
)
{
case
T_UPDATE:
case
T_UPDATE:
try
{
try
{
...
...
src/share/classes/sun/security/provider/DSA.java
浏览文件 @
257251a7
/*
/*
* Copyright (c) 1996, 201
7
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -491,7 +491,7 @@ abstract class DSA extends SignatureSpi {
...
@@ -491,7 +491,7 @@ abstract class DSA extends SignatureSpi {
}
}
}
}
protected
void
engineUpdate
(
byte
[]
input
,
int
offset
,
int
len
)
{
protected
void
engineUpdate
(
byte
[]
input
,
int
offset
,
int
len
)
{
if
(
ofs
+
len
>
digestBuffer
.
length
)
{
if
(
len
>
(
digestBuffer
.
length
-
ofs
)
)
{
ofs
=
Integer
.
MAX_VALUE
;
ofs
=
Integer
.
MAX_VALUE
;
}
else
{
}
else
{
System
.
arraycopy
(
input
,
offset
,
digestBuffer
,
ofs
,
len
);
System
.
arraycopy
(
input
,
offset
,
digestBuffer
,
ofs
,
len
);
...
@@ -500,7 +500,7 @@ abstract class DSA extends SignatureSpi {
...
@@ -500,7 +500,7 @@ abstract class DSA extends SignatureSpi {
}
}
protected
final
void
engineUpdate
(
ByteBuffer
input
)
{
protected
final
void
engineUpdate
(
ByteBuffer
input
)
{
int
inputLen
=
input
.
remaining
();
int
inputLen
=
input
.
remaining
();
if
(
ofs
+
inputLen
>
digestBuffer
.
length
)
{
if
(
inputLen
>
(
digestBuffer
.
length
-
ofs
)
)
{
ofs
=
Integer
.
MAX_VALUE
;
ofs
=
Integer
.
MAX_VALUE
;
}
else
{
}
else
{
input
.
get
(
digestBuffer
,
ofs
,
inputLen
);
input
.
get
(
digestBuffer
,
ofs
,
inputLen
);
...
...
src/windows/classes/sun/security/mscapi/RSASignature.java
浏览文件 @
257251a7
/*
/*
* Copyright (c) 2005, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 201
8
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -132,7 +132,7 @@ abstract class RSASignature extends java.security.SignatureSpi
...
@@ -132,7 +132,7 @@ abstract class RSASignature extends java.security.SignatureSpi
@Override
@Override
protected
void
engineUpdate
(
byte
[]
b
,
int
off
,
int
len
)
protected
void
engineUpdate
(
byte
[]
b
,
int
off
,
int
len
)
throws
SignatureException
{
throws
SignatureException
{
if
(
offset
+
len
>
precomputedDigest
.
length
)
{
if
(
len
>
(
precomputedDigest
.
length
-
offset
)
)
{
offset
=
RAW_RSA_MAX
+
1
;
offset
=
RAW_RSA_MAX
+
1
;
return
;
return
;
}
}
...
@@ -147,7 +147,7 @@ abstract class RSASignature extends java.security.SignatureSpi
...
@@ -147,7 +147,7 @@ abstract class RSASignature extends java.security.SignatureSpi
if
(
len
<=
0
)
{
if
(
len
<=
0
)
{
return
;
return
;
}
}
if
(
offset
+
len
>
precomputedDigest
.
length
)
{
if
(
len
>
(
precomputedDigest
.
length
-
offset
)
)
{
offset
=
RAW_RSA_MAX
+
1
;
offset
=
RAW_RSA_MAX
+
1
;
return
;
return
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录