< prev index next >
src/jdk.security.jgss/share/classes/com/sun/security/jgss/ExtendedGSSContext.java
Print this page
rev 15764 : 8167181: Exported elements referring to inaccessible types in jdk.security.jgss
@@ -24,54 +24,18 @@
*/
package com.sun.security.jgss;
import org.ietf.jgss.*;
-import sun.security.jgss.GSSContextImpl;
-import sun.security.krb5.internal.AuthorizationData;
/**
* The extended GSSContext interface for supporting additional
* functionalities not defined by {@code org.ietf.jgss.GSSContext},
* such as querying context-specific attributes.
*/
public interface ExtendedGSSContext extends GSSContext {
- // The impl is almost identical to GSSContextImpl with only 2 differences:
- // 1. It implements the extended interface
- // 2. It translates result to data types here in inquireSecContext
- static class ExtendedGSSContextImpl extends GSSContextImpl
- implements ExtendedGSSContext {
-
- public ExtendedGSSContextImpl(GSSContextImpl old) {
- super(old);
- }
-
- @Override
- public Object inquireSecContext(InquireType type) throws GSSException {
- SecurityManager security = System.getSecurityManager();
- if (security != null) {
- security.checkPermission(
- new InquireSecContextPermission(type.toString()));
- }
- Object output = super.inquireSecContext(type.name());
- if (output != null) {
- if (type == InquireType.KRB5_GET_AUTHZ_DATA) {
- AuthorizationData ad = (AuthorizationData) output;
- AuthorizationDataEntry[] authzData =
- new AuthorizationDataEntry[ad.count()];
- for (int i = 0; i < ad.count(); i++) {
- authzData[i] = new AuthorizationDataEntry(
- ad.item(i).adType, ad.item(i).adData);
- }
- output = authzData;
- }
- }
- return output;
- }
- }
-
/**
* Return the mechanism-specific attribute associated with {@code type}.
* <p>
* If there is a security manager, an {@link InquireSecContextPermission}
* with the name {@code type.mech} must be granted. Otherwise, this could
< prev index next >