Provider.java revision 0
984N/A/*
984N/A * Copyright 2003-2006 Sun Microsystems, Inc. All Rights Reserved.
984N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
984N/A *
984N/A * This code is free software; you can redistribute it and/or modify it
984N/A * under the terms of the GNU General Public License version 2 only, as
984N/A * published by the Free Software Foundation. Sun designates this
984N/A * particular file as subject to the "Classpath" exception as provided
984N/A * by Sun in the LICENSE file that accompanied this code.
984N/A *
984N/A * This code is distributed in the hope that it will be useful, but WITHOUT
984N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
984N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
984N/A * version 2 for more details (a copy is included in the LICENSE file that
984N/A * accompanied this code).
984N/A *
984N/A * You should have received a copy of the GNU General Public License version
984N/A * 2 along with this work; if not, write to the Free Software Foundation,
984N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
984N/A *
984N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
984N/A * CA 95054 USA or visit www.sun.com if you need additional information or
984N/A * have any questions.
984N/A */
984N/Apackage com.sun.security.sasl;
984N/A
984N/Aimport java.security.AccessController;
984N/Aimport java.security.PrivilegedAction;
984N/A
984N/A/**
984N/A * The SASL provider.
984N/A * Provides client support for
984N/A * - EXTERNAL
984N/A * - PLAIN
984N/A * - CRAM-MD5
984N/A * - DIGEST-MD5
984N/A * - GSSAPI/Kerberos v5
984N/A * And server support for
984N/A * - CRAM-MD5
984N/A * - DIGEST-MD5
984N/A * - GSSAPI/Kerberos v5
984N/A */
984N/A
984N/Apublic final class Provider extends java.security.Provider {
984N/A
984N/A private static final long serialVersionUID = 8622598936488630849L;
984N/A
984N/A private static final String info = "Sun SASL provider" +
984N/A "(implements client mechanisms for: " +
984N/A "DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5;" +
" server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5)";
public Provider() {
super("SunSASL", 1.5, info);
AccessController.doPrivileged(new PrivilegedAction<Void>() {
public Void run() {
// Client mechanisms
put("SaslClientFactory.DIGEST-MD5",
"com.sun.security.sasl.digest.FactoryImpl");
put("SaslClientFactory.GSSAPI",
"com.sun.security.sasl.gsskerb.FactoryImpl");
put("SaslClientFactory.EXTERNAL",
"com.sun.security.sasl.ClientFactoryImpl");
put("SaslClientFactory.PLAIN",
"com.sun.security.sasl.ClientFactoryImpl");
put("SaslClientFactory.CRAM-MD5",
"com.sun.security.sasl.ClientFactoryImpl");
// Server mechanisms
put("SaslServerFactory.CRAM-MD5",
"com.sun.security.sasl.ServerFactoryImpl");
put("SaslServerFactory.GSSAPI",
"com.sun.security.sasl.gsskerb.FactoryImpl");
put("SaslServerFactory.DIGEST-MD5",
"com.sun.security.sasl.digest.FactoryImpl");
return null;
}
});
}
}