Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / libjava / classpath / gnu / java / security / provider / Gnu.java
blobe553bbcbd8a1ea8914170d0af7df80118a867fbc
1 /* Gnu.java --- Gnu provider main class
2 Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19 02110-1301 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 package gnu.java.security.provider;
41 import java.security.AccessController;
42 import java.security.PrivilegedAction;
43 import java.security.Provider;
45 public final class Gnu extends Provider
47 public Gnu()
49 super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, RSA, X.509 Certificates and CRLs, PKIX certificate path validators, Collection cert stores, Diffie-Hellman key agreement and key pair generator");
51 AccessController.doPrivileged (new PrivilegedAction()
53 public Object run()
55 // Note that all implementation class names are referenced by using
56 // Class.getName(). That way when we staticly link the Gnu provider
57 // we automatically get all the implementation classes.
59 // Signature
60 put("Signature.SHA1withDSA",
61 gnu.java.security.provider.DSASignature.class.getName());
63 put("Alg.Alias.Signature.DSS", "SHA1withDSA");
64 put("Alg.Alias.Signature.DSA", "SHA1withDSA");
65 put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA");
66 put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA");
67 put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA");
68 put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA");
69 put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA");
70 put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA");
71 put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA");
72 put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA");
73 put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA");
74 put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA");
76 put("Signature.MD2withRSA", MD2withRSA.class.getName());
77 put("Signature.MD2withRSA ImplementedIn", "Software");
78 put("Alg.Alias.Signature.md2WithRSAEncryption", "MD2withRSA");
79 put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.2", "MD2withRSA");
80 put("Alg.Alias.Signature.1.2.840.113549.1.1.2", "MD2withRSA");
82 put("Signature.MD4withRSA", MD4withRSA.class.getName());
83 put("Signature.MD4withRSA ImplementedIn", "Software");
84 put("Alg.Alias.Signature.md4WithRSAEncryption", "MD4withRSA");
85 put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.3", "MD4withRSA");
86 put("Alg.Alias.Signature.1.2.840.113549.1.1.3", "MD4withRSA");
88 put("Signature.MD5withRSA", MD5withRSA.class.getName());
89 put("Signature.MD5withRSA ImplementedIn", "Software");
90 put("Alg.Alias.Signature.md5WithRSAEncryption", "MD5withRSA");
91 put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.4", "MD5withRSA");
92 put("Alg.Alias.Signature.1.2.840.113549.1.1.4", "MD5withRSA");
94 put("Signature.SHA1withRSA", SHA1withRSA.class.getName());
95 put("Signature.SHA1withRSA ImplementedIn", "Software");
96 put("Alg.Alias.Signature.sha-1WithRSAEncryption", "SHA1withRSA");
97 put("Alg.Alias.Signature.OID.1.2.840.113549.1.1.5", "SHA1withRSA");
98 put("Alg.Alias.Signature.1.2.840.113549.1.1.5", "SHA1withRSA");
100 // Key Pair Generator
101 put("KeyPairGenerator.DSA",
102 gnu.java.security.provider.DSAKeyPairGenerator.class.getName());
103 put("KeyPairGenerator.DiffieHellman", DiffieHellmanKeyPairGeneratorImpl.class.getName ());
105 put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA");
106 put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA");
107 put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA");
108 put("Alg.Alias.KeyPairGenerator.DH", "DiffieHellman");
110 // Key Factory
111 put("KeyFactory.DSA",
112 gnu.java.security.provider.DSAKeyFactory.class.getName());
114 put("KeyFactory.Encoded", EncodedKeyFactory.class.getName());
115 put("KeyFactory.Encoded ImplementedIn", "Software");
116 put("Alg.Alias.KeyFactory.X.509", "Encoded");
117 put("Alg.Alias.KeyFactory.X509", "Encoded");
118 put("Alg.Alias.KeyFactory.PKCS#8", "Encoded");
119 put("Alg.Alias.KeyFactory.PKCS8", "Encoded");
121 put("KeyFactory.RSA", RSAKeyFactory.class.getName());
123 put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA");
124 put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");
125 put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA");
127 put("KeyFactory.DiffieHellman", DiffieHellmanKeyFactoryImpl.class.getName());
128 put("Alg.Alias.KeyFactory.DH", "DiffieHellman");
130 // Message Digests
131 put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName());
132 put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName());
134 // Format "Alias", "Actual Name"
135 put("Alg.Alias.MessageDigest.SHA1", "SHA");
136 put("Alg.Alias.MessageDigest.SHA-1", "SHA");
137 put("Alg.Alias.MessageDigest.SHA-160", "SHA");
139 // Algorithm Parameters
140 put("AlgorithmParameters.DSA",
141 gnu.java.security.provider.DSAParameters.class.getName());
143 put("Alg.Alias.AlgorithmParameters.DSS", "DSA");
144 put("Alg.Alias.AlgorithmParameters.SHAwithDSA", "DSA");
145 put("Alg.Alias.AlgorithmParameters.OID.1.2.840.10040.4.3", "DSA");
146 put("Alg.Alias.AlgorithmParameters.1.2.840.10040.4.3", "DSA");
148 // Algorithm Parameter Generator
149 put("AlgorithmParameterGenerator.DSA",
150 gnu.java.security.provider.DSAParameterGenerator.class.getName());
152 // SecureRandom
153 put("SecureRandom.SHA1PRNG",
154 gnu.java.security.provider.SHA1PRNG.class.getName());
156 // CertificateFactory
157 put("CertificateFactory.X509", X509CertificateFactory.class.getName());
159 put("CertificateFactory.X509 ImplementedIn", "Software");
160 put("Alg.Alias.CertificateFactory.X.509", "X509");
162 // CertPathValidator
163 put("CertPathValidator.PKIX", PKIXCertPathValidatorImpl.class.getName());
164 put("CertPathValidator.PKIX ImplementedIn", "Software");
166 // CertStore
167 put("CertStore.Collection", CollectionCertStoreImpl.class.getName());
169 // KeyAgreement
170 put("KeyAgreement.DiffieHellman", gnu.javax.crypto.DiffieHellmanImpl.class.getName());
171 put("Alg.Alias.KeyAgreement.DH", "DiffieHellman");
173 // Cipher
174 put("Cipher.RSAES-PKCS1-v1_5", gnu.javax.crypto.RSACipherImpl.class.getName());
175 put("Alg.Alias.Cipher.RSA", "RSAES-PKCS1-v1_5");
177 return null;