2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / gnu / java / security / provider / Gnu.java
blob70a7d1df15ec8cf204be91ed3a621a3d0b5fd8c9
1 /* Gnu.java --- Gnu provider main class
2 Copyright (C) 1999, 2002, 2003 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., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 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;
40 import java.security.Provider;
42 public final class Gnu extends Provider
44 public Gnu()
46 super("GNU", 1.0, "GNU provider v1.0 implementing SHA-1, MD5, DSA, X.509 Certificates");
48 // Note that all implementation class names are referenced by using
49 // Class.getName(). That way when we staticly link the Gnu provider
50 // we automatically get all the implementation classes.
52 // Signature
53 put("Signature.SHA1withDSA",
54 gnu.java.security.provider.DSASignature.class.getName());
56 put("Alg.Alias.Signature.DSS", "SHA1withDSA");
57 put("Alg.Alias.Signature.DSA", "SHA1withDSA");
58 put("Alg.Alias.Signature.SHAwithDSA", "SHA1withDSA");
59 put("Alg.Alias.Signature.DSAwithSHA", "SHA1withDSA");
60 put("Alg.Alias.Signature.DSAwithSHA1", "SHA1withDSA");
61 put("Alg.Alias.Signature.SHA/DSA", "SHA1withDSA");
62 put("Alg.Alias.Signature.SHA-1/DSA", "SHA1withDSA");
63 put("Alg.Alias.Signature.SHA1/DSA", "SHA1withDSA");
64 put("Alg.Alias.Signature.OID.1.2.840.10040.4.3", "SHA1withDSA");
65 put("Alg.Alias.Signature.1.2.840.10040.4.3", "SHA1withDSA");
66 put("Alg.Alias.Signature.1.3.14.3.2.13", "SHA1withDSA");
67 put("Alg.Alias.Signature.1.3.14.3.2.27", "SHA1withDSA");
69 // Key Pair Generator
70 put("KeyPairGenerator.DSA",
71 gnu.java.security.provider.DSAKeyPairGenerator.class.getName());
73 put("Alg.Alias.KeyPairGenerator.OID.1.2.840.10040.4.1", "DSA");
74 put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA");
75 put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA");
77 // Key Factory
78 put("KeyFactory.DSA",
79 gnu.java.security.provider.DSAKeyFactory.class.getName());
81 put("Alg.Alias.KeyFactory.OID.1.2.840.10040.4.1", "DSA");
82 put("Alg.Alias.KeyFactory.1.2.840.10040.4.1", "DSA");
83 put("Alg.Alias.KeyFactory.1.3.14.3.2.12", "DSA");
85 // Message Digests
86 put("MessageDigest.SHA", gnu.java.security.provider.SHA.class.getName());
87 put("MessageDigest.MD5", gnu.java.security.provider.MD5.class.getName());
89 // Format "Alias", "Actual Name"
90 put("Alg.Alias.MessageDigest.SHA1", "SHA");
91 put("Alg.Alias.MessageDigest.SHA-1", "SHA");
93 // Algorithm Parameters
94 put("AlgorithmParameters.DSA",
95 gnu.java.security.provider.DSAParameters.class.getName());
97 // Algorithm Parameter Generator
98 put("AlgorithmParameterGenerator.DSA",
99 gnu.java.security.provider.DSAParameterGenerator.class.getName());
101 // SecureRandom
102 put("SecureRandom.SHA1PRNG",
103 gnu.java.security.provider.SHA1PRNG.class.getName());
105 // CertificateFactory
106 put("CertificateFactory.X.509",
107 gnu.java.security.provider.X509CertificateFactory.class.getName());
109 put("Alg.Alias.CertificateFactory.X509", "X.509");