Showing the changes to java/pkg/sun/security/rsa/SunRsaSignEntries.java (1 of 18352 files). Show all
Unified · Split
| @@ -0,0 +1,101 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved. | ||
| 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 | ||
| 7 | * published by the Free Software Foundation. Oracle designates this | ||
| 8 | * particular file as subject to the "Classpath" exception as provided | ||
| 9 | * by Oracle in the LICENSE file that accompanied this code. | ||
| 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 | * | ||
| 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. | ||
| 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 | |||
| 45 | map.put("KeyFactory.RSA", | ||
| 46 | "sun.security.rsa.RSAKeyFactory"); | ||
| 47 | map.put("KeyPairGenerator.RSA", | ||
| 48 | "sun.security.rsa.RSAKeyPairGenerator"); | ||
| 49 | map.put("Signature.MD2withRSA", | ||
| 50 | "sun.security.rsa.RSASignature$MD2withRSA"); | ||
| 51 | map.put("Signature.MD5withRSA", | ||
| 52 | "sun.security.rsa.RSASignature$MD5withRSA"); | ||
| 53 | map.put("Signature.SHA1withRSA", | ||
| 54 | "sun.security.rsa.RSASignature$SHA1withRSA"); | ||
| 55 | map.put("Signature.SHA256withRSA", | ||
| 56 | "sun.security.rsa.RSASignature$SHA256withRSA"); | ||
| 57 | map.put("Signature.SHA384withRSA", | ||
| 58 | "sun.security.rsa.RSASignature$SHA384withRSA"); | ||
| 59 | map.put("Signature.SHA512withRSA", | ||
| 60 | "sun.security.rsa.RSASignature$SHA512withRSA"); | ||
| 61 | |||
| 62 | // attributes for supported key classes | ||
| 63 | |||
| 64 | String rsaKeyClasses = "java.security.interfaces.RSAPublicKey" + | ||
| 65 | "|java.security.interfaces.RSAPrivateKey"; | ||
| 66 | map.put("Signature.MD2withRSA SupportedKeyClasses", rsaKeyClasses); | ||
| 67 | map.put("Signature.MD5withRSA SupportedKeyClasses", rsaKeyClasses); | ||
| 68 | map.put("Signature.SHA1withRSA SupportedKeyClasses", rsaKeyClasses); | ||
| 69 | map.put("Signature.SHA256withRSA SupportedKeyClasses", rsaKeyClasses); | ||
| 70 | map.put("Signature.SHA384withRSA SupportedKeyClasses", rsaKeyClasses); | ||
| 71 | map.put("Signature.SHA512withRSA SupportedKeyClasses", rsaKeyClasses); | ||
| 72 | |||
| 73 | // aliases | ||
| 74 | |||
| 75 | map.put("Alg.Alias.KeyFactory.1.2.840.113549.1.1", "RSA"); | ||
| 76 | map.put("Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1", "RSA"); | ||
| 77 | |||
| 78 | map.put("Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1", "RSA"); | ||
| 79 | map.put("Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1", "RSA"); | ||
| 80 | |||
| 81 | map.put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA"); | ||
| 82 | map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA"); | ||
| 83 | |||
| 84 | map.put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA"); | ||
| 85 | map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA"); | ||
| 86 | |||
| 87 | map.put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA"); | ||
| 88 | map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA"); | ||
| 89 | map.put("Alg.Alias.Signature.1.3.14.3.2.29", "SHA1withRSA"); | ||
| 90 | |||
| 91 | map.put("Alg.Alias.Signature.1.2.840.113549.1.1.11", "SHA256withRSA"); | ||
| 92 | map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.11", "SHA256withRSA"); | ||
| 93 | |||
| 94 | map.put("Alg.Alias.Signature.1.2.840.113549.1.1.12", "SHA384withRSA"); | ||
| 95 | map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.12", "SHA384withRSA"); | ||
| 96 | |||
| 97 | map.put("Alg.Alias.Signature.1.2.840.113549.1.1.13", "SHA512withRSA"); | ||
| 98 | map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.13", "SHA512withRSA"); | ||
| 99 | |||
| 100 | } | ||
| 101 | } | ||