JDK 11 jdk.security.jgss.jmod - Security JGSS Module

JDK 11 jdk.security.jgss.jmod is the JMOD file for JDK 11 Security Jgss module.

JDK 11 Security JGSS module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.security.jgss.jmod.

JDK 11 Security JGSS module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.

JDK 11 Security JGSS module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.security.jgss.

You can click and view the content of each source code file in the list below.

✍: FYIcenter

com/sun/security/sasl/gsskerb/FactoryImpl.java

/*
 * Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package com.sun.security.sasl.gsskerb;

import javax.security.sasl.*;
import com.sun.security.sasl.util.PolicyUtils;

import java.util.Map;
import javax.security.auth.callback.CallbackHandler;

/**
  * Client/server factory for GSSAPI (Kerberos V5) SASL client/server mechs.
  * See GssKrb5Client/GssKrb5Server for input requirements.
  *
  * @author Rosanna Lee
  */
public final class FactoryImpl implements SaslClientFactory, SaslServerFactory {
    private static final String[] myMechs = {
        "GSSAPI"};

    private static final int[] mechPolicies = {
        PolicyUtils.NOPLAINTEXT|PolicyUtils.NOANONYMOUS|PolicyUtils.NOACTIVE
    };

    private static final int GSS_KERB_V5 = 0;

    public FactoryImpl() {
    }

    public SaslClient createSaslClient(String[] mechs,
        String authorizationId,
        String protocol,
        String serverName,
        Map<String,?> props,
        CallbackHandler cbh) throws SaslException {

            for (int i = 0; i < mechs.length; i++) {
                if (mechs[i].equals(myMechs[GSS_KERB_V5])
                    && PolicyUtils.checkPolicy(mechPolicies[GSS_KERB_V5], props)) {
                    return new GssKrb5Client(
                        authorizationId,
                        protocol,
                        serverName,
                        props,
                        cbh);
                }
            }
            return null;
    };

    public SaslServer createSaslServer(String mech,
        String protocol,
        String serverName,
        Map<String,?> props,
        CallbackHandler cbh) throws SaslException {
            if (mech.equals(myMechs[GSS_KERB_V5])
                && PolicyUtils.checkPolicy(mechPolicies[GSS_KERB_V5], props)) {
                if (cbh == null) {
                    throw new SaslException(
                "Callback handler with support for AuthorizeCallback required");
                }
                return new GssKrb5Server(
                    protocol,
                    serverName,
                    props,
                    cbh);
            }
            return null;
    };

    public String[] getMechanismNames(Map<String,?> props) {
        return PolicyUtils.filterMechs(myMechs, mechPolicies, props);
    }
}

com/sun/security/sasl/gsskerb/FactoryImpl.java

 

JDK 11 jdk.unsupported.jmod - Unsupported Module

JDK 11 jdk.security.auth.jmod - Security Auth Module

Download and Use JDK 11

⇑⇑ FAQ for JDK (Java Development Kit)

2020-04-14, 2691👍, 0💬