blob: c1900e582fb3fd503fa17eba50d251e442debd88 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 2003-2006 Sun Microsystems, Inc. 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. Sun designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Sun 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
22 * CA 95054 USA or visit www.sun.com if you need additional information or
23 * have any questions.
24 */
25package com.sun.security.sasl;
26
27import java.security.AccessController;
28import java.security.PrivilegedAction;
29
30/**
31 * The SASL provider.
32 * Provides client support for
33 * - EXTERNAL
34 * - PLAIN
35 * - CRAM-MD5
36 * - DIGEST-MD5
37 * - GSSAPI/Kerberos v5
38 * And server support for
39 * - CRAM-MD5
40 * - DIGEST-MD5
41 * - GSSAPI/Kerberos v5
42 */
43
44public final class Provider extends java.security.Provider {
45
46 private static final long serialVersionUID = 8622598936488630849L;
47
48 private static final String info = "Sun SASL provider" +
49 "(implements client mechanisms for: " +
50 "DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5;" +
51 " server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)";
52
53 public Provider() {
54 super("SunSASL", 1.5, info);
55
56 AccessController.doPrivileged(new PrivilegedAction<Void>() {
57 public Void run() {
58 // Client mechanisms
59 put("SaslClientFactory.DIGEST-MD5",
60 "com.sun.security.sasl.digest.FactoryImpl");
61 put("SaslClientFactory.GSSAPI",
62 "com.sun.security.sasl.gsskerb.FactoryImpl");
63
64 put("SaslClientFactory.EXTERNAL",
65 "com.sun.security.sasl.ClientFactoryImpl");
66 put("SaslClientFactory.PLAIN",
67 "com.sun.security.sasl.ClientFactoryImpl");
68 put("SaslClientFactory.CRAM-MD5",
69 "com.sun.security.sasl.ClientFactoryImpl");
70
71 // Server mechanisms
72 put("SaslServerFactory.CRAM-MD5",
73 "com.sun.security.sasl.ServerFactoryImpl");
74 put("SaslServerFactory.GSSAPI",
75 "com.sun.security.sasl.gsskerb.FactoryImpl");
76 put("SaslServerFactory.DIGEST-MD5",
77 "com.sun.security.sasl.digest.FactoryImpl");
78 return null;
79 }
80 });
81 }
82}