Path: blob/jdk8u272-b10-aarch32-20201026/jdk/src/share/classes/com/sun/security/sasl/Provider.java
83410 views
/*1* Copyright (c) 2003, 2013, 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*/24package com.sun.security.sasl;2526import java.security.AccessController;27import java.security.PrivilegedAction;2829/**30* The SASL provider.31* Provides client support for32* - EXTERNAL33* - PLAIN34* - CRAM-MD535* - DIGEST-MD536* - GSSAPI/Kerberos v537* - NTLM38* And server support for39* - CRAM-MD540* - DIGEST-MD541* - GSSAPI/Kerberos v542* - NTLM43*/4445public final class Provider extends java.security.Provider {4647private static final long serialVersionUID = 8622598936488630849L;4849private static final String info = "Sun SASL provider" +50"(implements client mechanisms for: " +51"DIGEST-MD5, GSSAPI, EXTERNAL, PLAIN, CRAM-MD5, NTLM;" +52" server mechanisms for: DIGEST-MD5, GSSAPI, CRAM-MD5, NTLM)";5354public Provider() {55super("SunSASL", 1.8d, info);5657AccessController.doPrivileged(new PrivilegedAction<Void>() {58public Void run() {59// Client mechanisms60put("SaslClientFactory.DIGEST-MD5",61"com.sun.security.sasl.digest.FactoryImpl");62put("SaslClientFactory.NTLM",63"com.sun.security.sasl.ntlm.FactoryImpl");64put("SaslClientFactory.GSSAPI",65"com.sun.security.sasl.gsskerb.FactoryImpl");6667put("SaslClientFactory.EXTERNAL",68"com.sun.security.sasl.ClientFactoryImpl");69put("SaslClientFactory.PLAIN",70"com.sun.security.sasl.ClientFactoryImpl");71put("SaslClientFactory.CRAM-MD5",72"com.sun.security.sasl.ClientFactoryImpl");7374// Server mechanisms75put("SaslServerFactory.CRAM-MD5",76"com.sun.security.sasl.ServerFactoryImpl");77put("SaslServerFactory.GSSAPI",78"com.sun.security.sasl.gsskerb.FactoryImpl");79put("SaslServerFactory.DIGEST-MD5",80"com.sun.security.sasl.digest.FactoryImpl");81put("SaslServerFactory.NTLM",82"com.sun.security.sasl.ntlm.FactoryImpl");83return null;84}85});86}87}888990