maguro      2005/04/23 14:43:49

  Modified:    modules/core/src/java/org/openejb/corba/util Util.java
  Log:

  GSSUP token was improperly decoded.
  
  Revision  Changes    Path
  1.10      +6 -4      
openejb/modules/core/src/java/org/openejb/corba/util/Util.java
  
  Index: Util.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/corba/util/Util.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Util.java 31 Mar 2005 15:28:11 -0000      1.9
  +++ Util.java 23 Apr 2005 18:43:49 -0000      1.10
  @@ -262,7 +262,7 @@
                               result = new String(name_arr);
                           } else {
                               System.err.print("ASN1Utils.gssImportName: 
Unknown OID: " + oid +
  -                                    " ('" + Integer.toHexString(oid_arr[0]) 
+ "')");
  +                                             " ('" + 
Integer.toHexString(oid_arr[0]) + "')");
                           }
                       }
                   }
  @@ -364,7 +364,7 @@
                           System.arraycopy(oid_tmp_arr, 0, oid_arr, 2, 
oid_len);
                           String oid = decodeOID(oid_arr);
                           if (oid.equals(GSSUPMechOID.value.substring(4))) {
  -                            int len = token_len - oid_len - 4;
  +                            int len = token_len - oid_len;
                               byte[] init_tok_arr = new byte[len];
                               bais.read(init_tok_arr, 0, len);
                               Any a = codec.decode_value(init_tok_arr,
  @@ -373,7 +373,9 @@
                               if (token != null) {
                                   gssup_tok.username = token.username;
                                   gssup_tok.password = token.password;
  -                                gssup_tok.target_name = token.target_name;
  +                                gssup_tok.target_name = 
decodeGSSExportName(token.target_name).getBytes("UTF-8");
  +
  +                                result = true;
                               }
                           }
                       }
  
  
  

Reply via email to