maguro      2005/04/13 22:44:28

  Modified:    modules/core/src/java/org/openejb/corba/security/config/tss
                        TSSNULLASMechConfig.java
  Log:

  If the AS and SAS mechs are "empty" do not initiate a context.  Must always 
return a complete AS context.
  
  Revision  Changes    Path
  1.4       +14 -3     
openejb/modules/core/src/java/org/openejb/corba/security/config/tss/TSSNULLASMechConfig.java
  
  Index: TSSNULLASMechConfig.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/corba/security/config/tss/TSSNULLASMechConfig.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TSSNULLASMechConfig.java  28 Mar 2005 21:00:19 -0000      1.3
  +++ TSSNULLASMechConfig.java  14 Apr 2005 02:44:28 -0000      1.4
  @@ -50,6 +50,9 @@
   import org.omg.CORBA.ORB;
   import org.omg.CSIIOP.AS_ContextSec;
   import org.omg.IOP.Codec;
  +import org.omg.GSSUP.GSSUPMechOID;
  +
  +import org.openejb.corba.util.Util;
   
   
   /**
  @@ -65,13 +68,21 @@
           return 0;
       }
   
  +    /**
  +     * Encode a virtually null AS context.  Since supports is zero, 
everything
  +     * else should be ignored.
  +     * @param orb
  +     * @param codec
  +     * @return
  +     * @throws Exception
  +     */
       public AS_ContextSec encodeIOR(ORB orb, Codec codec) throws Exception {
           AS_ContextSec result = new AS_ContextSec();
   
           result.target_supports = 0;
           result.target_requires = 0;
  -        result.client_authentication_mech = null;
  -        result.target_name = null;
  +        result.client_authentication_mech = 
Util.encodeOID(GSSUPMechOID.value);
  +        result.target_name = Util.encodeGSSExportName(GSSUPMechOID.value, 
"");
   
           return result;
       }
  
  
  

Reply via email to