Index: javax/security/auth/x500/X500Principal.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/security/auth/x500/X500Principal.java,v retrieving revision 1.9 diff -u -B -b -r1.9 X500Principal.java --- javax/security/auth/x500/X500Principal.java 26 Jul 2005 16:27:07 -0000 1.9 +++ javax/security/auth/x500/X500Principal.java 8 Aug 2005 02:47:01 -0000 @@ -274,7 +274,7 @@ Set rdn = new HashSet(); for (Iterator it2 = m.entrySet().iterator(); it2.hasNext(); ) { - Map.Entry e = (Map.Entry) it.next(); + Map.Entry e = (Map.Entry) it2.next(); ArrayList atav = new ArrayList(2); atav.add(new DERValue(DER.OBJECT_IDENTIFIER, e.getKey())); atav.add(new DERValue(DER.UTF8_STRING, e.getValue())); @@ -300,6 +300,8 @@ putComponent(key, value); if (sep == ',') newRelativeDistinguishedName(); + if (sep == -1) + break; } } @@ -312,7 +314,7 @@ if (ch == -1) { if (buf.length() > 0) - throw new EOFException(); + throw new EOFException("partial name read: " + buf); return null; } if (ch > 127) @@ -416,10 +418,12 @@ case ';': throw new IOException("illegal character: " + (char) ch); case -1: - throw new EOFException(); + sep = -1; + return buf.toString (); default: buf.append((char) ch); } + ch = in.read (); } } } @@ -484,6 +488,10 @@ putComponent(STREET, value); else if (name.equals("st")) putComponent(ST, value); + else if (name.equals ("o")) + putComponent (O, value); + else if (name.equals ("ou")) + putComponent (OU, value); else if (name.equals("dc")) putComponent(DC, value); else if (name.equals("uid"))