Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
5731e875
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看板
提交
5731e875
编写于
7月 03, 2013
作者:
A
ascarpino
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8011071: Better crypto provider handling
Reviewed-by: hawtin, valeriep
上级
7db03233
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
9 addition
and
127 deletion
+9
-127
src/share/classes/com/sun/crypto/provider/DHPrivateKey.java
src/share/classes/com/sun/crypto/provider/DHPrivateKey.java
+1
-17
src/share/classes/sun/security/ec/ECPrivateKeyImpl.java
src/share/classes/sun/security/ec/ECPrivateKeyImpl.java
+1
-9
src/share/classes/sun/security/jgss/GSSCredentialImpl.java
src/share/classes/sun/security/jgss/GSSCredentialImpl.java
+2
-2
src/share/classes/sun/security/pkcs/PKCS8Key.java
src/share/classes/sun/security/pkcs/PKCS8Key.java
+1
-12
src/share/classes/sun/security/pkcs11/P11Key.java
src/share/classes/sun/security/pkcs11/P11Key.java
+1
-47
src/share/classes/sun/security/provider/DSAPrivateKey.java
src/share/classes/sun/security/provider/DSAPrivateKey.java
+1
-6
src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java
src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java
+1
-26
src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java
src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java
+1
-8
未找到文件。
src/share/classes/com/sun/crypto/provider/DHPrivateKey.java
浏览文件 @
5731e875
/*
* Copyright (c) 1997, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
3
, 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
...
...
@@ -279,22 +279,6 @@ javax.crypto.interfaces.DHPrivateKey, Serializable {
return
new
DHParameterSpec
(
this
.
p
,
this
.
g
);
}
public
String
toString
()
{
String
LINE_SEP
=
System
.
getProperty
(
"line.separator"
);
StringBuffer
strbuf
=
new
StringBuffer
(
"SunJCE Diffie-Hellman Private Key:"
+
LINE_SEP
+
"x:"
+
LINE_SEP
+
Debug
.
toHexString
(
this
.
x
)
+
LINE_SEP
+
"p:"
+
LINE_SEP
+
Debug
.
toHexString
(
this
.
p
)
+
LINE_SEP
+
"g:"
+
LINE_SEP
+
Debug
.
toHexString
(
this
.
g
));
if
(
this
.
l
!=
0
)
strbuf
.
append
(
LINE_SEP
+
"l:"
+
LINE_SEP
+
" "
+
this
.
l
);
return
strbuf
.
toString
();
}
private
void
parseKeyBits
()
throws
InvalidKeyException
{
try
{
DerInputStream
in
=
new
DerInputStream
(
this
.
key
);
...
...
src/share/classes/sun/security/ec/ECPrivateKeyImpl.java
浏览文件 @
5731e875
/*
* Copyright (c) 2006, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2006, 201
3
, 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
...
...
@@ -152,12 +152,4 @@ public final class ECPrivateKeyImpl extends PKCS8Key implements ECPrivateKey {
throw
new
InvalidKeyException
(
"Invalid EC private key"
,
e
);
}
}
// return a string representation of this key for debugging
public
String
toString
()
{
return
"Sun EC private key, "
+
params
.
getCurve
().
getField
().
getFieldSize
()
+
" bits\n private value: "
+
s
+
"\n parameters: "
+
params
;
}
}
src/share/classes/sun/security/jgss/GSSCredentialImpl.java
浏览文件 @
5731e875
/*
* Copyright (c) 2000, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
3
, 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
...
...
@@ -651,7 +651,7 @@ public class GSSCredentialImpl implements ExtendedGSSCredential {
buffer
.
append
(
element
.
isAcceptorCredential
()
?
" Accept"
:
""
);
buffer
.
append
(
" ["
);
buffer
.
append
(
element
.
toString
());
buffer
.
append
(
element
.
getClass
());
buffer
.
append
(
']'
);
}
catch
(
GSSException
e
)
{
// skip to next element
...
...
src/share/classes/sun/security/pkcs/PKCS8Key.java
浏览文件 @
5731e875
/*
* Copyright (c) 1996, 201
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 201
3
, 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
...
...
@@ -304,17 +304,6 @@ public class PKCS8Key implements PrivateKey {
return
encodedKey
.
clone
();
}
/*
* Returns a printable representation of the key
*/
public
String
toString
()
{
HexDumpEncoder
encoder
=
new
HexDumpEncoder
();
return
"algorithm = "
+
algid
.
toString
()
+
", unparsed keybits = \n"
+
encoder
.
encodeBuffer
(
key
);
}
/**
* Initialize an PKCS8Key object from an input stream. The data
* on that input stream must be encoded using DER, obeying the
...
...
src/share/classes/sun/security/pkcs11/P11Key.java
浏览文件 @
5731e875
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, 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
...
...
@@ -552,27 +552,6 @@ abstract class P11Key implements Key, Length {
fetchValues
();
return
coeff
;
}
public
String
toString
()
{
fetchValues
();
StringBuilder
sb
=
new
StringBuilder
(
super
.
toString
());
sb
.
append
(
"\n modulus: "
);
sb
.
append
(
n
);
sb
.
append
(
"\n public exponent: "
);
sb
.
append
(
e
);
sb
.
append
(
"\n private exponent: "
);
sb
.
append
(
d
);
sb
.
append
(
"\n prime p: "
);
sb
.
append
(
p
);
sb
.
append
(
"\n prime q: "
);
sb
.
append
(
q
);
sb
.
append
(
"\n prime exponent p: "
);
sb
.
append
(
pe
);
sb
.
append
(
"\n prime exponent q: "
);
sb
.
append
(
qe
);
sb
.
append
(
"\n crt coefficient: "
);
sb
.
append
(
coeff
);
return
sb
.
toString
();
}
}
// RSA non-CRT private key
...
...
@@ -628,15 +607,6 @@ abstract class P11Key implements Key, Length {
fetchValues
();
return
d
;
}
public
String
toString
()
{
fetchValues
();
StringBuilder
sb
=
new
StringBuilder
(
super
.
toString
());
sb
.
append
(
"\n modulus: "
);
sb
.
append
(
n
);
sb
.
append
(
"\n private exponent: "
);
sb
.
append
(
d
);
return
sb
.
toString
();
}
}
private
static
final
class
P11RSAPublicKey
extends
P11Key
...
...
@@ -812,11 +782,6 @@ abstract class P11Key implements Key, Length {
fetchValues
();
return
params
;
}
public
String
toString
()
{
fetchValues
();
return
super
.
toString
()
+
"\n x: "
+
x
+
"\n p: "
+
params
.
getP
()
+
"\n q: "
+
params
.
getQ
()
+
"\n g: "
+
params
.
getG
();
}
}
private
static
final
class
P11DHPrivateKey
extends
P11Key
...
...
@@ -876,11 +841,6 @@ abstract class P11Key implements Key, Length {
fetchValues
();
return
params
;
}
public
String
toString
()
{
fetchValues
();
return
super
.
toString
()
+
"\n x: "
+
x
+
"\n p: "
+
params
.
getP
()
+
"\n g: "
+
params
.
getG
();
}
}
private
static
final
class
P11DHPublicKey
extends
P11Key
...
...
@@ -1001,12 +961,6 @@ abstract class P11Key implements Key, Length {
fetchValues
();
return
params
;
}
public
String
toString
()
{
fetchValues
();
return
super
.
toString
()
+
"\n private value: "
+
s
+
"\n parameters: "
+
params
;
}
}
private
static
final
class
P11ECPublicKey
extends
P11Key
...
...
src/share/classes/sun/security/provider/DSAPrivateKey.java
浏览文件 @
5731e875
/*
* Copyright (c) 1996, 20
02
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 20
13
, 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
...
...
@@ -142,11 +142,6 @@ implements java.security.interfaces.DSAPrivateKey, Serializable {
}
}
public
String
toString
()
{
return
"Sun DSA Private Key \nparameters:"
+
algid
+
"\nx: "
+
Debug
.
toHexString
(
x
)
+
"\n"
;
}
protected
void
parseKeyBits
()
throws
InvalidKeyException
{
try
{
DerInputStream
in
=
new
DerInputStream
(
key
);
...
...
src/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java
浏览文件 @
5731e875
/*
* Copyright (c) 2003, 20
08
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, 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
...
...
@@ -225,29 +225,4 @@ public final class RSAPrivateCrtKeyImpl
}
return
b
;
}
// return a string representation of this key for debugging
public
String
toString
()
{
StringBuffer
sb
=
new
StringBuffer
();
sb
.
append
(
"Sun RSA private CRT key, "
);
sb
.
append
(
n
.
bitLength
());
sb
.
append
(
" bits\n modulus: "
);
sb
.
append
(
n
);
sb
.
append
(
"\n public exponent: "
);
sb
.
append
(
e
);
sb
.
append
(
"\n private exponent: "
);
sb
.
append
(
d
);
sb
.
append
(
"\n prime p: "
);
sb
.
append
(
p
);
sb
.
append
(
"\n prime q: "
);
sb
.
append
(
q
);
sb
.
append
(
"\n prime exponent p: "
);
sb
.
append
(
pe
);
sb
.
append
(
"\n prime exponent q: "
);
sb
.
append
(
qe
);
sb
.
append
(
"\n crt coefficient: "
);
sb
.
append
(
coeff
);
return
sb
.
toString
();
}
}
src/share/classes/sun/security/rsa/RSAPrivateKeyImpl.java
浏览文件 @
5731e875
/*
* Copyright (c) 2003, 20
08
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 20
13
, 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
...
...
@@ -98,11 +98,4 @@ public final class RSAPrivateKeyImpl extends PKCS8Key implements RSAPrivateKey {
public
BigInteger
getPrivateExponent
()
{
return
d
;
}
// return a string representation of this key for debugging
public
String
toString
()
{
return
"Sun RSA private key, "
+
n
.
bitLength
()
+
" bits\n modulus: "
+
n
+
"\n private exponent: "
+
d
;
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录