You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by dr...@apache.org on 2015/01/25 06:26:17 UTC

[3/4] directory-kerberos git commit: Removed the ASN1 parsers included in not-commons-ssl library using kerby-asn1

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1Set.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1Set.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1Set.java
deleted file mode 100644
index 549fc57..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1Set.java
+++ /dev/null
@@ -1,281 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Vector;
-
-abstract public class ASN1Set
-    extends ASN1Object {
-    protected Vector set = new Vector();
-
-    /**
-     * return an ASN1Set from the given object.
-     *
-     * @param obj the object we want converted.
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static ASN1Set getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof ASN1Set) {
-            return (ASN1Set) obj;
-        }
-
-        throw new IllegalArgumentException("unknown object in getInstance");
-    }
-
-    /**
-     * Return an ASN1 set from a tagged object. There is a special
-     * case here, if an object appears to have been explicitly tagged on
-     * reading but we were expecting it to be implictly tagged in the
-     * normal course of events it indicates that we lost the surrounding
-     * set - so we need to add it back (this will happen if the tagged
-     * object is a sequence that contains other sequences). If you are
-     * dealing with implicitly tagged sets you really <b>should</b>
-     * be using this method.
-     *
-     * @param obj      the tagged object.
-     * @param explicit true if the object is meant to be explicitly tagged
-     *                 false otherwise.
-     * @throws IllegalArgumentException if the tagged object cannot
-     *                                  be converted.
-     */
-    public static ASN1Set getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        if (explicit) {
-            if (!obj.isExplicit()) {
-                throw new IllegalArgumentException("object implicit - explicit expected.");
-            }
-
-            return (ASN1Set) obj.getObject();
-        } else {
-            //
-            // constructed object which appears to be explicitly tagged
-            // and it's really implicit means we have to add the
-            // surrounding sequence.
-            //
-            if (obj.isExplicit()) {
-                ASN1Set set = new DERSet(obj.getObject());
-
-                return set;
-            } else {
-                if (obj.getObject() instanceof ASN1Set) {
-                    return (ASN1Set) obj.getObject();
-                }
-
-                //
-                // in this case the parser returns a sequence, convert it
-                // into a set.
-                //
-                ASN1EncodableVector v = new ASN1EncodableVector();
-
-                if (obj.getObject() instanceof ASN1Sequence) {
-                    ASN1Sequence s = (ASN1Sequence) obj.getObject();
-                    Enumeration e = s.getObjects();
-
-                    while (e.hasMoreElements()) {
-                        v.add((DEREncodable) e.nextElement());
-                    }
-
-                    return new DERSet(v, false);
-                }
-            }
-        }
-
-        throw new IllegalArgumentException(
-            "unknown object in getInstanceFromTagged");
-    }
-
-    public ASN1Set() {
-    }
-
-    public Enumeration getObjects() {
-        return set.elements();
-    }
-
-    /**
-     * return the object at the set postion indicated by index.
-     *
-     * @param index the set number (starting at zero) of the object
-     * @return the object at the set postion indicated by index.
-     */
-    public DEREncodable getObjectAt(
-        int index) {
-        return (DEREncodable) set.elementAt(index);
-    }
-
-    /**
-     * return the number of objects in this set.
-     *
-     * @return the number of objects in this set.
-     */
-    public int size() {
-        return set.size();
-    }
-
-    public ASN1SetParser parser() {
-        final ASN1Set outer = this;
-
-        return new ASN1SetParser() {
-            private final int max = size();
-
-            private int index;
-
-            public DEREncodable readObject() throws IOException {
-                if (index == max) {
-                    return null;
-                }
-
-                DEREncodable obj = getObjectAt(index++);
-                if (obj instanceof ASN1Sequence) {
-                    return ((ASN1Sequence) obj).parser();
-                }
-                if (obj instanceof ASN1Set) {
-                    return ((ASN1Set) obj).parser();
-                }
-
-                return obj;
-            }
-
-            public DERObject getDERObject() {
-                return outer;
-            }
-        };
-    }
-
-    public int hashCode() {
-        Enumeration e = this.getObjects();
-        int hashCode = 0;
-
-        while (e.hasMoreElements()) {
-            hashCode ^= e.nextElement().hashCode();
-        }
-
-        return hashCode;
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof ASN1Set)) {
-            return false;
-        }
-
-        ASN1Set other = (ASN1Set) o;
-
-        if (this.size() != other.size()) {
-            return false;
-        }
-
-        Enumeration s1 = this.getObjects();
-        Enumeration s2 = other.getObjects();
-
-        while (s1.hasMoreElements()) {
-            DERObject o1 = ((DEREncodable) s1.nextElement()).getDERObject();
-            DERObject o2 = ((DEREncodable) s2.nextElement()).getDERObject();
-
-            if (o1 == o2 || (o1 != null && o1.equals(o2))) {
-                continue;
-            }
-
-            return false;
-        }
-
-        return true;
-    }
-
-    /** return true if a <= b (arrays are assumed padded with zeros). */
-    private boolean lessThanOrEqual(
-        byte[] a,
-        byte[] b) {
-        if (a.length <= b.length) {
-            for (int i = 0; i != a.length; i++) {
-                int l = a[i] & 0xff;
-                int r = b[i] & 0xff;
-
-                if (r > l) {
-                    return true;
-                } else if (l > r) {
-                    return false;
-                }
-            }
-
-            return true;
-        } else {
-            for (int i = 0; i != b.length; i++) {
-                int l = a[i] & 0xff;
-                int r = b[i] & 0xff;
-
-                if (r > l) {
-                    return true;
-                } else if (l > r) {
-                    return false;
-                }
-            }
-
-            return false;
-        }
-    }
-
-    private byte[] getEncoded(
-        DEREncodable obj) {
-        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-        ASN1OutputStream aOut = new ASN1OutputStream(bOut);
-
-        try {
-            aOut.writeObject(obj);
-        }
-        catch (IOException e) {
-            throw new IllegalArgumentException("cannot encode object added to SET");
-        }
-
-        return bOut.toByteArray();
-    }
-
-    protected void sort() {
-        if (set.size() > 1) {
-            boolean swapped = true;
-            int lastSwap = set.size() - 1;
-
-            while (swapped) {
-                int index = 0;
-                int swapIndex = 0;
-                byte[] a = getEncoded((DEREncodable) set.elementAt(0));
-
-                swapped = false;
-
-                while (index != lastSwap) {
-                    byte[] b = getEncoded((DEREncodable) set.elementAt(index + 1));
-
-                    if (lessThanOrEqual(a, b)) {
-                        a = b;
-                    } else {
-                        Object o = set.elementAt(index);
-
-                        set.setElementAt(set.elementAt(index + 1), index);
-                        set.setElementAt(o, index + 1);
-
-                        swapped = true;
-                        swapIndex = index;
-                    }
-
-                    index++;
-                }
-
-                lastSwap = swapIndex;
-            }
-        }
-    }
-
-    protected void addObject(
-        DEREncodable obj) {
-        set.addElement(obj);
-    }
-
-    abstract void encode(DEROutputStream out)
-        throws IOException;
-
-    public String toString() {
-        return set.toString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1SetParser.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1SetParser.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1SetParser.java
deleted file mode 100644
index 00ffbd0..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1SetParser.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-public interface ASN1SetParser
-    extends DEREncodable {
-    public DEREncodable readObject()
-        throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1StreamParser.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1StreamParser.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1StreamParser.java
deleted file mode 100644
index b1cd940..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1StreamParser.java
+++ /dev/null
@@ -1,193 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayInputStream;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-
-public class ASN1StreamParser {
-    InputStream _in;
-
-    private int _limit;
-    private boolean _eofFound;
-
-    public ASN1StreamParser(
-        InputStream in) {
-        this(in, Integer.MAX_VALUE);
-    }
-
-    public ASN1StreamParser(
-        InputStream in,
-        int limit) {
-        this._in = in;
-        this._limit = limit;
-    }
-
-    public ASN1StreamParser(
-        byte[] encoding) {
-        this(new ByteArrayInputStream(encoding), encoding.length);
-    }
-
-    InputStream getParentStream() {
-        return _in;
-    }
-
-    private int readLength()
-        throws IOException {
-        int length = _in.read();
-        if (length < 0) {
-            throw new EOFException("EOF found when length expected");
-        }
-
-        if (length == 0x80) {
-            return -1;      // indefinite-length encoding
-        }
-
-        if (length > 127) {
-            int size = length & 0x7f;
-
-            if (size > 4) {
-                throw new IOException("DER length more than 4 bytes");
-            }
-
-            length = 0;
-            for (int i = 0; i < size; i++) {
-                int next = _in.read();
-
-                if (next < 0) {
-                    throw new EOFException("EOF found reading length");
-                }
-
-                length = (length << 8) + next;
-            }
-
-            if (length < 0) {
-                throw new IOException("corrupted stream - negative length found");
-            }
-
-            if (length >= _limit)   // after all we must have read at least 1 byte
-            {
-                throw new IOException("corrupted stream - out of bounds length found");
-            }
-        }
-
-        return length;
-    }
-
-    public DEREncodable readObject()
-        throws IOException {
-        int tag = _in.read();
-        if (tag == -1) {
-            if (_eofFound) {
-                throw new EOFException("attempt to read past end of file.");
-            }
-
-            _eofFound = true;
-
-            return null;
-        }
-
-        //
-        // turn of looking for "00" while we resolve the tag
-        //
-        set00Check(false);
-
-        //
-        // calculate tag number
-        //
-        int baseTagNo = tag & ~DERTags.CONSTRUCTED;
-        int tagNo = baseTagNo;
-
-        if ((tag & DERTags.TAGGED) != 0) {
-            tagNo = tag & 0x1f;
-
-            //
-            // with tagged object tag number is bottom 5 bits, or stored at the start of the content
-            //
-            if (tagNo == 0x1f) {
-                tagNo = 0;
-
-                int b = _in.read();
-
-                while ((b >= 0) && ((b & 0x80) != 0)) {
-                    tagNo |= (b & 0x7f);
-                    tagNo <<= 7;
-                    b = _in.read();
-                }
-
-                if (b < 0) {
-                    _eofFound = true;
-
-                    throw new EOFException("EOF encountered inside tag value.");
-                }
-
-                tagNo |= (b & 0x7f);
-            }
-        }
-
-        //
-        // calculate length
-        //
-        int length = readLength();
-
-        if (length < 0)  // indefinite length
-        {
-            IndefiniteLengthInputStream indIn = new IndefiniteLengthInputStream(_in);
-
-            switch (baseTagNo) {
-                case DERTags.NULL:
-                    while (indIn.read() >= 0) {
-                        // make sure we skip to end of object
-                    }
-                    return BERNull.INSTANCE;
-                case DERTags.OCTET_STRING:
-                    return new BEROctetStringParser(new ASN1ObjectParser(tag, tagNo, indIn));
-                case DERTags.SEQUENCE:
-                    return new BERSequenceParser(new ASN1ObjectParser(tag, tagNo, indIn));
-                case DERTags.SET:
-                    return new BERSetParser(new ASN1ObjectParser(tag, tagNo, indIn));
-                default:
-                    return new BERTaggedObjectParser(tag, tagNo, indIn);
-            }
-        } else {
-            DefiniteLengthInputStream defIn = new DefiniteLengthInputStream(_in, length);
-
-            switch (baseTagNo) {
-                case DERTags.INTEGER:
-                    return new DERInteger(defIn.toByteArray());
-                case DERTags.NULL:
-                    defIn.toByteArray(); // make sure we read to end of object bytes.
-                    return DERNull.INSTANCE;
-                case DERTags.OBJECT_IDENTIFIER:
-                    return new DERObjectIdentifier(defIn.toByteArray());
-                case DERTags.OCTET_STRING:
-                    return new DEROctetString(defIn.toByteArray());
-                case DERTags.SEQUENCE:
-                    return new DERSequence(loadVector(defIn, length)).parser();
-                case DERTags.SET:
-                    return new DERSet(loadVector(defIn, length)).parser();
-                default:
-                    return new BERTaggedObjectParser(tag, tagNo, defIn);
-            }
-        }
-    }
-
-    private void set00Check(boolean enabled) {
-        if (_in instanceof IndefiniteLengthInputStream) {
-            ((IndefiniteLengthInputStream) _in).setEofOn00(enabled);
-        }
-    }
-
-    private ASN1EncodableVector loadVector(InputStream in, int length)
-        throws IOException {
-        ASN1InputStream aIn = new ASN1InputStream(in, length);
-        ASN1EncodableVector v = new ASN1EncodableVector();
-
-        DERObject obj;
-        while ((obj = aIn.readObject()) != null) {
-            v.add(obj);
-        }
-
-        return v;
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1TaggedObject.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1TaggedObject.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1TaggedObject.java
deleted file mode 100644
index 063569b..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1TaggedObject.java
+++ /dev/null
@@ -1,177 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/**
- * ASN.1 TaggedObject - in ASN.1 nottation this is any object proceeded by
- * a [n] where n is some number - these are assume to follow the construction
- * rules (as with sequences).
- */
-public abstract class ASN1TaggedObject
-    extends ASN1Object
-    implements ASN1TaggedObjectParser {
-    int tagNo;
-    boolean empty = false;
-    boolean explicit = true;
-    DEREncodable obj = null;
-
-    static public ASN1TaggedObject getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        if (explicit) {
-            return (ASN1TaggedObject) obj.getObject();
-        }
-
-        throw new IllegalArgumentException("implicitly tagged tagged object");
-    }
-
-    static public ASN1TaggedObject getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof ASN1TaggedObject) {
-            return (ASN1TaggedObject) obj;
-        }
-
-        throw new IllegalArgumentException("unknown object in getInstance");
-    }
-
-    /**
-     * Create a tagged object in the explicit style.
-     *
-     * @param tagNo the tag number for this object.
-     * @param obj   the tagged object.
-     */
-    public ASN1TaggedObject(
-        int tagNo,
-        DEREncodable obj) {
-        this.explicit = true;
-        this.tagNo = tagNo;
-        this.obj = obj;
-    }
-
-    /**
-     * Create a tagged object with the style given by the value of explicit.
-     * <p>
-     * If the object implements ASN1Choice the tag style will always be changed
-     * to explicit in accordance with the ASN.1 encoding rules.
-     * </p>
-     *
-     * @param explicit true if the object is explicitly tagged.
-     * @param tagNo    the tag number for this object.
-     * @param obj      the tagged object.
-     */
-    public ASN1TaggedObject(
-        boolean explicit,
-        int tagNo,
-        DEREncodable obj) {
-        if (obj instanceof ASN1Choice) {
-            this.explicit = true;
-        } else {
-            this.explicit = explicit;
-        }
-
-        this.tagNo = tagNo;
-        this.obj = obj;
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof ASN1TaggedObject)) {
-            return false;
-        }
-
-        ASN1TaggedObject other = (ASN1TaggedObject) o;
-
-        if (tagNo != other.tagNo || empty != other.empty || explicit != other.explicit) {
-            return false;
-        }
-
-        if (obj == null) {
-            if (other.obj != null) {
-                return false;
-            }
-        } else {
-            if (!(obj.getDERObject().equals(other.obj.getDERObject()))) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    public int hashCode() {
-        int code = tagNo;
-
-        if (obj != null) {
-            code ^= obj.hashCode();
-        }
-
-        return code;
-    }
-
-    public int getTagNo() {
-        return tagNo;
-    }
-
-    /**
-     * return whether or not the object may be explicitly tagged.
-     * <p/>
-     * Note: if the object has been read from an input stream, the only
-     * time you can be sure if isExplicit is returning the true state of
-     * affairs is if it returns false. An implicitly tagged object may appear
-     * to be explicitly tagged, so you need to understand the context under
-     * which the reading was done as well, see getObject below.
-     */
-    public boolean isExplicit() {
-        return explicit;
-    }
-
-    public boolean isEmpty() {
-        return empty;
-    }
-
-    /**
-     * return whatever was following the tag.
-     * <p/>
-     * Note: tagged objects are generally context dependent if you're
-     * trying to extract a tagged object you should be going via the
-     * appropriate getInstance method.
-     */
-    public DERObject getObject() {
-        if (obj != null) {
-            return obj.getDERObject();
-        }
-
-        return null;
-    }
-
-    /**
-     * Return the object held in this tagged object as a parser assuming it has
-     * the type of the passed in tag. If the object doesn't have a parser
-     * associated with it, the base object is returned.
-     */
-    public DEREncodable getObjectParser(
-        int tag,
-        boolean isExplicit) {
-        switch (tag) {
-            case DERTags.SET:
-                return ASN1Set.getInstance(this, isExplicit).parser();
-            case DERTags.SEQUENCE:
-                return ASN1Sequence.getInstance(this, isExplicit).parser();
-            case DERTags.OCTET_STRING:
-                return ASN1OctetString.getInstance(this, isExplicit).parser();
-        }
-
-        if (isExplicit) {
-            return getObject();
-        }
-
-        throw new RuntimeException("implicit tagging not implemented for tag: " + tag);
-    }
-
-    abstract void encode(DEROutputStream out)
-        throws IOException;
-
-    public String toString() {
-        return "[" + tagNo + "]" + obj;
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1TaggedObjectParser.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1TaggedObjectParser.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1TaggedObjectParser.java
deleted file mode 100644
index 7d24c6d..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ASN1TaggedObjectParser.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-public interface ASN1TaggedObjectParser
-    extends DEREncodable {
-    public int getTagNo();
-
-    public DEREncodable getObjectParser(int tag, boolean isExplicit)
-        throws IOException;
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERConstructedOctetString.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERConstructedOctetString.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERConstructedOctetString.java
deleted file mode 100644
index 750de3b..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERConstructedOctetString.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-import java.util.Vector;
-
-public class BERConstructedOctetString
-    extends DEROctetString {
-    private static final int MAX_LENGTH = 1000;
-
-    /** convert a vector of octet strings into a single byte string */
-    static private byte[] toBytes(
-        Vector octs) {
-        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-
-        for (int i = 0; i != octs.size(); i++) {
-            try {
-                DEROctetString o = (DEROctetString) octs.elementAt(i);
-
-                bOut.write(o.getOctets());
-            }
-            catch (ClassCastException e) {
-                throw new IllegalArgumentException(octs.elementAt(i).getClass().getName() + " found in input should only contain DEROctetString");
-            }
-            catch (IOException e) {
-                throw new IllegalArgumentException("exception converting octets " + e.toString());
-            }
-        }
-
-        return bOut.toByteArray();
-    }
-
-    private Vector octs;
-
-    /** @param string the octets making up the octet string. */
-    public BERConstructedOctetString(
-        byte[] string) {
-        super(string);
-    }
-
-    public BERConstructedOctetString(
-        Vector octs) {
-        super(toBytes(octs));
-
-        this.octs = octs;
-    }
-
-    public BERConstructedOctetString(
-        DERObject obj) {
-        super(obj);
-    }
-
-    public BERConstructedOctetString(
-        DEREncodable obj) {
-        super(obj.getDERObject());
-    }
-
-    public byte[] getOctets() {
-        return string;
-    }
-
-    /** return the DER octets that make up this string. */
-    public Enumeration getObjects() {
-        if (octs == null) {
-            return generateOcts().elements();
-        }
-
-        return octs.elements();
-    }
-
-    private Vector generateOcts() {
-        int start = 0;
-        int end = 0;
-        Vector vec = new Vector();
-
-        while ((end + 1) < string.length) {
-            if (string[end] == 0 && string[end + 1] == 0) {
-                byte[] nStr = new byte[end - start + 1];
-
-                System.arraycopy(string, start, nStr, 0, nStr.length);
-
-                vec.addElement(new DEROctetString(nStr));
-                start = end + 1;
-            }
-            end++;
-        }
-
-        byte[] nStr = new byte[string.length - start];
-
-        System.arraycopy(string, start, nStr, 0, nStr.length);
-
-        vec.addElement(new DEROctetString(nStr));
-
-        return vec;
-    }
-
-    public void encode(
-        DEROutputStream out)
-        throws IOException {
-        if (out instanceof ASN1OutputStream || out instanceof BEROutputStream) {
-            out.write(CONSTRUCTED | OCTET_STRING);
-
-            out.write(0x80);
-
-            //
-            // write out the octet array
-            //
-            if (octs != null) {
-                for (int i = 0; i != octs.size(); i++) {
-                    out.writeObject(octs.elementAt(i));
-                }
-            } else {
-                for (int i = 0; i < string.length; i += MAX_LENGTH) {
-                    int end;
-
-                    if (i + MAX_LENGTH > string.length) {
-                        end = string.length;
-                    } else {
-                        end = i + MAX_LENGTH;
-                    }
-
-                    byte[] nStr = new byte[end - i];
-
-                    System.arraycopy(string, i, nStr, 0, nStr.length);
-
-                    out.writeObject(new DEROctetString(nStr));
-                }
-            }
-
-            out.write(0x00);
-            out.write(0x00);
-        } else {
-            super.encode(out);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERConstructedSequence.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERConstructedSequence.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERConstructedSequence.java
deleted file mode 100644
index 5cccfb6..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERConstructedSequence.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.util.Enumeration;
-
-/** @deprecated use BERSequence */
-public class BERConstructedSequence
-    extends DERConstructedSequence {
-    /*
-     */
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        if (out instanceof ASN1OutputStream || out instanceof BEROutputStream) {
-            out.write(SEQUENCE | CONSTRUCTED);
-            out.write(0x80);
-
-            Enumeration e = getObjects();
-            while (e.hasMoreElements()) {
-                out.writeObject(e.nextElement());
-            }
-
-            out.write(0x00);
-            out.write(0x00);
-        } else {
-            super.encode(out);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERGenerator.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERGenerator.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERGenerator.java
deleted file mode 100644
index a81859b..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERGenerator.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public class BERGenerator
-    extends ASN1Generator {
-    private boolean _tagged = false;
-    private boolean _isExplicit;
-    private int _tagNo;
-
-    protected BERGenerator(
-        OutputStream out) {
-        super(out);
-    }
-
-    public BERGenerator(
-        OutputStream out,
-        int tagNo,
-        boolean isExplicit) {
-        super(out);
-
-        _tagged = true;
-        _isExplicit = isExplicit;
-        _tagNo = tagNo;
-    }
-
-    public OutputStream getRawOutputStream() {
-        return _out;
-    }
-
-    private void writeHdr(
-        int tag)
-        throws IOException {
-        _out.write(tag);
-        _out.write(0x80);
-    }
-
-    protected void writeBERHeader(
-        int tag)
-        throws IOException {
-        if (_tagged) {
-            int tagNum = _tagNo | DERTags.TAGGED;
-
-            if (_isExplicit) {
-                writeHdr(tagNum | DERTags.CONSTRUCTED);
-                writeHdr(tag);
-            } else {
-                if ((tag & DERTags.CONSTRUCTED) != 0) {
-                    writeHdr(tagNum | DERTags.CONSTRUCTED);
-                } else {
-                    writeHdr(tagNum);
-                }
-            }
-        } else {
-            writeHdr(tag);
-        }
-    }
-
-    protected void writeBERBody(
-        InputStream contentStream)
-        throws IOException {
-        int ch;
-
-        while ((ch = contentStream.read()) >= 0) {
-            _out.write(ch);
-        }
-    }
-
-    protected void writeBEREnd()
-        throws IOException {
-        _out.write(0x00);
-        _out.write(0x00);
-
-        if (_tagged && _isExplicit)  // write extra end for tag header
-        {
-            _out.write(0x00);
-            _out.write(0x00);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERInputStream.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERInputStream.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERInputStream.java
deleted file mode 100644
index 403b2ce..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERInputStream.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Vector;
-
-/** @deprecated use ASN1InputStream */
-public class BERInputStream
-    extends DERInputStream {
-    private static final DERObject END_OF_STREAM = new DERObject() {
-        void encode(
-            DEROutputStream out)
-            throws IOException {
-            throw new IOException("Eeek!");
-        }
-        public int hashCode() {
-            return 0;
-        }
-        public boolean equals(
-            Object o) {
-            return o == this;
-        }
-    };
-    public BERInputStream(
-        InputStream is) {
-        super(is);
-    }
-
-    /** read a string of bytes representing an indefinite length object. */
-    private byte[] readIndefiniteLengthFully()
-        throws IOException {
-        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-        int b, b1;
-
-        b1 = read();
-
-        while ((b = read()) >= 0) {
-            if (b1 == 0 && b == 0) {
-                break;
-            }
-
-            bOut.write(b1);
-            b1 = b;
-        }
-
-        return bOut.toByteArray();
-    }
-
-    private BERConstructedOctetString buildConstructedOctetString()
-        throws IOException {
-        Vector octs = new Vector();
-
-        for (; ;) {
-            DERObject o = readObject();
-
-            if (o == END_OF_STREAM) {
-                break;
-            }
-
-            octs.addElement(o);
-        }
-
-        return new BERConstructedOctetString(octs);
-    }
-
-    public DERObject readObject()
-        throws IOException {
-        int tag = read();
-        if (tag == -1) {
-            throw new EOFException();
-        }
-
-        int length = readLength();
-
-        if (length < 0)    // indefinite length method
-        {
-            switch (tag) {
-                case NULL:
-                    return null;
-                case SEQUENCE | CONSTRUCTED:
-                    BERConstructedSequence seq = new BERConstructedSequence();
-
-                    for (; ;) {
-                        DERObject obj = readObject();
-
-                        if (obj == END_OF_STREAM) {
-                            break;
-                        }
-
-                        seq.addObject(obj);
-                    }
-                    return seq;
-                case OCTET_STRING | CONSTRUCTED:
-                    return buildConstructedOctetString();
-                case SET | CONSTRUCTED:
-                    ASN1EncodableVector v = new ASN1EncodableVector();
-
-                    for (; ;) {
-                        DERObject obj = readObject();
-
-                        if (obj == END_OF_STREAM) {
-                            break;
-                        }
-
-                        v.add(obj);
-                    }
-                    return new BERSet(v);
-                default:
-                    //
-                    // with tagged object tag number is bottom 5 bits
-                    //
-                    if ((tag & TAGGED) != 0) {
-                        if ((tag & 0x1f) == 0x1f) {
-                            throw new IOException("unsupported high tag encountered");
-                        }
-
-                        //
-                        // simple type - implicit... return an octet string
-                        //
-                        if ((tag & CONSTRUCTED) == 0) {
-                            byte[] bytes = readIndefiniteLengthFully();
-
-                            return new BERTaggedObject(false, tag & 0x1f, new DEROctetString(bytes));
-                        }
-
-                        //
-                        // either constructed or explicitly tagged
-                        //
-                        DERObject dObj = readObject();
-
-                        if (dObj == END_OF_STREAM)     // empty tag!
-                        {
-                            return new DERTaggedObject(tag & 0x1f);
-                        }
-
-                        DERObject next = readObject();
-
-                        //
-                        // explicitly tagged (probably!) - if it isn't we'd have to
-                        // tell from the context
-                        //
-                        if (next == END_OF_STREAM) {
-                            return new BERTaggedObject(tag & 0x1f, dObj);
-                        }
-
-                        //
-                        // another implicit object, we'll create a sequence...
-                        //
-                        seq = new BERConstructedSequence();
-
-                        seq.addObject(dObj);
-
-                        do {
-                            seq.addObject(next);
-                            next = readObject();
-                        }
-                        while (next != END_OF_STREAM);
-
-                        return new BERTaggedObject(false, tag & 0x1f, seq);
-                    }
-
-                    throw new IOException("unknown BER object encountered");
-            }
-        } else {
-            if (tag == 0 && length == 0)    // end of contents marker.
-            {
-                return END_OF_STREAM;
-            }
-
-            byte[] bytes = new byte[length];
-
-            readFully(bytes);
-
-            return buildObject(tag, bytes);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERNull.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERNull.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERNull.java
deleted file mode 100644
index e5c1626..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERNull.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/** A BER NULL object. */
-public class BERNull
-    extends DERNull {
-    public static final BERNull INSTANCE = new BERNull();
-
-    public BERNull() {
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        if (out instanceof ASN1OutputStream || out instanceof BEROutputStream) {
-            out.write(NULL);
-        } else {
-            super.encode(out);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROctetStringGenerator.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROctetStringGenerator.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROctetStringGenerator.java
deleted file mode 100644
index b21fade..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROctetStringGenerator.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class BEROctetStringGenerator
-    extends BERGenerator {
-    public BEROctetStringGenerator(OutputStream out)
-        throws IOException {
-        super(out);
-
-        writeBERHeader(DERTags.CONSTRUCTED | DERTags.OCTET_STRING);
-    }
-
-    public BEROctetStringGenerator(
-        OutputStream out,
-        int tagNo,
-        boolean isExplicit)
-        throws IOException {
-        super(out, tagNo, isExplicit);
-
-        writeBERHeader(DERTags.CONSTRUCTED | DERTags.OCTET_STRING);
-    }
-
-    public OutputStream getOctetOutputStream() {
-        return getOctetOutputStream(new byte[1000]); // limit for CER encoding.
-    }
-
-    public OutputStream getOctetOutputStream(
-        byte[] buf) {
-        return new BufferedBEROctetStream(buf);
-    }
-
-    private class BufferedBEROctetStream
-        extends OutputStream {
-        private byte[] _buf;
-        private int _off;
-
-        BufferedBEROctetStream(
-            byte[] buf) {
-            _buf = buf;
-            _off = 0;
-        }
-
-        public void write(
-            int b)
-            throws IOException {
-            _buf[_off++] = (byte) b;
-
-            if (_off == _buf.length) {
-                _out.write(new DEROctetString(_buf).getEncoded());
-                _off = 0;
-            }
-        }
-
-        public void write(byte[] b, int off, int len) throws IOException {
-            while (len > 0) {
-                int numToCopy = Math.min(len, _buf.length - _off);
-                System.arraycopy(b, off, _buf, _off, numToCopy);
-
-                _off += numToCopy;
-                if (_off < _buf.length) {
-                    break;
-                }
-
-                _out.write(new DEROctetString(_buf).getEncoded());
-                _off = 0;
-
-                off += numToCopy;
-                len -= numToCopy;
-            }
-        }
-
-        public void close()
-            throws IOException {
-            if (_off != 0) {
-                byte[] bytes = new byte[_off];
-                System.arraycopy(_buf, 0, bytes, 0, _off);
-
-                _out.write(new DEROctetString(bytes).getEncoded());
-            }
-
-            writeBEREnd();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROctetStringParser.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROctetStringParser.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROctetStringParser.java
deleted file mode 100644
index 2123c2b..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROctetStringParser.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-public class BEROctetStringParser
-    implements ASN1OctetStringParser {
-    private ASN1ObjectParser _parser;
-
-    protected BEROctetStringParser(
-        ASN1ObjectParser parser) {
-        _parser = parser;
-    }
-
-    public InputStream getOctetStream() {
-        return new ConstructedOctetStream(_parser);
-    }
-
-    public DERObject getDERObject() {
-        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-        InputStream in = this.getOctetStream();
-        int ch;
-
-        try {
-            while ((ch = in.read()) >= 0) {
-                bOut.write(ch);
-            }
-        }
-        catch (IOException e) {
-            throw new IllegalStateException("IOException converting stream to byte array: " + e.getMessage());
-        }
-
-        return new BERConstructedOctetString(bOut.toByteArray());
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROutputStream.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROutputStream.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROutputStream.java
deleted file mode 100644
index 36f99ee..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BEROutputStream.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class BEROutputStream
-    extends DEROutputStream {
-    public BEROutputStream(
-        OutputStream os) {
-        super(os);
-    }
-
-    public void writeObject(
-        Object obj)
-        throws IOException {
-        if (obj == null) {
-            writeNull();
-        } else if (obj instanceof DERObject) {
-            ((DERObject) obj).encode(this);
-        } else if (obj instanceof DEREncodable) {
-            ((DEREncodable) obj).getDERObject().encode(this);
-        } else {
-            throw new IOException("object not BEREncodable");
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequence.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequence.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequence.java
deleted file mode 100644
index cc7667e..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequence.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.util.Enumeration;
-
-public class BERSequence
-    extends DERSequence {
-    /** create an empty sequence */
-    public BERSequence() {
-    }
-
-    /** create a sequence containing one object */
-    public BERSequence(
-        DEREncodable obj) {
-        super(obj);
-    }
-
-    /** create a sequence containing a vector of objects. */
-    public BERSequence(
-        DEREncodableVector v) {
-        super(v);
-    }
-
-    /*
-     */
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        if (out instanceof ASN1OutputStream || out instanceof BEROutputStream) {
-            out.write(SEQUENCE | CONSTRUCTED);
-            out.write(0x80);
-
-            Enumeration e = getObjects();
-            while (e.hasMoreElements()) {
-                out.writeObject(e.nextElement());
-            }
-
-            out.write(0x00);
-            out.write(0x00);
-        } else {
-            super.encode(out);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequenceGenerator.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequenceGenerator.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequenceGenerator.java
deleted file mode 100644
index 0e821ce..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequenceGenerator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class BERSequenceGenerator
-    extends BERGenerator {
-    public BERSequenceGenerator(
-        OutputStream out)
-        throws IOException {
-        super(out);
-
-        writeBERHeader(DERTags.CONSTRUCTED | DERTags.SEQUENCE);
-    }
-
-    public BERSequenceGenerator(
-        OutputStream out,
-        int tagNo,
-        boolean isExplicit)
-        throws IOException {
-        super(out, tagNo, isExplicit);
-
-        writeBERHeader(DERTags.CONSTRUCTED | DERTags.SEQUENCE);
-    }
-
-    public void addObject(
-        DEREncodable object)
-        throws IOException {
-        object.getDERObject().encode(new DEROutputStream(_out));
-    }
-
-    public void close()
-        throws IOException {
-        writeBEREnd();
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequenceParser.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequenceParser.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequenceParser.java
deleted file mode 100644
index fb7dad3..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSequenceParser.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-public class BERSequenceParser
-    implements ASN1SequenceParser {
-    private ASN1ObjectParser _parser;
-
-    BERSequenceParser(ASN1ObjectParser parser) {
-        this._parser = parser;
-    }
-
-    public DEREncodable readObject()
-        throws IOException {
-        return _parser.readObject();
-    }
-
-    public DERObject getDERObject() {
-        return new BERSequence(_parser.readVector());
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSet.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSet.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSet.java
deleted file mode 100644
index db80cf4..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSet.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.util.Enumeration;
-
-public class BERSet
-    extends DERSet {
-    /** create an empty sequence */
-    public BERSet() {
-    }
-
-    /** create a set containing one object */
-    public BERSet(
-        DEREncodable obj) {
-        super(obj);
-    }
-
-    /** @param v - a vector of objects making up the set. */
-    public BERSet(
-        DEREncodableVector v) {
-        super(v, false);
-    }
-
-    /** @param v - a vector of objects making up the set. */
-    BERSet(
-        DEREncodableVector v,
-        boolean needsSorting) {
-        super(v, needsSorting);
-    }
-
-    /*
-     */
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        if (out instanceof ASN1OutputStream || out instanceof BEROutputStream) {
-            out.write(SET | CONSTRUCTED);
-            out.write(0x80);
-
-            Enumeration e = getObjects();
-            while (e.hasMoreElements()) {
-                out.writeObject(e.nextElement());
-            }
-
-            out.write(0x00);
-            out.write(0x00);
-        } else {
-            super.encode(out);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSetParser.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSetParser.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSetParser.java
deleted file mode 100644
index 7f88189..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERSetParser.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-public class BERSetParser
-    implements ASN1SetParser {
-    private ASN1ObjectParser _parser;
-
-    BERSetParser(ASN1ObjectParser parser) {
-        this._parser = parser;
-    }
-
-    public DEREncodable readObject()
-        throws IOException {
-        return _parser.readObject();
-    }
-
-    public DERObject getDERObject() {
-        return new BERSet(_parser.readVector());
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERTaggedObject.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERTaggedObject.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERTaggedObject.java
deleted file mode 100644
index c0be868..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERTaggedObject.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.util.Enumeration;
-
-/**
- * BER TaggedObject - in ASN.1 nottation this is any object proceeded by
- * a [n] where n is some number - these are assume to follow the construction
- * rules (as with sequences).
- */
-public class BERTaggedObject
-    extends DERTaggedObject {
-    /**
-     * @param tagNo the tag number for this object.
-     * @param obj   the tagged object.
-     */
-    public BERTaggedObject(
-        int tagNo,
-        DEREncodable obj) {
-        super(tagNo, obj);
-    }
-
-    /**
-     * @param explicit true if an explicitly tagged object.
-     * @param tagNo    the tag number for this object.
-     * @param obj      the tagged object.
-     */
-    public BERTaggedObject(
-        boolean explicit,
-        int tagNo,
-        DEREncodable obj) {
-        super(explicit, tagNo, obj);
-    }
-
-    /**
-     * create an implicitly tagged object that contains a zero
-     * length sequence.
-     */
-    public BERTaggedObject(
-        int tagNo) {
-        super(false, tagNo, new BERSequence());
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        if (out instanceof ASN1OutputStream || out instanceof BEROutputStream) {
-            out.write(CONSTRUCTED | TAGGED | tagNo);
-            out.write(0x80);
-
-            if (!empty) {
-                if (!explicit) {
-                    if (obj instanceof ASN1OctetString) {
-                        Enumeration e;
-
-                        if (obj instanceof BERConstructedOctetString) {
-                            e = ((BERConstructedOctetString) obj).getObjects();
-                        } else {
-                            ASN1OctetString octs = (ASN1OctetString) obj;
-                            BERConstructedOctetString berO = new BERConstructedOctetString(octs.getOctets());
-
-                            e = berO.getObjects();
-                        }
-
-                        while (e.hasMoreElements()) {
-                            out.writeObject(e.nextElement());
-                        }
-                    } else if (obj instanceof ASN1Sequence) {
-                        Enumeration e = ((ASN1Sequence) obj).getObjects();
-
-                        while (e.hasMoreElements()) {
-                            out.writeObject(e.nextElement());
-                        }
-                    } else if (obj instanceof ASN1Set) {
-                        Enumeration e = ((ASN1Set) obj).getObjects();
-
-                        while (e.hasMoreElements()) {
-                            out.writeObject(e.nextElement());
-                        }
-                    } else {
-                        throw new RuntimeException("not implemented: " + obj.getClass().getName());
-                    }
-                } else {
-                    out.writeObject(obj);
-                }
-            }
-
-            out.write(0x00);
-            out.write(0x00);
-        } else {
-            super.encode(out);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERTaggedObjectParser.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERTaggedObjectParser.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERTaggedObjectParser.java
deleted file mode 100644
index 0f45cdb..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/BERTaggedObjectParser.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-public class BERTaggedObjectParser
-    implements ASN1TaggedObjectParser {
-    private int _baseTag;
-    private int _tagNumber;
-    private InputStream _contentStream;
-
-    private boolean _indefiniteLength;
-
-    protected BERTaggedObjectParser(
-        int baseTag,
-        int tagNumber,
-        InputStream contentStream) {
-        _baseTag = baseTag;
-        _tagNumber = tagNumber;
-        _contentStream = contentStream;
-        _indefiniteLength = contentStream instanceof IndefiniteLengthInputStream;
-    }
-
-    public boolean isConstructed() {
-        return (_baseTag & DERTags.CONSTRUCTED) != 0;
-    }
-
-    public int getTagNo() {
-        return _tagNumber;
-    }
-
-    public DEREncodable getObjectParser(
-        int tag,
-        boolean isExplicit)
-        throws IOException {
-        if (isExplicit) {
-            return new ASN1StreamParser(_contentStream).readObject();
-        } else {
-            switch (tag) {
-                case DERTags.SET:
-                    if (_indefiniteLength) {
-                        return new BERSetParser(new ASN1ObjectParser(_baseTag, _tagNumber, _contentStream));
-                    } else {
-                        return new DERSet(loadVector(_contentStream)).parser();
-                    }
-                case DERTags.SEQUENCE:
-                    if (_indefiniteLength) {
-                        return new BERSequenceParser(new ASN1ObjectParser(_baseTag, _tagNumber, _contentStream));
-                    } else {
-                        return new DERSequence(loadVector(_contentStream)).parser();
-                    }
-                case DERTags.OCTET_STRING:
-                    if (_indefiniteLength || this.isConstructed()) {
-                        return new BEROctetStringParser(new ASN1ObjectParser(_baseTag, _tagNumber, _contentStream));
-                    } else {
-                        return new DEROctetString(((DefiniteLengthInputStream) _contentStream).toByteArray()).parser();
-                    }
-            }
-        }
-
-        throw new RuntimeException("implicit tagging not implemented");
-    }
-
-    private ASN1EncodableVector loadVector(InputStream in)
-        throws IOException {
-        ASN1StreamParser aIn = new ASN1StreamParser(in);
-        ASN1EncodableVector v = new ASN1EncodableVector();
-        DEREncodable obj = aIn.readObject();
-
-        while (obj != null) {
-            v.add(obj.getDERObject());
-            obj = aIn.readObject();
-        }
-
-        return v;
-    }
-
-    private ASN1EncodableVector rLoadVector(InputStream in) {
-        try {
-            return loadVector(in);
-        }
-        catch (IOException e) {
-            throw new IllegalStateException(e.getMessage());
-        }
-    }
-
-    public DERObject getDERObject() {
-        if (_indefiniteLength) {
-            ASN1EncodableVector v = rLoadVector(_contentStream);
-
-            if (v.size() > 1) {
-                return new BERTaggedObject(false, _tagNumber, new BERSequence(v));
-            } else if (v.size() == 1) {
-                return new BERTaggedObject(true, _tagNumber, v.get(0));
-            } else {
-                return new BERTaggedObject(false, _tagNumber, new BERSequence());
-            }
-        } else {
-            if (this.isConstructed()) {
-                ASN1EncodableVector v = rLoadVector(_contentStream);
-
-                if (v.size() == 1) {
-                    return new DERTaggedObject(true, _tagNumber, v.get(0));
-                }
-
-                return new DERTaggedObject(false, _tagNumber, new DERSequence(v));
-            }
-
-            try {
-                return new DERTaggedObject(false, _tagNumber, new DEROctetString(((DefiniteLengthInputStream) _contentStream).toByteArray()));
-            }
-            catch (IOException e) {
-                throw new IllegalStateException(e.getMessage());
-            }
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ConstructedOctetStream.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ConstructedOctetStream.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ConstructedOctetStream.java
deleted file mode 100644
index 18565bb..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/ConstructedOctetStream.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-class ConstructedOctetStream
-    extends InputStream {
-    private final ASN1ObjectParser _parser;
-
-    private boolean _first = true;
-    private InputStream _currentStream;
-
-    ConstructedOctetStream(
-        ASN1ObjectParser parser) {
-        _parser = parser;
-    }
-
-    public int read(byte[] b, int off, int len) throws IOException {
-        if (_currentStream == null) {
-            if (!_first) {
-                return -1;
-            }
-
-            ASN1OctetStringParser s = (ASN1OctetStringParser) _parser.readObject();
-
-            if (s == null) {
-                return -1;
-            }
-
-            _first = false;
-            _currentStream = s.getOctetStream();
-        }
-
-        int totalRead = 0;
-
-        for (; ;) {
-            int numRead = _currentStream.read(b, off + totalRead, len - totalRead);
-
-            if (numRead >= 0) {
-                totalRead += numRead;
-
-                if (totalRead == len) {
-                    return totalRead;
-                }
-            } else {
-                ASN1OctetStringParser aos = (ASN1OctetStringParser) _parser.readObject();
-
-                if (aos == null) {
-                    _currentStream = null;
-                    return totalRead < 1 ? -1 : totalRead;
-                }
-
-                _currentStream = aos.getOctetStream();
-            }
-        }
-    }
-
-    public int read()
-        throws IOException {
-        if (_currentStream == null) {
-            if (!_first) {
-                return -1;
-            }
-
-            ASN1OctetStringParser s = (ASN1OctetStringParser) _parser.readObject();
-
-            if (s == null) {
-                return -1;
-            }
-
-            _first = false;
-            _currentStream = s.getOctetStream();
-        }
-
-        for (; ;) {
-            int b = _currentStream.read();
-
-            if (b >= 0) {
-                return b;
-            }
-
-            ASN1OctetStringParser s = (ASN1OctetStringParser) _parser.readObject();
-
-            if (s == null) {
-                _currentStream = null;
-                return -1;
-            }
-
-            _currentStream = s.getOctetStream();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERApplicationSpecific.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERApplicationSpecific.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERApplicationSpecific.java
deleted file mode 100644
index 1396f91..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERApplicationSpecific.java
+++ /dev/null
@@ -1,143 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-/** Base class for an application specific object */
-public class DERApplicationSpecific
-    extends ASN1Object {
-    private int tag;
-    private byte[] octets;
-
-    public DERApplicationSpecific(
-        int tag,
-        byte[] octets) {
-        this.tag = tag;
-        this.octets = octets;
-    }
-
-    public DERApplicationSpecific(
-        int tag,
-        DEREncodable object)
-        throws IOException {
-        this(true, tag, object);
-    }
-
-    public DERApplicationSpecific(
-        boolean explicit,
-        int tag,
-        DEREncodable object)
-        throws IOException {
-        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-        DEROutputStream dos = new DEROutputStream(bOut);
-
-        dos.writeObject(object);
-
-        byte[] data = bOut.toByteArray();
-
-        if (tag >= 0x1f) {
-            throw new IOException("unsupported tag number");
-        }
-
-        if (explicit) {
-            this.tag = tag | DERTags.CONSTRUCTED;
-            this.octets = data;
-        } else {
-            this.tag = tag;
-            int lenBytes = getLengthOfLength(data);
-            byte[] tmp = new byte[data.length - lenBytes];
-            System.arraycopy(data, lenBytes, tmp, 0, tmp.length);
-            this.octets = tmp;
-        }
-    }
-
-    private int getLengthOfLength(byte[] data) {
-        int count = 2;               // TODO: assumes only a 1 byte tag number
-
-        while ((data[count - 1] & 0x80) != 0) {
-            count++;
-        }
-
-        return count;
-    }
-
-    public boolean isConstructed() {
-        return (tag & DERTags.CONSTRUCTED) != 0;
-    }
-
-    public byte[] getContents() {
-        return octets;
-    }
-
-    public int getApplicationTag() {
-        return tag;
-    }
-
-    public DERObject getObject()
-        throws IOException {
-        return new ASN1InputStream(getContents()).readObject();
-    }
-
-    /**
-     * Return the enclosed object assuming implicit tagging.
-     *
-     * @param derTagNo the type tag that should be applied to the object's contents.
-     * @return the resulting object
-     * @throws java.io.IOException if reconstruction fails.
-     */
-    public DERObject getObject(int derTagNo)
-        throws IOException {
-        if (tag >= 0x1f) {
-            throw new IOException("unsupported tag number");
-        }
-
-        byte[] tmp = this.getEncoded();
-
-        tmp[0] = (byte) derTagNo;
-
-        return new ASN1InputStream(tmp).readObject();
-    }
-
-    /* (non-Javadoc)
-    * @see org.apache.commons.ssl.asn1.DERObject#encode(org.apache.commons.ssl.asn1.DEROutputStream)
-    */
-    void encode(DEROutputStream out) throws IOException {
-        out.writeEncoded(DERTags.APPLICATION | tag, octets);
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERApplicationSpecific)) {
-            return false;
-        }
-
-        DERApplicationSpecific other = (DERApplicationSpecific) o;
-
-        if (tag != other.tag) {
-            return false;
-        }
-
-        if (octets.length != other.octets.length) {
-            return false;
-        }
-
-        for (int i = 0; i < octets.length; i++) {
-            if (octets[i] != other.octets[i]) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    public int hashCode() {
-        byte[] b = this.getContents();
-        int value = 0;
-
-        for (int i = 0; i != b.length; i++) {
-            value ^= (b[i] & 0xff) << (i % 4);
-        }
-
-        return value ^ this.getApplicationTag();
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBMPString.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBMPString.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBMPString.java
deleted file mode 100644
index e093582..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBMPString.java
+++ /dev/null
@@ -1,104 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/** DER BMPString object. */
-public class DERBMPString
-    extends ASN1Object
-    implements DERString {
-    String string;
-
-    /**
-     * return a BMP String from the given object.
-     *
-     * @param obj the object we want converted.
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERBMPString getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERBMPString) {
-            return (DERBMPString) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERBMPString(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return a BMP String from a tagged object.
-     *
-     * @param obj      the tagged object holding the object we want
-     * @param explicit true if the object is meant to be explicitly
-     *                 tagged false otherwise.
-     * @throws IllegalArgumentException if the tagged object cannot
-     *                                  be converted.
-     */
-    public static DERBMPString getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-
-    /** basic constructor - byte encoded string. */
-    public DERBMPString(
-        byte[] string) {
-        char[] cs = new char[string.length / 2];
-
-        for (int i = 0; i != cs.length; i++) {
-            cs[i] = (char) ((string[2 * i] << 8) | (string[2 * i + 1] & 0xff));
-        }
-
-        this.string = new String(cs);
-    }
-
-    /** basic constructor */
-    public DERBMPString(
-        String string) {
-        this.string = string;
-    }
-
-    public String getString() {
-        return string;
-    }
-
-    public String toString() {
-        return string;
-    }
-
-    public int hashCode() {
-        return this.getString().hashCode();
-    }
-
-    protected boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERBMPString)) {
-            return false;
-        }
-
-        DERBMPString s = (DERBMPString) o;
-
-        return this.getString().equals(s.getString());
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        char[] c = string.toCharArray();
-        byte[] b = new byte[c.length * 2];
-
-        for (int i = 0; i != c.length; i++) {
-            b[2 * i] = (byte) (c[i] >> 8);
-            b[2 * i + 1] = (byte) c[i];
-        }
-
-        out.writeEncoded(BMP_STRING, b);
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBitString.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBitString.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBitString.java
deleted file mode 100644
index 2cb649c..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBitString.java
+++ /dev/null
@@ -1,245 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-public class DERBitString
-    extends ASN1Object
-    implements DERString {
-    private static final char[] table = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
-
-    protected byte[] data;
-    protected int padBits;
-
-    /**
-     * return the correct number of pad bits for a bit string defined in
-     * a 32 bit constant
-     */
-    static protected int getPadBits(
-        int bitString) {
-        int val = 0;
-        for (int i = 3; i >= 0; i--) {
-            //
-            // this may look a little odd, but if it isn't done like this pre jdk1.2
-            // JVM's break!
-            //
-            if (i != 0) {
-                if ((bitString >> (i * 8)) != 0) {
-                    val = (bitString >> (i * 8)) & 0xFF;
-                    break;
-                }
-            } else {
-                if (bitString != 0) {
-                    val = bitString & 0xFF;
-                    break;
-                }
-            }
-        }
-
-        if (val == 0) {
-            return 7;
-        }
-
-
-        int bits = 1;
-
-        while (((val <<= 1) & 0xFF) != 0) {
-            bits++;
-        }
-
-        return 8 - bits;
-    }
-
-    /**
-     * return the correct number of bytes for a bit string defined in
-     * a 32 bit constant
-     */
-    static protected byte[] getBytes(int bitString) {
-        int bytes = 4;
-        for (int i = 3; i >= 1; i--) {
-            if ((bitString & (0xFF << (i * 8))) != 0) {
-                break;
-            }
-            bytes--;
-        }
-
-        byte[] result = new byte[bytes];
-        for (int i = 0; i < bytes; i++) {
-            result[i] = (byte) ((bitString >> (i * 8)) & 0xFF);
-        }
-
-        return result;
-    }
-
-    /**
-     * return a Bit String from the passed in object
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERBitString getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERBitString) {
-            return (DERBitString) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            byte[] bytes = ((ASN1OctetString) obj).getOctets();
-            int padBits = bytes[0];
-            byte[] data = new byte[bytes.length - 1];
-
-            System.arraycopy(bytes, 1, data, 0, bytes.length - 1);
-
-            return new DERBitString(data, padBits);
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return a Bit String from a tagged object.
-     *
-     * @param obj      the tagged object holding the object we want
-     * @param explicit true if the object is meant to be explicitly
-     *                 tagged false otherwise.
-     * @throws IllegalArgumentException if the tagged object cannot
-     *                                  be converted.
-     */
-    public static DERBitString getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    protected DERBitString(
-        byte data,
-        int padBits) {
-        this.data = new byte[1];
-        this.data[0] = data;
-        this.padBits = padBits;
-    }
-
-    /**
-     * @param data    the octets making up the bit string.
-     * @param padBits the number of extra bits at the end of the string.
-     */
-    public DERBitString(
-        byte[] data,
-        int padBits) {
-        this.data = data;
-        this.padBits = padBits;
-    }
-
-    public DERBitString(
-        byte[] data) {
-        this(data, 0);
-    }
-
-    public DERBitString(
-        DEREncodable obj) {
-        try {
-            ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-            DEROutputStream dOut = new DEROutputStream(bOut);
-
-            dOut.writeObject(obj);
-            dOut.close();
-
-            this.data = bOut.toByteArray();
-            this.padBits = 0;
-        }
-        catch (IOException e) {
-            throw new IllegalArgumentException("Error processing object : " + e.toString());
-        }
-    }
-
-    public byte[] getBytes() {
-        return data;
-    }
-
-    public int getPadBits() {
-        return padBits;
-    }
-
-
-    /** @return the value of the bit string as an int (truncating if necessary) */
-    public int intValue() {
-        int value = 0;
-
-        for (int i = 0; i != data.length && i != 4; i++) {
-            value |= (data[i] & 0xff) << (8 * i);
-        }
-
-        return value;
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        byte[] bytes = new byte[getBytes().length + 1];
-
-        bytes[0] = (byte) getPadBits();
-        System.arraycopy(getBytes(), 0, bytes, 1, bytes.length - 1);
-
-        out.writeEncoded(BIT_STRING, bytes);
-    }
-
-    public int hashCode() {
-        int value = 0;
-
-        for (int i = 0; i != data.length; i++) {
-            value ^= (data[i] & 0xff) << (i % 4);
-        }
-
-        return value;
-    }
-
-    protected boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERBitString)) {
-            return false;
-        }
-
-        DERBitString other = (DERBitString) o;
-
-        if (data.length != other.data.length) {
-            return false;
-        }
-
-        for (int i = 0; i != data.length; i++) {
-            if (data[i] != other.data[i]) {
-                return false;
-            }
-        }
-
-        return (padBits == other.padBits);
-    }
-
-    public String getString() {
-        StringBuffer buf = new StringBuffer("#");
-        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-        ASN1OutputStream aOut = new ASN1OutputStream(bOut);
-
-        try {
-            aOut.writeObject(this);
-        }
-        catch (IOException e) {
-            throw new RuntimeException("internal error encoding BitString");
-        }
-
-        byte[] string = bOut.toByteArray();
-
-        for (int i = 0; i != string.length; i++) {
-            buf.append(table[(string[i] >>> 4) & 0xf]);
-            buf.append(table[string[i] & 0xf]);
-        }
-
-        return buf.toString();
-    }
-
-    public String toString() {
-        return getString();
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBoolean.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBoolean.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBoolean.java
deleted file mode 100644
index e49ec6c..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERBoolean.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-public class DERBoolean
-    extends ASN1Object {
-    byte value;
-
-    public static final DERBoolean FALSE = new DERBoolean(false);
-    public static final DERBoolean TRUE = new DERBoolean(true);
-
-    /**
-     * return a boolean from the passed in object.
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERBoolean getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERBoolean) {
-            return (DERBoolean) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERBoolean(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /** return a DERBoolean from the passed in boolean. */
-    public static DERBoolean getInstance(
-        boolean value) {
-        return (value ? TRUE : FALSE);
-    }
-
-    /**
-     * return a Boolean from a tagged object.
-     *
-     * @param obj      the tagged object holding the object we want
-     * @param explicit true if the object is meant to be explicitly
-     *                 tagged false otherwise.
-     * @throws IllegalArgumentException if the tagged object cannot
-     *                                  be converted.
-     */
-    public static DERBoolean getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    public DERBoolean(
-        byte[] value) {
-        this.value = value[0];
-    }
-
-    public DERBoolean(
-        boolean value) {
-        this.value = (value) ? (byte) 0xff : (byte) 0;
-    }
-
-    public boolean isTrue() {
-        return (value != 0);
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        byte[] bytes = new byte[1];
-
-        bytes[0] = value;
-
-        out.writeEncoded(BOOLEAN, bytes);
-    }
-
-    protected boolean asn1Equals(
-        DERObject o) {
-        if ((o == null) || !(o instanceof DERBoolean)) {
-            return false;
-        }
-
-        return (value == ((DERBoolean) o).value);
-    }
-
-    public int hashCode() {
-        return value;
-    }
-
-
-    public String toString() {
-        return (value != 0) ? "TRUE" : "FALSE";
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERConstructedSequence.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERConstructedSequence.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERConstructedSequence.java
deleted file mode 100644
index f7cad53..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERConstructedSequence.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-
-/** @deprecated use DERSequence. */
-public class DERConstructedSequence
-    extends ASN1Sequence {
-    public void addObject(
-        DEREncodable obj) {
-        super.addObject(obj);
-    }
-
-    public int getSize() {
-        return size();
-    }
-
-    /*
-     * A note on the implementation:
-     * <p>
-     * As DER requires the constructed, definite-length model to
-     * be used for structured types, this varies slightly from the
-     * ASN.1 descriptions given. Rather than just outputing SEQUENCE,
-     * we also have to specify CONSTRUCTED, and the objects length.
-     */
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-        DEROutputStream dOut = new DEROutputStream(bOut);
-        Enumeration e = this.getObjects();
-
-        while (e.hasMoreElements()) {
-            Object obj = e.nextElement();
-
-            dOut.writeObject(obj);
-        }
-
-        dOut.close();
-
-        byte[] bytes = bOut.toByteArray();
-
-        out.writeEncoded(SEQUENCE | CONSTRUCTED, bytes);
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERConstructedSet.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERConstructedSet.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERConstructedSet.java
deleted file mode 100644
index 50adf8e..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERConstructedSet.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-
-/** @deprecated use DERSet */
-public class DERConstructedSet
-    extends ASN1Set {
-    public DERConstructedSet() {
-    }
-
-    /** @param obj - a single object that makes up the set. */
-    public DERConstructedSet(
-        DEREncodable obj) {
-        this.addObject(obj);
-    }
-
-    /** @param v - a vector of objects making up the set. */
-    public DERConstructedSet(
-        DEREncodableVector v) {
-        for (int i = 0; i != v.size(); i++) {
-            this.addObject(v.get(i));
-        }
-    }
-
-    public void addObject(
-        DEREncodable obj) {
-        super.addObject(obj);
-    }
-
-    public int getSize() {
-        return size();
-    }
-
-    /*
-     * A note on the implementation:
-     * <p>
-     * As DER requires the constructed, definite-length model to
-     * be used for structured types, this varies slightly from the
-     * ASN.1 descriptions given. Rather than just outputing SET,
-     * we also have to specify CONSTRUCTED, and the objects length.
-     */
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-        DEROutputStream dOut = new DEROutputStream(bOut);
-        Enumeration e = this.getObjects();
-
-        while (e.hasMoreElements()) {
-            Object obj = e.nextElement();
-
-            dOut.writeObject(obj);
-        }
-
-        dOut.close();
-
-        byte[] bytes = bOut.toByteArray();
-
-        out.writeEncoded(SET | CONSTRUCTED, bytes);
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREncodable.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREncodable.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREncodable.java
deleted file mode 100644
index cbaebf9..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREncodable.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-public interface DEREncodable {
-    public DERObject getDERObject();
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREncodableVector.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREncodableVector.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREncodableVector.java
deleted file mode 100644
index d441a44..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREncodableVector.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.util.Vector;
-
-/**
- * a general class for building up a vector of DER encodable objects -
- * this will eventually be superceded by ASN1EncodableVector so you should
- * use that class in preference.
- */
-public class DEREncodableVector {
-    private Vector v = new Vector();
-
-    /** @deprecated use ASN1EncodableVector instead. */
-    public DEREncodableVector() {
-
-    }
-
-    public void add(
-        DEREncodable obj) {
-        v.addElement(obj);
-    }
-
-    public DEREncodable get(
-        int i) {
-        return (DEREncodable) v.elementAt(i);
-    }
-
-    public int size() {
-        return v.size();
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerberos/blob/5c70429d/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREnumerated.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREnumerated.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREnumerated.java
deleted file mode 100644
index faacf13..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEREnumerated.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.math.BigInteger;
-
-public class DEREnumerated
-    extends ASN1Object {
-    byte[] bytes;
-
-    /**
-     * return an integer from the passed in object
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DEREnumerated getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DEREnumerated) {
-            return (DEREnumerated) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DEREnumerated(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return an Enumerated from a tagged object.
-     *
-     * @param obj      the tagged object holding the object we want
-     * @param explicit true if the object is meant to be explicitly
-     *                 tagged false otherwise.
-     * @throws IllegalArgumentException if the tagged object cannot
-     *                                  be converted.
-     */
-    public static DEREnumerated getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    public DEREnumerated(
-        int value) {
-        bytes = BigInteger.valueOf(value).toByteArray();
-    }
-
-    public DEREnumerated(
-        BigInteger value) {
-        bytes = value.toByteArray();
-    }
-
-    public DEREnumerated(
-        byte[] bytes) {
-        this.bytes = bytes;
-    }
-
-    public BigInteger getValue() {
-        return new BigInteger(bytes);
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(ENUMERATED, bytes);
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DEREnumerated)) {
-            return false;
-        }
-
-        DEREnumerated other = (DEREnumerated) o;
-
-        if (bytes.length != other.bytes.length) {
-            return false;
-        }
-
-        for (int i = 0; i != bytes.length; i++) {
-            if (bytes[i] != other.bytes[i]) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    public int hashCode() {
-        return this.getValue().hashCode();
-    }
-}