Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/sun/security/rsa/SunRsaSignEntries.java
38830 views
/*1* Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425package sun.security.rsa;2627import java.util.Map;2829/**30* Defines the entries of the SunRsaSign provider.31*32* @author Andreas Sterbenz33*/34public final class SunRsaSignEntries {3536private SunRsaSignEntries() {37// empty38}3940public static void putEntries(Map<Object, Object> map) {4142// main algorithms43map.put("KeyFactory.RSA",44"sun.security.rsa.RSAKeyFactory$Legacy");45map.put("KeyPairGenerator.RSA",46"sun.security.rsa.RSAKeyPairGenerator$Legacy");47map.put("Signature.MD2withRSA",48"sun.security.rsa.RSASignature$MD2withRSA");49map.put("Signature.MD5withRSA",50"sun.security.rsa.RSASignature$MD5withRSA");51map.put("Signature.SHA1withRSA",52"sun.security.rsa.RSASignature$SHA1withRSA");53map.put("Signature.SHA224withRSA",54"sun.security.rsa.RSASignature$SHA224withRSA");55map.put("Signature.SHA256withRSA",56"sun.security.rsa.RSASignature$SHA256withRSA");57map.put("Signature.SHA384withRSA",58"sun.security.rsa.RSASignature$SHA384withRSA");59map.put("Signature.SHA512withRSA",60"sun.security.rsa.RSASignature$SHA512withRSA");61map.put("Signature.SHA512/224withRSA",62"sun.security.rsa.RSASignature$SHA512_224withRSA");63map.put("Signature.SHA512/256withRSA",64"sun.security.rsa.RSASignature$SHA512_256withRSA");6566map.put("KeyFactory.RSASSA-PSS",67"sun.security.rsa.RSAKeyFactory$PSS");68map.put("KeyPairGenerator.RSASSA-PSS",69"sun.security.rsa.RSAKeyPairGenerator$PSS");70map.put("Signature.RSASSA-PSS",71"sun.security.rsa.RSAPSSSignature");72map.put("AlgorithmParameters.RSASSA-PSS",73"sun.security.rsa.PSSParameters");7475// attributes for supported key classes76String rsaKeyClasses = "java.security.interfaces.RSAPublicKey" +77"|java.security.interfaces.RSAPrivateKey";78map.put("Signature.MD2withRSA SupportedKeyClasses", rsaKeyClasses);79map.put("Signature.MD5withRSA SupportedKeyClasses", rsaKeyClasses);80map.put("Signature.SHA1withRSA SupportedKeyClasses", rsaKeyClasses);81map.put("Signature.SHA224withRSA SupportedKeyClasses", rsaKeyClasses);82map.put("Signature.SHA256withRSA SupportedKeyClasses", rsaKeyClasses);83map.put("Signature.SHA384withRSA SupportedKeyClasses", rsaKeyClasses);84map.put("Signature.SHA512withRSA SupportedKeyClasses", rsaKeyClasses);85map.put("Signature.SHA512/224withRSA SupportedKeyClasses", rsaKeyClasses);86map.put("Signature.SHA512/256withRSA SupportedKeyClasses", rsaKeyClasses);87map.put("Signature.RSASSA-PSS SupportedKeyClasses", rsaKeyClasses);8889// aliases90map.put("Alg.Alias.KeyFactory.1.2.840.113549.1.1", "RSA");91map.put("Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1", "RSA");9293map.put("Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1", "RSA");94map.put("Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1", "RSA");9596map.put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA");97map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA");9899map.put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA");100map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA");101102map.put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA");103map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA");104map.put("Alg.Alias.Signature.1.3.14.3.2.29", "SHA1withRSA");105106map.put("Alg.Alias.Signature.1.2.840.113549.1.1.14", "SHA224withRSA");107map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.14", "SHA224withRSA");108109map.put("Alg.Alias.Signature.1.2.840.113549.1.1.11", "SHA256withRSA");110map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.11", "SHA256withRSA");111112map.put("Alg.Alias.Signature.1.2.840.113549.1.1.12", "SHA384withRSA");113map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.12", "SHA384withRSA");114115map.put("Alg.Alias.Signature.1.2.840.113549.1.1.13", "SHA512withRSA");116map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.13", "SHA512withRSA");117map.put("Alg.Alias.Signature.1.2.840.113549.1.1.15", "SHA512/224withRSA");118map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.15", "SHA512/224withRSA");119map.put("Alg.Alias.Signature.1.2.840.113549.1.1.16", "SHA512/256withRSA");120map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.16", "SHA512/256withRSA");121122map.put("Alg.Alias.KeyFactory.1.2.840.113549.1.1.10", "RSASSA-PSS");123map.put("Alg.Alias.KeyFactory.OID.1.2.840.113549.1.1.10", "RSASSA-PSS");124125map.put("Alg.Alias.KeyPairGenerator.1.2.840.113549.1.1.10", "RSASSA-PSS");126map.put("Alg.Alias.KeyPairGenerator.OID.1.2.840.113549.1.1.10", "RSASSA-PSS");127128map.put("Alg.Alias.Signature.1.2.840.113549.1.1.10", "RSASSA-PSS");129map.put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.10", "RSASSA-PSS");130131map.put("Alg.Alias.AlgorithmParameters.1.2.840.113549.1.1.10", "RSASSA-PSS");132map.put("Alg.Alias.AlgorithmParameters.OID.1.2.840.113549.1.1.10", "RSASSA-PSS");133}134}135136137