author | valeriep |
Mon, 21 May 2018 23:40:52 +0000 | |
changeset 50204 | 3195a713e24d |
parent 47216 | 71c04702a3d5 |
child 52995 | 9af672cab7cb |
permissions | -rw-r--r-- |
2 | 1 |
/* |
50204
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
package sun.security.rsa; |
|
27 |
||
28 |
import java.util.Map; |
|
29 |
||
30 |
/** |
|
31 |
* Defines the entries of the SunRsaSign provider. |
|
32 |
* |
|
33 |
* @author Andreas Sterbenz |
|
34 |
*/ |
|
35 |
public final class SunRsaSignEntries { |
|
36 |
||
37 |
private SunRsaSignEntries() { |
|
38 |
// empty |
|
39 |
} |
|
40 |
||
41 |
public static void putEntries(Map<Object, Object> map) { |
|
42 |
||
43 |
// main algorithms |
|
44 |
map.put("KeyFactory.RSA", |
|
50204
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
45 |
"sun.security.rsa.RSAKeyFactory$Legacy"); |
2 | 46 |
map.put("KeyPairGenerator.RSA", |
50204
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
47 |
"sun.security.rsa.RSAKeyPairGenerator$Legacy"); |
2 | 48 |
map.put("Signature.MD2withRSA", |
49 |
"sun.security.rsa.RSASignature$MD2withRSA"); |
|
50 |
map.put("Signature.MD5withRSA", |
|
51 |
"sun.security.rsa.RSASignature$MD5withRSA"); |
|
52 |
map.put("Signature.SHA1withRSA", |
|
53 |
"sun.security.rsa.RSASignature$SHA1withRSA"); |
|
12685 | 54 |
map.put("Signature.SHA224withRSA", |
55 |
"sun.security.rsa.RSASignature$SHA224withRSA"); |
|
2 | 56 |
map.put("Signature.SHA256withRSA", |
57 |
"sun.security.rsa.RSASignature$SHA256withRSA"); |
|
58 |
map.put("Signature.SHA384withRSA", |
|
59 |
"sun.security.rsa.RSASignature$SHA384withRSA"); |
|
60 |
map.put("Signature.SHA512withRSA", |
|
61 |
"sun.security.rsa.RSASignature$SHA512withRSA"); |
|
50204
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
62 |
map.put("Signature.SHA512/224withRSA", |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
63 |
"sun.security.rsa.RSASignature$SHA512_224withRSA"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
64 |
map.put("Signature.SHA512/256withRSA", |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
65 |
"sun.security.rsa.RSASignature$SHA512_256withRSA"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
66 |
|
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
67 |
map.put("KeyFactory.RSASSA-PSS", |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
68 |
"sun.security.rsa.RSAKeyFactory$PSS"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
69 |
map.put("KeyPairGenerator.RSASSA-PSS", |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
70 |
"sun.security.rsa.RSAKeyPairGenerator$PSS"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
71 |
map.put("Signature.RSASSA-PSS", |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
72 |
"sun.security.rsa.RSAPSSSignature"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
73 |
map.put("AlgorithmParameters.RSASSA-PSS", |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
74 |
"sun.security.rsa.PSSParameters"); |
2 | 75 |
|
76 |
// attributes for supported key classes |
|
77 |
String rsaKeyClasses = "java.security.interfaces.RSAPublicKey" + |
|
78 |
"|java.security.interfaces.RSAPrivateKey"; |
|
79 |
map.put("Signature.MD2withRSA SupportedKeyClasses", rsaKeyClasses); |
|
80 |
map.put("Signature.MD5withRSA SupportedKeyClasses", rsaKeyClasses); |
|
81 |
map.put("Signature.SHA1withRSA SupportedKeyClasses", rsaKeyClasses); |
|
12685 | 82 |
map.put("Signature.SHA224withRSA SupportedKeyClasses", rsaKeyClasses); |
2 | 83 |
map.put("Signature.SHA256withRSA SupportedKeyClasses", rsaKeyClasses); |
84 |
map.put("Signature.SHA384withRSA SupportedKeyClasses", rsaKeyClasses); |
|
85 |
map.put("Signature.SHA512withRSA SupportedKeyClasses", rsaKeyClasses); |
|
50204
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
86 |
map.put("Signature.SHA512/224withRSA SupportedKeyClasses", rsaKeyClasses); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
87 |
map.put("Signature.SHA512/256withRSA SupportedKeyClasses", rsaKeyClasses); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
88 |
map.put("Signature.RSASSA-PSS SupportedKeyClasses", rsaKeyClasses); |
2 | 89 |
|
90 |
// aliases |
|
91 |
map.put("Alg.Alias.KeyFactory.1.2.840.113549.1.1", "RSA"); |
|
92 |
map.put("Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1", "RSA"); |
|
93 |
||
94 |
map.put("Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1", "RSA"); |
|
95 |
map.put("Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1", "RSA"); |
|
96 |
||
97 |
map.put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); |
|
98 |
map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); |
|
99 |
||
100 |
map.put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); |
|
101 |
map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); |
|
102 |
||
103 |
map.put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); |
|
104 |
map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); |
|
105 |
map.put("Alg.Alias.Signature.1.3.14.3.2.29", "SHA1withRSA"); |
|
106 |
||
12685 | 107 |
map.put("Alg.Alias.Signature.1.2.840.113549.1.1.14", "SHA224withRSA"); |
108 |
map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.14", "SHA224withRSA"); |
|
109 |
||
2 | 110 |
map.put("Alg.Alias.Signature.1.2.840.113549.1.1.11", "SHA256withRSA"); |
111 |
map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.11", "SHA256withRSA"); |
|
112 |
||
113 |
map.put("Alg.Alias.Signature.1.2.840.113549.1.1.12", "SHA384withRSA"); |
|
114 |
map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.12", "SHA384withRSA"); |
|
115 |
||
116 |
map.put("Alg.Alias.Signature.1.2.840.113549.1.1.13", "SHA512withRSA"); |
|
117 |
map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.13", "SHA512withRSA"); |
|
50204
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
118 |
map.put("Alg.Alias.Signature.1.2.840.113549.1.1.15", "SHA512/224withRSA"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
119 |
map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.15", "SHA512/224withRSA"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
120 |
map.put("Alg.Alias.Signature.1.2.840.113549.1.1.16", "SHA512/256withRSA"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
121 |
map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.16", "SHA512/256withRSA"); |
2 | 122 |
|
50204
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
123 |
map.put("Alg.Alias.KeyFactory.1.2.840.113549.1.1.10", "RSASSA-PSS"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
124 |
map.put("Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1.10", "RSASSA-PSS"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
125 |
|
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
126 |
map.put("Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1.10", "RSASSA-PSS"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
127 |
map.put("Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1.10", "RSASSA-PSS"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
128 |
|
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
129 |
map.put("Alg.Alias.Signature.1.2.840.113549.1.1.10", "RSASSA-PSS"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
130 |
map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.10", "RSASSA-PSS"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
131 |
|
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
132 |
map.put("Alg.Alias.AlgorithmParameters.1.2.840.113549.1.1.10", "RSASSA-PSS"); |
3195a713e24d
8146293: Add support for RSASSA-PSS Signature algorithm
valeriep
parents:
47216
diff
changeset
|
133 |
map.put("Alg.Alias.AlgorithmParameters.OID.1.2.840.113549.1.1.10", "RSASSA-PSS"); |
2 | 134 |
} |
135 |
} |