1 package org.jacorb.security.sas; 2 3 22 23 import java.security.Provider ; 24 25 import org.ietf.jgss.GSSCredential ; 26 import org.ietf.jgss.GSSException ; 27 import org.ietf.jgss.Oid ; 28 29 import sun.security.jgss.spi.GSSCredentialSpi; 30 import sun.security.jgss.spi.GSSNameSpi; 31 32 38 39 public final class GSSUPCredentialSpi implements GSSCredentialSpi 40 { 41 42 private Provider myProvider = null; 43 private Oid myMechOid = null; 44 private GSSNameSpi name = null; 45 private int initLifetime; 46 private int acceptLifetime; 47 private int usage; 48 49 public GSSUPCredentialSpi (Provider myProvider, Oid myMechOid, GSSNameSpi name, int initLifetime, int acceptLifetime, int usage) 50 { 51 this.myProvider = myProvider; 52 this.myMechOid = myMechOid; 53 this.name = name; 54 this.initLifetime = initLifetime; 55 this.acceptLifetime = acceptLifetime; 56 this.usage = usage; 57 } 58 59 public Provider getProvider() 60 { 61 return myProvider; 62 } 63 64 public void dispose() throws GSSException 65 { 66 Provider myProvider = null; 67 Oid myMechOid = null; 68 GSSNameSpi name = null; 69 } 70 71 public GSSNameSpi getName() throws GSSException 72 { 73 return name; 74 } 75 76 public int getInitLifetime() throws GSSException 77 { 78 return initLifetime; 79 } 80 81 public int getAcceptLifetime() throws GSSException 82 { 83 return acceptLifetime; 84 } 85 86 public boolean isInitiatorCredential() throws GSSException 87 { 88 return (usage == GSSCredential.INITIATE_ONLY); 89 } 90 91 public boolean isAcceptorCredential() throws GSSException 92 { 93 return (usage == GSSCredential.ACCEPT_ONLY); 94 } 95 96 public Oid getMechanism() 97 { 98 return myMechOid; 99 } 100 } 101 | Popular Tags |