Imported GNU Classpath 0.90
Imported GNU Classpath 0.90 * scripts/makemake.tcl: Set gnu/java/awt/peer/swing to ignore. * gnu/classpath/jdwp/VMFrame.java (SIZE): New constant. * java/lang/VMCompiler.java: Use gnu.java.security.hash.MD5. * java/lang/Math.java: New override file. * java/lang/Character.java: Merged from Classpath. (start, end): Now 'int's. (canonicalName): New field. (CANONICAL_NAME, NO_SPACES_NAME, CONSTANT_NAME): New constants. (UnicodeBlock): Added argument. (of): New overload. (forName): New method. Updated unicode blocks. (sets): Updated. * sources.am: Regenerated. * Makefile.in: Likewise. From-SVN: r111942
This commit is contained in:
parent
27079765d0
commit
8aa540d2f7
1367 changed files with 188789 additions and 22762 deletions
|
@ -52,6 +52,8 @@ import java.util.Iterator;
|
|||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.security.auth.x500.X500Principal;
|
||||
|
||||
public class GeneralNames
|
||||
{
|
||||
|
||||
|
@ -81,12 +83,14 @@ public class GeneralNames
|
|||
if (!nameList.isConstructed())
|
||||
throw new IOException("malformed GeneralNames");
|
||||
int len = 0;
|
||||
int i = 0;
|
||||
while (len < nameList.getLength())
|
||||
{
|
||||
DERValue name = der.read();
|
||||
List namePair = new ArrayList(2);
|
||||
if (name.getTagClass() != DER.APPLICATION)
|
||||
throw new IOException("malformed GeneralName");
|
||||
int tagClass = name.getTagClass();
|
||||
if (tagClass != DER.CONTEXT)
|
||||
throw new IOException("malformed GeneralName: Tag class is " + tagClass);
|
||||
namePair.add(new Integer(name.getTag()));
|
||||
DERValue val = null;
|
||||
switch (name.getTag())
|
||||
|
@ -99,6 +103,15 @@ public class GeneralNames
|
|||
break;
|
||||
|
||||
case OTHER_NAME:
|
||||
// MUST return the encoded bytes of the OID/OctetString sequence
|
||||
byte[] anotherName = name.getEncoded();
|
||||
anotherName[0] = (byte) (DER.CONSTRUCTED|DER.SEQUENCE);
|
||||
namePair.add(anotherName);
|
||||
// DERReader goes back on Constructed things so we need to skip over them
|
||||
DERValue skip = der.read(); // skip OID
|
||||
skip = der.read(); // skip Octet String
|
||||
break;
|
||||
|
||||
case EDI_PARTY_NAME:
|
||||
namePair.add(name.getValue());
|
||||
break;
|
||||
|
@ -106,7 +119,9 @@ public class GeneralNames
|
|||
case DIRECTORY_NAME:
|
||||
byte[] b = name.getEncoded();
|
||||
b[0] = (byte) (DER.CONSTRUCTED|DER.SEQUENCE);
|
||||
namePair.add(new X500DistinguishedName(b).toString());
|
||||
DERReader r = new DERReader (b);
|
||||
r.read ();
|
||||
namePair.add(new X500Principal(r.read ().getEncoded ()).toString());
|
||||
break;
|
||||
|
||||
case IP_ADDRESS:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue