diff options
Diffstat (limited to 'libjava/classpath/gnu/java/security/x509/ext')
4 files changed, 38 insertions, 38 deletions
diff --git a/libjava/classpath/gnu/java/security/x509/ext/CertificatePolicies.java b/libjava/classpath/gnu/java/security/x509/ext/CertificatePolicies.java index c451762f8e0..874b8eeeb51 100644 --- a/libjava/classpath/gnu/java/security/x509/ext/CertificatePolicies.java +++ b/libjava/classpath/gnu/java/security/x509/ext/CertificatePolicies.java @@ -142,7 +142,7 @@ public class CertificatePolicies extends Extension.Value { return policies; } - + /** * Returns the list of policy OIDs, formatted as dotted-decimal strings. * diff --git a/libjava/classpath/gnu/java/security/x509/ext/GeneralName.java b/libjava/classpath/gnu/java/security/x509/ext/GeneralName.java index fbc05339f6d..f399de1b7e0 100644 --- a/libjava/classpath/gnu/java/security/x509/ext/GeneralName.java +++ b/libjava/classpath/gnu/java/security/x509/ext/GeneralName.java @@ -48,7 +48,7 @@ import java.util.Arrays; /** * The GeneralName structure from X.509. - * + * * <pre> GeneralName ::= CHOICE { otherName [0] OtherName, @@ -87,12 +87,12 @@ public class GeneralName registeredId (8); private int tag; - + private Kind(int tag) { this.tag = tag; } - + public static Kind forTag(final int tag) { switch (tag) @@ -107,10 +107,10 @@ public class GeneralName case 7: return iPAddress; case 8: return registeredId; } - + throw new IllegalArgumentException("invalid tag: " + tag); } - + public int tag() { return tag; @@ -120,17 +120,17 @@ public class GeneralName private final Kind kind; private final byte[] name; private final byte[] encoded; - + public GeneralName(byte[] encoded) throws IOException { DERReader reader = new DERReader(encoded); DERValue value = reader.read(); - + if (value.getTagClass() != DER.CONTEXT) throw new IOException("malformed GeneralName"); - + this.encoded = value.getEncoded(); - + kind = Kind.forTag(value.getTag()); switch (kind) { @@ -176,29 +176,29 @@ public class GeneralName name = value.getEncoded(); name[0] = DER.OBJECT_IDENTIFIER; break; - + default: name = null; // Not reached. } } - + public GeneralName(Kind kind, byte[] name) { this.kind = kind; this.name = (byte[]) name.clone(); this.encoded = null; } - + public Kind kind() { return kind; } - + public byte[] name() { return (byte[]) name.clone(); } - + public byte[] encoded() { try @@ -210,7 +210,7 @@ public class GeneralName return null; } } - + public boolean equals(Object o) { try @@ -223,7 +223,7 @@ public class GeneralName return false; } } - + public String toString() { return (super.toString() + " [ kind=" + kind + "; name=" + diff --git a/libjava/classpath/gnu/java/security/x509/ext/GeneralSubtree.java b/libjava/classpath/gnu/java/security/x509/ext/GeneralSubtree.java index 5f6ffd98701..5d688deaab2 100644 --- a/libjava/classpath/gnu/java/security/x509/ext/GeneralSubtree.java +++ b/libjava/classpath/gnu/java/security/x509/ext/GeneralSubtree.java @@ -1,4 +1,4 @@ -/* GeneralSubtree.java -- +/* GeneralSubtree.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is a part of GNU Classpath. @@ -63,20 +63,20 @@ public class GeneralSubtree private final GeneralName base; private final int minimum; private final int maximum; - + public GeneralSubtree(byte[] encoded) throws IOException { DERReader reader = new DERReader(encoded); DERValue generalSubtree = reader.read(); - + if (!generalSubtree.isConstructed()) throw new IOException("malformed GeneralSubtree"); - + DERValue generalName = reader.read(); base = new GeneralName(generalName.getEncoded()); if (generalName.isConstructed()) reader.skip(generalName.getLength()); - + int len = generalName.getEncodedLength(); if (len < generalSubtree.getLength()) { @@ -116,7 +116,7 @@ public class GeneralSubtree maximum = -1; } } - + /** * Returns the base name. * @@ -126,7 +126,7 @@ public class GeneralSubtree { return base; } - + /** * Returns the minimum base distance, possibly zero. * @@ -136,7 +136,7 @@ public class GeneralSubtree { return minimum; } - + /** * Returns the maximum base distance, or -1 if this value was not specified. * @@ -146,7 +146,7 @@ public class GeneralSubtree { return maximum; } - + public String toString() { return (GeneralSubtree.class.getName() + " [ base=" + base diff --git a/libjava/classpath/gnu/java/security/x509/ext/NameConstraints.java b/libjava/classpath/gnu/java/security/x509/ext/NameConstraints.java index 607c4296642..8f374d560ff 100644 --- a/libjava/classpath/gnu/java/security/x509/ext/NameConstraints.java +++ b/libjava/classpath/gnu/java/security/x509/ext/NameConstraints.java @@ -51,7 +51,7 @@ import java.util.List; /** * The NameConstraints extension. From RFC 3280, section 4.2.1.11, this * extension is defined as: - * + * * <pre> id-ce-nameConstraints OBJECT IDENTIFIER ::= { id-ce 30 } @@ -68,29 +68,29 @@ import java.util.List; BaseDistance ::= INTEGER (0..MAX) </pre> - * + * * See also the classes {@link GeneralNames} and {@link GeneralSubtree}. - * + * * @author csm */ public class NameConstraints extends Value { public static final OID ID = new OID("2.5.29.30"); - + private List<GeneralSubtree> permittedSubtrees; private List<GeneralSubtree> excludedSubtrees; - + public NameConstraints(byte[] encoded) throws IOException { super(encoded); - + DERReader der = new DERReader(encoded); DERValue value = der.read(); if (!value.isConstructed()) { throw new IOException("malformed NameConstraints"); } - + permittedSubtrees = new LinkedList<GeneralSubtree>(); excludedSubtrees = new LinkedList<GeneralSubtree>(); int len = 0; @@ -108,7 +108,7 @@ public class NameConstraints extends Value len2 += subtree.getEncodedLength(); } len += subtrees.getEncodedLength(); - + if (len < value.getLength()) { subtrees = der.read(); @@ -134,24 +134,24 @@ public class NameConstraints extends Value excludedSubtrees.add(new GeneralSubtree(subtree.getEncoded())); der.skip(subtree.getLength()); len2 += subtree.getEncodedLength(); - } + } } else throw new IOException("unexpected tag " + subtrees.getTag() + " (expecting 0 or 1)"); } } - + public List<GeneralSubtree> permittedSubtrees() { return Collections.unmodifiableList(permittedSubtrees); } - + public List<GeneralSubtree> excludedSubtrees() { return Collections.unmodifiableList(excludedSubtrees); } - + public String toString() { return NameConstraints.class.getName() + " [ permittedSubtrees=" |

