Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/sun/security/jgss/SunProvider.java
38830 views
/*1* Copyright (c) 2000, 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*/2425package sun.security.jgss;2627import java.security.Provider;28import java.security.AccessController;2930/**31* Defines the Sun JGSS provider.32* Will merger this with the Sun security provider33* sun.security.provider.Sun when the JGSS src is merged with the JDK34* src.35*36* Mechanisms supported are:37*38* - Kerberos v5 as defined in RFC 1964.39* Oid is 1.2.840.113554.1.2.240*41* - SPNEGO as defined in RFC 247842* Oid is 1.3.6.1.5.5.243*44* [Dummy mechanism is no longer compiled:45* - Dummy mechanism. This is primarily useful to test a multi-mech46* environment.47* Oid is 1.3.6.1.4.1.42.2.26.1.2]48*49* @author Mayank Upadhyay50*/5152public final class SunProvider extends Provider {5354private static final long serialVersionUID = -238911724858694198L;5556private static final String INFO = "Sun " +57"(Kerberos v5, SPNEGO)";58// "(Kerberos v5, Dummy GSS-API Mechanism)";5960public static final SunProvider INSTANCE = new SunProvider();6162public SunProvider() {63/* We are the Sun JGSS provider */64super("SunJGSS", 1.8d, INFO);6566AccessController.doPrivileged(67new java.security.PrivilegedAction<Void>() {68public Void run() {69put("GssApiMechanism.1.2.840.113554.1.2.2",70"sun.security.jgss.krb5.Krb5MechFactory");71put("GssApiMechanism.1.3.6.1.5.5.2",72"sun.security.jgss.spnego.SpNegoMechFactory");73/*74put("GssApiMechanism.1.3.6.1.4.1.42.2.26.1.2",75"sun.security.jgss.dummy.DummyMechFactory");76*/77return null;78}79});80}81}828384