Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
JDK 17 java.security.jgss.jmod - Security JGSS Module
JDK 17 java.security.jgss.jmod is the JMOD file for JDK 17 Security JGSS (Java Generic Security Service) module.
JDK 17 Security JGSS module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\java.security.jgss.jmod.
JDK 17 Security JGSS module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Security JGSS module source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\java.security.jgss.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ sun/net/www/protocol/http/spnego/NegotiatorImpl.java
/* * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package sun.net.www.protocol.http.spnego; import java.io.IOException; import org.ietf.jgss.GSSContext; import org.ietf.jgss.GSSException; import org.ietf.jgss.GSSName; import org.ietf.jgss.Oid; import sun.net.www.protocol.http.HttpCallerInfo; import sun.net.www.protocol.http.Negotiator; import sun.security.action.GetBooleanAction; import sun.security.action.GetPropertyAction; import sun.security.jgss.GSSManagerImpl; import sun.security.jgss.GSSContextImpl; import sun.security.jgss.GSSUtil; import sun.security.jgss.HttpCaller; import sun.security.jgss.krb5.internal.TlsChannelBindingImpl; import sun.security.util.ChannelBindingException; import sun.security.util.TlsChannelBinding; /** * This class encapsulates all JAAS and JGSS API calls in a separate class * outside NegotiateAuthentication.java so that J2SE build can go smoothly * without the presence of it. * * @author weijun.wang@sun.com * @since 1.6 */ public class NegotiatorImpl extends Negotiator { private static final boolean DEBUG = GetBooleanAction.privilegedGetProperty("sun.security.krb5.debug"); private GSSContext context; private byte[] oneToken; /** * Initialize the object, which includes:<ul> * <li>Find out what GSS mechanism to use from the system property * <code>http.negotiate.mechanism.oid</code>, defaults SPNEGO * <li>Creating the GSSName for the target host, "HTTP/"+hostname * <li>Creating GSSContext * <li>A first call to initSecContext</ul> */ private void init(HttpCallerInfo hci) throws GSSException, ChannelBindingException { final Oid oid; if (hci.scheme.equalsIgnoreCase("Kerberos")) { // we can only use Kerberos mech when the scheme is kerberos oid = GSSUtil.GSS_KRB5_MECH_OID; } else { String pref = GetPropertyAction .privilegedGetProperty("http.auth.preference", "spnego"); if (pref.equalsIgnoreCase("kerberos")) { oid = GSSUtil.GSS_KRB5_MECH_OID; } else { // currently there is no 3rd mech we can use oid = GSSUtil.GSS_SPNEGO_MECH_OID; } } GSSManagerImpl manager = new GSSManagerImpl( new HttpCaller(hci)); // RFC 4559 4.1 uses uppercase service name "HTTP". // RFC 4120 6.2.1 demands the host be lowercase String peerName = "HTTP@" + hci.host.toLowerCase(); GSSName serverName = manager.createName(peerName, GSSName.NT_HOSTBASED_SERVICE); context = manager.createContext(serverName, oid, null, GSSContext.DEFAULT_LIFETIME); // Always respect delegation policy in HTTP/SPNEGO. if (context instanceof GSSContextImpl) { ((GSSContextImpl)context).requestDelegPolicy(true); } if (hci.serverCert != null) { if (DEBUG) { System.out.println("Negotiate: Setting CBT"); } // set the channel binding token TlsChannelBinding b = TlsChannelBinding.create(hci.serverCert); context.setChannelBinding(new TlsChannelBindingImpl(b.getData())); } oneToken = context.initSecContext(new byte[0], 0, 0); } /** * Constructor * @throws java.io.IOException If negotiator cannot be constructed */ public NegotiatorImpl(HttpCallerInfo hci) throws IOException { try { init(hci); } catch (GSSException | ChannelBindingException e) { if (DEBUG) { System.out.println("Negotiate support not initiated, will " + "fallback to other scheme if allowed. Reason:"); e.printStackTrace(); } IOException ioe = new IOException("Negotiate support not initiated"); ioe.initCause(e); throw ioe; } } /** * Return the first token of GSS, in SPNEGO, it's called NegTokenInit * @return the first token */ @Override public byte[] firstToken() { return oneToken; } /** * Return the rest tokens of GSS, in SPNEGO, it's called NegTokenTarg * @param token the token received from server * @return the next token * @throws java.io.IOException if the token cannot be created successfully */ @Override public byte[] nextToken(byte[] token) throws IOException { try { return context.initSecContext(token, 0, token.length); } catch (GSSException e) { if (DEBUG) { System.out.println("Negotiate support cannot continue. Reason:"); e.printStackTrace(); } IOException ioe = new IOException("Negotiate support cannot continue"); ioe.initCause(e); throw ioe; } } }
⏎ sun/net/www/protocol/http/spnego/NegotiatorImpl.java
Or download all of them as a single archive file:
File name: java.security.jgss-17.0.5-src.zip File size: 225968 bytes Release date: 2022-09-13 Download
⇒ JDK 17 java.security.sasl.jmod - Security SASL Module
2023-10-27, 5291👍, 0💬
Popular Posts:
What Is javaws.jar in JRE (Java Runtime Environment) 8? javaws.jar in JRE (Java Runtime Environment)...
JDK 11 jdk.scripting.nashorn.jm odis the JMOD file for JDK 11 Scripting Nashorn module. JDK 11 Scrip...
Apache Neethi provides general framework for the programmers to use WS Policy. It is compliant with ...
Apache BCEL Source Code Files are inside the Apache BCEL source package file like bcel-6.6.1-src.zip...
What Is poi-3.5.jar - Part 2? poi-3.5.jar is one of the JAR files for Apache POI 3.5, which provides...