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/security/jgss/wrapper/NativeGSSFactory.java
/* * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package sun.security.jgss.wrapper; import java.security.Provider; import java.util.Vector; import org.ietf.jgss.*; import sun.security.jgss.GSSUtil; import sun.security.jgss.GSSCaller; import sun.security.jgss.GSSExceptionImpl; import sun.security.jgss.spi.*; import static java.nio.charset.StandardCharsets.UTF_8; /** * JGSS plugin for generic mechanisms provided through native GSS framework. * * @author Valerie Peng */ public final class NativeGSSFactory implements MechanismFactory { GSSLibStub cStub = null; private final GSSCaller caller; private GSSCredElement getCredFromSubject(GSSNameElement name, boolean initiate) throws GSSException { Oid mech = cStub.getMech(); Vector<GSSCredElement> creds = GSSUtil.searchSubject (name, mech, initiate, GSSCredElement.class); // If Subject is present but no native creds available if (creds != null && creds.isEmpty()) { if (GSSUtil.useSubjectCredsOnly(caller)) { throw new GSSException(GSSException.NO_CRED); } } GSSCredElement result = ((creds == null || creds.isEmpty()) ? null : creds.firstElement()); // Force permission check before returning the cred to caller if (result != null) { result.doServicePermCheck(); } return result; } public NativeGSSFactory(GSSCaller caller) { this.caller = caller; // Have to call setMech(Oid) explicitly before calling other // methods. Otherwise, NPE may be thrown unexpectantly } public void setMech(Oid mech) throws GSSException { cStub = GSSLibStub.getInstance(mech); } public GSSNameSpi getNameElement(String nameStr, Oid nameType) throws GSSException { byte[] nameBytes = (nameStr == null ? null : nameStr.getBytes(UTF_8)); return new GSSNameElement(nameBytes, nameType, cStub); } public GSSNameSpi getNameElement(byte[] name, Oid nameType) throws GSSException { return new GSSNameElement(name, nameType, cStub); } public GSSCredentialSpi getCredentialElement(GSSNameSpi name, int initLifetime, int acceptLifetime, int usage) throws GSSException { GSSNameElement nname = null; if (name != null && !(name instanceof GSSNameElement)) { nname = (GSSNameElement) getNameElement(name.toString(), name.getStringNameType()); } else nname = (GSSNameElement) name; if (usage == GSSCredential.INITIATE_AND_ACCEPT) { // Force separate acqusition of cred element since // MIT's impl does not correctly report NO_CRED error. usage = GSSCredential.INITIATE_ONLY; } GSSCredElement credElement = getCredFromSubject(nname, (usage == GSSCredential.INITIATE_ONLY)); if (credElement == null) { // No cred in the Subject if (usage == GSSCredential.INITIATE_ONLY) { credElement = new GSSCredElement(nname, initLifetime, usage, cStub); } else if (usage == GSSCredential.ACCEPT_ONLY) { if (nname == null) { nname = GSSNameElement.DEF_ACCEPTOR; } credElement = new GSSCredElement(nname, acceptLifetime, usage, cStub); } else { throw new GSSException(GSSException.FAILURE, -1, "Unknown usage mode requested"); } } return credElement; } public GSSContextSpi getMechanismContext(GSSNameSpi peer, GSSCredentialSpi myCred, int lifetime) throws GSSException { if (peer == null) { throw new GSSException(GSSException.BAD_NAME); } else if (!(peer instanceof GSSNameElement)) { peer = (GSSNameElement) getNameElement(peer.toString(), peer.getStringNameType()); } if (myCred == null) { myCred = getCredFromSubject(null, true); } else if (!(myCred instanceof GSSCredElement)) { throw new GSSException(GSSException.NO_CRED); } return new NativeGSSContext((GSSNameElement) peer, (GSSCredElement) myCred, lifetime, cStub); } public GSSContextSpi getMechanismContext(GSSCredentialSpi myCred) throws GSSException { if (myCred == null) { myCred = getCredFromSubject(null, false); } else if (!(myCred instanceof GSSCredElement)) { throw new GSSException(GSSException.NO_CRED); } return new NativeGSSContext((GSSCredElement) myCred, cStub); } public GSSContextSpi getMechanismContext(byte[] exportedContext) throws GSSException { return cStub.importContext(exportedContext); } public final Oid getMechanismOid() { return cStub.getMech(); } public Provider getProvider() { return SunNativeProvider.INSTANCE; } public Oid[] getNameTypes() throws GSSException { return cStub.inquireNamesForMech(); } }
⏎ sun/security/jgss/wrapper/NativeGSSFactory.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, 5250👍, 0💬
Popular Posts:
Oracle Business Intelligence (BI) Beans enables developers to productively build business intelligen...
Apache Neethi provides general framework for the programmers to use WS Policy. It is compliant with ...
What Is javaws.jar in JRE (Java Runtime Environment) 8? javaws.jar in JRE (Java Runtime Environment)...
JDK 11 java.sql.rowset.jmod is the JMOD file for JDK 11 SQL Rowset module. JDK 11 SQL Rowset module ...
What Is poi-ooxml-3.5.jar? poi-ooxml-3.5.jar is one of the JAR files for Apache POI 3.5, which provi...