directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject [2/4] directory-kerberos git commit: Removed the ASN1 parsers included in not-commons-ssl library using kerby-asn1
Date Sun, 25 Jan 2015 05:26:16 GMT
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/DERGeneralString.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERGeneralString.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERGeneralString.java
deleted file mode 100644
index d571a1d..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERGeneralString.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-public class DERGeneralString
-    extends ASN1Object implements DERString {
-    private String string;
-
-    public static DERGeneralString getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERGeneralString) {
-            return (DERGeneralString) obj;
-        }
-        if (obj instanceof ASN1OctetString) {
-            return new DERGeneralString(((ASN1OctetString) obj).getOctets());
-        }
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-        throw new IllegalArgumentException("illegal object in getInstance: "
-                                           + obj.getClass().getName());
-    }
-
-    public static DERGeneralString getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    public DERGeneralString(byte[] string) {
-        char[] cs = new char[string.length];
-        for (int i = 0; i != cs.length; i++) {
-            cs[i] = (char) (string[i] & 0xff);
-        }
-        this.string = new String(cs);
-    }
-
-    public DERGeneralString(String string) {
-        this.string = string;
-    }
-
-    public String getString() {
-        return string;
-    }
-
-    public String toString() {
-        return string;
-    }
-
-    public byte[] getOctets() {
-        char[] cs = string.toCharArray();
-        byte[] bs = new byte[cs.length];
-        for (int i = 0; i != cs.length; i++) {
-            bs[i] = (byte) cs[i];
-        }
-        return bs;
-    }
-
-    void encode(DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(GENERAL_STRING, this.getOctets());
-    }
-
-    public int hashCode() {
-        return this.getString().hashCode();
-    }
-
-    boolean asn1Equals(DERObject o) {
-        if (!(o instanceof DERGeneralString)) {
-            return false;
-        }
-        DERGeneralString s = (DERGeneralString) o;
-        return this.getString().equals(s.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/DERGeneralizedTime.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERGeneralizedTime.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERGeneralizedTime.java
deleted file mode 100644
index 0e2de28..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERGeneralizedTime.java
+++ /dev/null
@@ -1,242 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.SimpleTimeZone;
-import java.util.TimeZone;
-
-/** Generalized time object. */
-public class DERGeneralizedTime
-    extends ASN1Object {
-    String time;
-
-    /**
-     * return a generalized time from the passed in object
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERGeneralizedTime getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERGeneralizedTime) {
-            return (DERGeneralizedTime) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERGeneralizedTime(((ASN1OctetString) obj).getOctets());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return a Generalized Time object 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 DERGeneralizedTime getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    /**
-     * The correct format for this is YYYYMMDDHHMMSS[.f]Z, or without the Z
-     * for local time, or Z+-HHMM on the end, for difference between local
-     * time and UTC time. The fractional second amount f must consist of at
-     * least one number with trailing zeroes removed.
-     *
-     * @param time the time string.
-     * @throws IllegalArgumentException if String is an illegal format.
-     */
-    public DERGeneralizedTime(
-        String time) {
-        this.time = time;
-        try {
-            this.getDate();
-        }
-        catch (ParseException e) {
-            throw new IllegalArgumentException("invalid date string: " + e.getMessage());
-        }
-    }
-
-    /** base constructer from a java.util.date object */
-    public DERGeneralizedTime(
-        Date time) {
-        SimpleDateFormat dateF = new SimpleDateFormat("yyyyMMddHHmmss'Z'");
-
-        dateF.setTimeZone(new SimpleTimeZone(0, "Z"));
-
-        this.time = dateF.format(time);
-    }
-
-    DERGeneralizedTime(
-        byte[] bytes) {
-        //
-        // explicitly convert to characters
-        //
-        char[] dateC = new char[bytes.length];
-
-        for (int i = 0; i != dateC.length; i++) {
-            dateC[i] = (char) (bytes[i] & 0xff);
-        }
-
-        this.time = new String(dateC);
-    }
-
-    /**
-     * Return the time.
-     *
-     * @return The time string as it appeared in the encoded object.
-     */
-    public String getTimeString() {
-        return time;
-    }
-
-    /**
-     * return the time - always in the form of
-     * YYYYMMDDhhmmssGMT(+hh:mm|-hh:mm).
-     * <p/>
-     * Normally in a certificate we would expect "Z" rather than "GMT",
-     * however adding the "GMT" means we can just use:
-     * <pre>
-     *     dateF = new SimpleDateFormat("yyyyMMddHHmmssz");
-     * </pre>
-     * To read in the time and get a date which is compatible with our local
-     * time zone.
-     */
-    public String getTime() {
-        //
-        // standardise the format.
-        //             
-        if (time.charAt(time.length() - 1) == 'Z') {
-            return time.substring(0, time.length() - 1) + "GMT+00:00";
-        } else {
-            int signPos = time.length() - 5;
-            char sign = time.charAt(signPos);
-            if (sign == '-' || sign == '+') {
-                return time.substring(0, signPos)
-                       + "GMT"
-                       + time.substring(signPos, signPos + 3)
-                       + ":"
-                       + time.substring(signPos + 3);
-            } else {
-                signPos = time.length() - 3;
-                sign = time.charAt(signPos);
-                if (sign == '-' || sign == '+') {
-                    return time.substring(0, signPos)
-                           + "GMT"
-                           + time.substring(signPos)
-                           + ":00";
-                }
-            }
-        }
-        return time + calculateGMTOffset();
-    }
-
-    private String calculateGMTOffset() {
-        String sign = "+";
-        TimeZone timeZone = TimeZone.getDefault();
-        int offset = timeZone.getRawOffset();
-        if (offset < 0) {
-            sign = "-";
-            offset = -offset;
-        }
-        int hours = offset / (60 * 60 * 1000);
-        int minutes = (offset - (hours * 60 * 60 * 1000)) / (60 * 1000);
-
-        try {
-            if (timeZone.useDaylightTime() && timeZone.inDaylightTime(this.getDate())) {
-                hours += sign.equals("+") ? 1 : -1;
-            }
-        }
-        catch (ParseException e) {
-            // we'll do our best and ignore daylight savings
-        }
-
-        return "GMT" + sign + convert(hours) + ":" + convert(minutes);
-    }
-
-    private String convert(int time) {
-        if (time < 10) {
-            return "0" + time;
-        }
-
-        return Integer.toString(time);
-    }
-
-    public Date getDate()
-        throws ParseException {
-        SimpleDateFormat dateF;
-        String d = time;
-
-        if (time.endsWith("Z")) {
-            if (hasFractionalSeconds()) {
-                dateF = new SimpleDateFormat("yyyyMMddHHmmss.SSSS'Z'");
-            } else {
-                dateF = new SimpleDateFormat("yyyyMMddHHmmss'Z'");
-            }
-
-            dateF.setTimeZone(new SimpleTimeZone(0, "Z"));
-        } else if (time.indexOf('-') > 0 || time.indexOf('+') > 0) {
-            d = this.getTime();
-            if (hasFractionalSeconds()) {
-                dateF = new SimpleDateFormat("yyyyMMddHHmmss.SSSSz");
-            } else {
-                dateF = new SimpleDateFormat("yyyyMMddHHmmssz");
-            }
-
-            dateF.setTimeZone(new SimpleTimeZone(0, "Z"));
-        } else {
-            if (hasFractionalSeconds()) {
-                dateF = new SimpleDateFormat("yyyyMMddHHmmss.SSSS");
-            } else {
-                dateF = new SimpleDateFormat("yyyyMMddHHmmss");
-            }
-
-            dateF.setTimeZone(new SimpleTimeZone(0, TimeZone.getDefault().getID()));
-        }
-
-        return dateF.parse(d);
-    }
-
-    private boolean hasFractionalSeconds() {
-        return time.indexOf('.') == 14;
-    }
-
-    private byte[] getOctets() {
-        char[] cs = time.toCharArray();
-        byte[] bs = new byte[cs.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            bs[i] = (byte) cs[i];
-        }
-
-        return bs;
-    }
-
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(GENERALIZED_TIME, this.getOctets());
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERGeneralizedTime)) {
-            return false;
-        }
-
-        return time.equals(((DERGeneralizedTime) o).time);
-    }
-
-    public int hashCode() {
-        return time.hashCode();
-    }
-}

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/DERGenerator.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERGenerator.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERGenerator.java
deleted file mode 100644
index 359d931..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERGenerator.java
+++ /dev/null
@@ -1,108 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-public abstract class DERGenerator
-    extends ASN1Generator {
-    private boolean _tagged = false;
-    private boolean _isExplicit;
-    private int _tagNo;
-
-    protected DERGenerator(
-        OutputStream out) {
-        super(out);
-    }
-
-    public DERGenerator(
-        OutputStream out,
-        int tagNo,
-        boolean isExplicit) {
-        super(out);
-
-        _tagged = true;
-        _isExplicit = isExplicit;
-        _tagNo = tagNo;
-    }
-
-    private void writeLength(
-        OutputStream out,
-        int length)
-        throws IOException {
-        if (length > 127) {
-            int size = 1;
-            int val = length;
-
-            while ((val >>>= 8) != 0) {
-                size++;
-            }
-
-            out.write((byte) (size | 0x80));
-
-            for (int i = (size - 1) * 8; i >= 0; i -= 8) {
-                out.write((byte) (length >> i));
-            }
-        } else {
-            out.write((byte) length);
-        }
-    }
-
-    void writeDEREncoded(
-        OutputStream out,
-        int tag,
-        byte[] bytes)
-        throws IOException {
-        out.write(tag);
-        writeLength(out, bytes.length);
-        out.write(bytes);
-    }
-
-    void writeDEREncoded(
-        int tag,
-        byte[] bytes)
-        throws IOException {
-        if (_tagged) {
-            int tagNum = _tagNo | DERTags.TAGGED;
-
-            if (_isExplicit) {
-                int newTag = _tagNo | DERTags.CONSTRUCTED | DERTags.TAGGED;
-
-                ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-
-                writeDEREncoded(bOut, tag, bytes);
-
-                writeDEREncoded(_out, newTag, bOut.toByteArray());
-            } else {
-                if ((tag & DERTags.CONSTRUCTED) != 0) {
-                    writeDEREncoded(_out, tagNum | DERTags.CONSTRUCTED, bytes);
-                } else {
-                    writeDEREncoded(_out, tagNum, bytes);
-                }
-            }
-        } else {
-            writeDEREncoded(_out, tag, bytes);
-        }
-    }
-
-    void writeDEREncoded(
-        OutputStream out,
-        int tag,
-        InputStream in)
-        throws IOException {
-        out.write(tag);
-
-        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-
-        int b = 0;
-        while ((b = in.read()) >= 0) {
-            bOut.write(b);
-        }
-
-        byte[] bytes = bOut.toByteArray();
-
-        writeLength(out, bytes.length);
-        out.write(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/DERIA5String.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERIA5String.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERIA5String.java
deleted file mode 100644
index 53d1abf..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERIA5String.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/** DER IA5String object - this is an ascii string. */
-public class DERIA5String
-    extends ASN1Object
-    implements DERString {
-    String string;
-
-    /**
-     * return a IA5 string from the passed in object
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERIA5String getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERIA5String) {
-            return (DERIA5String) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERIA5String(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return an IA5 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 DERIA5String getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    /** basic constructor - with bytes. */
-    public DERIA5String(
-        byte[] string) {
-        char[] cs = new char[string.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            cs[i] = (char) (string[i] & 0xff);
-        }
-
-        this.string = new String(cs);
-    }
-
-    /** basic constructor - without validation. */
-    public DERIA5String(
-        String string) {
-        this(string, false);
-    }
-
-    /**
-     * Constructor with optional validation.
-     *
-     * @param string   the base string to wrap.
-     * @param validate whether or not to check the string.
-     * @throws IllegalArgumentException if validate is true and the string
-     *                                  contains characters that should not be in an IA5String.
-     */
-    public DERIA5String(
-        String string,
-        boolean validate) {
-        if (validate && !isIA5String(string)) {
-            throw new IllegalArgumentException("string contains illegal characters");
-        }
-
-        this.string = string;
-    }
-
-    public String getString() {
-        return string;
-    }
-
-    public String toString() {
-        return string;
-    }
-
-    public byte[] getOctets() {
-        char[] cs = string.toCharArray();
-        byte[] bs = new byte[cs.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            bs[i] = (byte) cs[i];
-        }
-
-        return bs;
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(IA5_STRING, this.getOctets());
-    }
-
-    public int hashCode() {
-        return this.getString().hashCode();
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERIA5String)) {
-            return false;
-        }
-
-        DERIA5String s = (DERIA5String) o;
-
-        return this.getString().equals(s.getString());
-    }
-
-    /**
-     * return true if the passed in String can be represented without
-     * loss as an IA5String, false otherwise.
-     *
-     * @return true if in printable set, false otherwise.
-     */
-    public static boolean isIA5String(
-        String str) {
-        for (int i = str.length() - 1; i >= 0; i--) {
-            char ch = str.charAt(i);
-
-            if (ch > 0x007f) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-}

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/DERInputStream.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERInputStream.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERInputStream.java
deleted file mode 100644
index 5d35bd3..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERInputStream.java
+++ /dev/null
@@ -1,237 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayInputStream;
-import java.io.EOFException;
-import java.io.FilterInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-/**
- * Don't use this class. It will eventually disappear, use ASN1InputStream.
- * <br>
- * This class is scheduled for removal.
- *
- * @deprecated use ASN1InputStream
- */
-public class DERInputStream
-    extends FilterInputStream implements DERTags {
-    /** @deprecated use ASN1InputStream */
-    public DERInputStream(
-        InputStream is) {
-        super(is);
-    }
-
-    protected int readLength()
-        throws IOException {
-        int length = read();
-        if (length < 0) {
-            throw new IOException("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 = read();
-
-                if (next < 0) {
-                    throw new IOException("EOF found reading length");
-                }
-
-                length = (length << 8) + next;
-            }
-
-            if (length < 0) {
-                throw new IOException("corrupted stream - negative length found");
-            }
-        }
-
-        return length;
-    }
-
-    protected void readFully(
-        byte[] bytes)
-        throws IOException {
-        int left = bytes.length;
-
-        if (left == 0) {
-            return;
-        }
-
-        while (left > 0) {
-            int l = read(bytes, bytes.length - left, left);
-
-            if (l < 0) {
-                throw new EOFException("unexpected end of stream");
-            }
-
-            left -= l;
-        }
-    }
-
-    /**
-     * build an object given its tag and a byte stream to construct it
-     * from.
-     */
-    protected DERObject buildObject(
-        int tag,
-        byte[] bytes)
-        throws IOException {
-        switch (tag) {
-            case NULL:
-                return null;
-            case SEQUENCE | CONSTRUCTED:
-                ByteArrayInputStream bIn = new ByteArrayInputStream(bytes);
-                BERInputStream dIn = new BERInputStream(bIn);
-                DERConstructedSequence seq = new DERConstructedSequence();
-
-                try {
-                    for (; ;) {
-                        DERObject obj = dIn.readObject();
-
-                        seq.addObject(obj);
-                    }
-                }
-                catch (EOFException ex) {
-                    return seq;
-                }
-            case SET | CONSTRUCTED:
-                bIn = new ByteArrayInputStream(bytes);
-                dIn = new BERInputStream(bIn);
-
-                ASN1EncodableVector v = new ASN1EncodableVector();
-
-                try {
-                    for (; ;) {
-                        DERObject obj = dIn.readObject();
-
-                        v.add(obj);
-                    }
-                }
-                catch (EOFException ex) {
-                    return new DERConstructedSet(v);
-                }
-            case BOOLEAN:
-                return new DERBoolean(bytes);
-            case INTEGER:
-                return new DERInteger(bytes);
-            case ENUMERATED:
-                return new DEREnumerated(bytes);
-            case OBJECT_IDENTIFIER:
-                return new DERObjectIdentifier(bytes);
-            case BIT_STRING:
-                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);
-            case UTF8_STRING:
-                return new DERUTF8String(bytes);
-            case PRINTABLE_STRING:
-                return new DERPrintableString(bytes);
-            case IA5_STRING:
-                return new DERIA5String(bytes);
-            case T61_STRING:
-                return new DERT61String(bytes);
-            case VISIBLE_STRING:
-                return new DERVisibleString(bytes);
-            case UNIVERSAL_STRING:
-                return new DERUniversalString(bytes);
-            case GENERAL_STRING:
-                return new DERGeneralString(bytes);
-            case BMP_STRING:
-                return new DERBMPString(bytes);
-            case OCTET_STRING:
-                return new DEROctetString(bytes);
-            case UTC_TIME:
-                return new DERUTCTime(bytes);
-            case GENERALIZED_TIME:
-                return new DERGeneralizedTime(bytes);
-            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");
-                    }
-
-                    if (bytes.length == 0)        // empty tag!
-                    {
-                        if ((tag & CONSTRUCTED) == 0) {
-                            return new DERTaggedObject(false, tag & 0x1f, new DERNull());
-                        } else {
-                            return new DERTaggedObject(false, tag & 0x1f, new DERConstructedSequence());
-                        }
-                    }
-
-                    //
-                    // simple type - implicit... return an octet string
-                    //
-                    if ((tag & CONSTRUCTED) == 0) {
-                        return new DERTaggedObject(false, tag & 0x1f, new DEROctetString(bytes));
-                    }
-
-                    bIn = new ByteArrayInputStream(bytes);
-                    dIn = new BERInputStream(bIn);
-
-                    DEREncodable dObj = dIn.readObject();
-
-                    //
-                    // explicitly tagged (probably!) - if it isn't we'd have to
-                    // tell from the context
-                    //
-                    if (dIn.available() == 0) {
-                        return new DERTaggedObject(tag & 0x1f, dObj);
-                    }
-
-                    //
-                    // another implicit object, we'll create a sequence...
-                    //
-                    seq = new DERConstructedSequence();
-
-                    seq.addObject(dObj);
-
-                    try {
-                        for (; ;) {
-                            dObj = dIn.readObject();
-
-                            seq.addObject(dObj);
-                        }
-                    }
-                    catch (EOFException ex) {
-                        // ignore --
-                    }
-
-                    return new DERTaggedObject(false, tag & 0x1f, seq);
-                }
-
-                return new DERUnknownTag(tag, bytes);
-        }
-    }
-
-    public DERObject readObject()
-        throws IOException {
-        int tag = read();
-        if (tag == -1) {
-            throw new EOFException();
-        }
-
-        int length = readLength();
-        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/DERInteger.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERInteger.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERInteger.java
deleted file mode 100644
index 4265efe..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERInteger.java
+++ /dev/null
@@ -1,114 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.math.BigInteger;
-
-public class DERInteger
-    extends ASN1Object {
-    byte[] bytes;
-
-    /**
-     * return an integer from the passed in object
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERInteger getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERInteger) {
-            return (DERInteger) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERInteger(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return an Integer 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 DERInteger getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    public DERInteger(
-        int value) {
-        bytes = BigInteger.valueOf(value).toByteArray();
-    }
-
-    public DERInteger(
-        BigInteger value) {
-        bytes = value.toByteArray();
-    }
-
-    public DERInteger(
-        byte[] bytes) {
-        this.bytes = bytes;
-    }
-
-    public BigInteger getValue() {
-        return new BigInteger(bytes);
-    }
-
-    /**
-     * in some cases positive values get crammed into a space,
-     * that's not quite big enough...
-     */
-    public BigInteger getPositiveValue() {
-        return new BigInteger(1, bytes);
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(INTEGER, bytes);
-    }
-
-    public int hashCode() {
-        int value = 0;
-
-        for (int i = 0; i != bytes.length; i++) {
-            value ^= (bytes[i] & 0xff) << (i % 4);
-        }
-
-        return value;
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERInteger)) {
-            return false;
-        }
-
-        DERInteger other = (DERInteger) 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 String toString() {
-        return getValue().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/DERNull.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERNull.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERNull.java
deleted file mode 100644
index 774cb6e..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERNull.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/** A NULL object. */
-public class DERNull
-    extends ASN1Null {
-    public static final DERNull INSTANCE = new DERNull();
-
-    byte[] zeroBytes = new byte[0];
-
-    public DERNull() {
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(NULL, zeroBytes);
-    }
-}

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/DERNumericString.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERNumericString.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERNumericString.java
deleted file mode 100644
index 9b72196..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERNumericString.java
+++ /dev/null
@@ -1,148 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/** DER NumericString object - this is an ascii string of characters {0,1,2,3,4,5,6,7,8,9, }. */
-public class DERNumericString
-    extends ASN1Object
-    implements DERString {
-    String string;
-
-    /**
-     * return a Numeric string from the passed in object
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERNumericString getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERNumericString) {
-            return (DERNumericString) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERNumericString(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return an Numeric 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 DERNumericString getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    /** basic constructor - with bytes. */
-    public DERNumericString(
-        byte[] string) {
-        char[] cs = new char[string.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            cs[i] = (char) (string[i] & 0xff);
-        }
-
-        this.string = new String(cs);
-    }
-
-    /** basic constructor -  without validation.. */
-    public DERNumericString(
-        String string) {
-        this(string, false);
-    }
-
-    /**
-     * Constructor with optional validation.
-     *
-     * @param string   the base string to wrap.
-     * @param validate whether or not to check the string.
-     * @throws IllegalArgumentException if validate is true and the string
-     *                                  contains characters that should not be in a NumericString.
-     */
-    public DERNumericString(
-        String string,
-        boolean validate) {
-        if (validate && !isNumericString(string)) {
-            throw new IllegalArgumentException("string contains illegal characters");
-        }
-
-        this.string = string;
-    }
-
-    public String getString() {
-        return string;
-    }
-
-    public String toString() {
-        return string;
-    }
-
-    public byte[] getOctets() {
-        char[] cs = string.toCharArray();
-        byte[] bs = new byte[cs.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            bs[i] = (byte) cs[i];
-        }
-
-        return bs;
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(NUMERIC_STRING, this.getOctets());
-    }
-
-    public int hashCode() {
-        return this.getString().hashCode();
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERNumericString)) {
-            return false;
-        }
-
-        DERNumericString s = (DERNumericString) o;
-
-        return this.getString().equals(s.getString());
-    }
-
-    /**
-     * Return true if the string can be represented as a NumericString ('0'..'9', ' ')
-     *
-     * @param str string to validate.
-     * @return true if numeric, fale otherwise.
-     */
-    public static boolean isNumericString(
-        String str) {
-        for (int i = str.length() - 1; i >= 0; i--) {
-            char ch = str.charAt(i);
-
-            if (ch > 0x007f) {
-                return false;
-            }
-
-            if (('0' <= ch && ch <= '9') || ch == ' ') {
-                continue;
-            }
-
-            return false;
-        }
-
-        return true;
-    }
-}

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/DERObject.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERObject.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERObject.java
deleted file mode 100644
index df6dd86..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERObject.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-public abstract class DERObject
-    extends ASN1Encodable
-    implements DERTags {
-    public DERObject toASN1Object() {
-        return this;
-    }
-
-    public abstract int hashCode();
-
-    public abstract boolean equals(Object o);
-
-    abstract void encode(DEROutputStream out)
-        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/DERObjectIdentifier.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERObjectIdentifier.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERObjectIdentifier.java
deleted file mode 100644
index f53153f..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERObjectIdentifier.java
+++ /dev/null
@@ -1,245 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.math.BigInteger;
-
-public class DERObjectIdentifier
-    extends ASN1Object {
-    String identifier;
-
-    /**
-     * return an OID from the passed in object
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERObjectIdentifier getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERObjectIdentifier) {
-            return (DERObjectIdentifier) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERObjectIdentifier(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return an Object Identifier 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 DERObjectIdentifier getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-
-    DERObjectIdentifier(
-        byte[] bytes) {
-        StringBuffer objId = new StringBuffer();
-        long value = 0;
-        BigInteger bigValue = null;
-        boolean first = true;
-
-        for (int i = 0; i != bytes.length; i++) {
-            int b = bytes[i] & 0xff;
-
-            if (value < 0x80000000000000L) {
-                value = value * 128 + (b & 0x7f);
-                if ((b & 0x80) == 0)             // end of number reached
-                {
-                    if (first) {
-                        switch ((int) value / 40) {
-                            case 0:
-                                objId.append('0');
-                                break;
-                            case 1:
-                                objId.append('1');
-                                value -= 40;
-                                break;
-                            default:
-                                objId.append('2');
-                                value -= 80;
-                        }
-                        first = false;
-                    }
-
-                    objId.append('.');
-                    objId.append(value);
-                    value = 0;
-                }
-            } else {
-                if (bigValue == null) {
-                    bigValue = BigInteger.valueOf(value);
-                }
-                bigValue = bigValue.shiftLeft(7);
-                bigValue = bigValue.or(BigInteger.valueOf(b & 0x7f));
-                if ((b & 0x80) == 0) {
-                    objId.append('.');
-                    objId.append(bigValue);
-                    bigValue = null;
-                    value = 0;
-                }
-            }
-        }
-
-        this.identifier = objId.toString();
-    }
-
-    public DERObjectIdentifier(
-        String identifier) {
-        if (!isValidIdentifier(identifier)) {
-            throw new IllegalArgumentException("string " + identifier + " not an OID");
-        }
-
-        this.identifier = identifier;
-    }
-
-    public String getId() {
-        return identifier;
-    }
-
-    private void writeField(
-        OutputStream out,
-        long fieldValue)
-        throws IOException {
-        if (fieldValue >= (1L << 7)) {
-            if (fieldValue >= (1L << 14)) {
-                if (fieldValue >= (1L << 21)) {
-                    if (fieldValue >= (1L << 28)) {
-                        if (fieldValue >= (1L << 35)) {
-                            if (fieldValue >= (1L << 42)) {
-                                if (fieldValue >= (1L << 49)) {
-                                    if (fieldValue >= (1L << 56)) {
-                                        out.write((int) (fieldValue >> 56) | 0x80);
-                                    }
-                                    out.write((int) (fieldValue >> 49) | 0x80);
-                                }
-                                out.write((int) (fieldValue >> 42) | 0x80);
-                            }
-                            out.write((int) (fieldValue >> 35) | 0x80);
-                        }
-                        out.write((int) (fieldValue >> 28) | 0x80);
-                    }
-                    out.write((int) (fieldValue >> 21) | 0x80);
-                }
-                out.write((int) (fieldValue >> 14) | 0x80);
-            }
-            out.write((int) (fieldValue >> 7) | 0x80);
-        }
-        out.write((int) fieldValue & 0x7f);
-    }
-
-    private void writeField(
-        OutputStream out,
-        BigInteger fieldValue)
-        throws IOException {
-        int byteCount = (fieldValue.bitLength() + 6) / 7;
-        if (byteCount == 0) {
-            out.write(0);
-        } else {
-            BigInteger tmpValue = fieldValue;
-            byte[] tmp = new byte[byteCount];
-            for (int i = byteCount - 1; i >= 0; i--) {
-                tmp[i] = (byte) ((tmpValue.intValue() & 0x7f) | 0x80);
-                tmpValue = tmpValue.shiftRight(7);
-            }
-            tmp[byteCount - 1] &= 0x7f;
-            out.write(tmp);
-        }
-
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        OIDTokenizer tok = new OIDTokenizer(identifier);
-        ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-        DEROutputStream dOut = new DEROutputStream(bOut);
-
-        writeField(bOut,
-            Integer.parseInt(tok.nextToken()) * 40
-            + Integer.parseInt(tok.nextToken()));
-
-        while (tok.hasMoreTokens()) {
-            String token = tok.nextToken();
-            if (token.length() < 18) {
-                writeField(bOut, Long.parseLong(token));
-            } else {
-                writeField(bOut, new BigInteger(token));
-            }
-        }
-
-        dOut.close();
-
-        byte[] bytes = bOut.toByteArray();
-
-        out.writeEncoded(OBJECT_IDENTIFIER, bytes);
-    }
-
-    public int hashCode() {
-        return identifier.hashCode();
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERObjectIdentifier)) {
-            return false;
-        }
-
-        return identifier.equals(((DERObjectIdentifier) o).identifier);
-    }
-
-    public String toString() {
-        return getId();
-    }
-
-    private static boolean isValidIdentifier(
-        String identifier) {
-        if (identifier.length() < 3
-            || identifier.charAt(1) != '.') {
-            return false;
-        }
-
-        char first = identifier.charAt(0);
-        if (first < '0' || first > '2') {
-            return false;
-        }
-
-        boolean periodAllowed = false;
-        for (int i = identifier.length() - 1; i >= 2; i--) {
-            char ch = identifier.charAt(i);
-
-            if ('0' <= ch && ch <= '9') {
-                periodAllowed = true;
-                continue;
-            }
-
-            if (ch == '.') {
-                if (!periodAllowed) {
-                    return false;
-                }
-
-                periodAllowed = false;
-                continue;
-            }
-
-            return false;
-        }
-
-        return periodAllowed;
-    }
-}

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/DEROctetString.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEROctetString.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEROctetString.java
deleted file mode 100644
index 113a99c..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEROctetString.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-public class DEROctetString
-    extends ASN1OctetString {
-    /** @param string the octets making up the octet string. */
-    public DEROctetString(
-        byte[] string) {
-        super(string);
-    }
-
-    public DEROctetString(
-        DEREncodable obj) {
-        super(obj);
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(OCTET_STRING, string);
-    }
-}

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/DEROutputStream.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEROutputStream.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEROutputStream.java
deleted file mode 100644
index 4a85500..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DEROutputStream.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.FilterOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class DEROutputStream
-    extends FilterOutputStream implements DERTags {
-    public DEROutputStream(
-        OutputStream os) {
-        super(os);
-    }
-
-    private void writeLength(
-        int length)
-        throws IOException {
-        if (length > 127) {
-            int size = 1;
-            int val = length;
-
-            while ((val >>>= 8) != 0) {
-                size++;
-            }
-
-            write((byte) (size | 0x80));
-
-            for (int i = (size - 1) * 8; i >= 0; i -= 8) {
-                write((byte) (length >> i));
-            }
-        } else {
-            write((byte) length);
-        }
-    }
-
-    void writeEncoded(
-        int tag,
-        byte[] bytes)
-        throws IOException {
-        write(tag);
-        writeLength(bytes.length);
-        write(bytes);
-    }
-
-    protected void writeNull()
-        throws IOException {
-        write(NULL);
-        write(0x00);
-    }
-
-    public void write(byte[] buf)
-        throws IOException {
-        out.write(buf, 0, buf.length);
-    }
-
-    public void write(byte[] buf, int offSet, int len)
-        throws IOException {
-        out.write(buf, offSet, len);
-    }
-
-    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 DEREncodable");
-        }
-    }
-}

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/DERPrintableString.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERPrintableString.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERPrintableString.java
deleted file mode 100644
index 48bd5c7..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERPrintableString.java
+++ /dev/null
@@ -1,172 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/** DER PrintableString object. */
-public class DERPrintableString
-    extends ASN1Object
-    implements DERString {
-    String string;
-
-    /**
-     * return a printable string from the passed in object.
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERPrintableString getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERPrintableString) {
-            return (DERPrintableString) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERPrintableString(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return a Printable 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 DERPrintableString getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    /** basic constructor - byte encoded string. */
-    public DERPrintableString(
-        byte[] string) {
-        char[] cs = new char[string.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            cs[i] = (char) (string[i] & 0xff);
-        }
-
-        this.string = new String(cs);
-    }
-
-    /** basic constructor - this does not validate the string */
-    public DERPrintableString(
-        String string) {
-        this(string, false);
-    }
-
-    /**
-     * Constructor with optional validation.
-     *
-     * @param string   the base string to wrap.
-     * @param validate whether or not to check the string.
-     * @throws IllegalArgumentException if validate is true and the string
-     *                                  contains characters that should not be in a PrintableString.
-     */
-    public DERPrintableString(
-        String string,
-        boolean validate) {
-        if (validate && !isPrintableString(string)) {
-            throw new IllegalArgumentException("string contains illegal characters");
-        }
-
-        this.string = string;
-    }
-
-    public String getString() {
-        return string;
-    }
-
-    public byte[] getOctets() {
-        char[] cs = string.toCharArray();
-        byte[] bs = new byte[cs.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            bs[i] = (byte) cs[i];
-        }
-
-        return bs;
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(PRINTABLE_STRING, this.getOctets());
-    }
-
-    public int hashCode() {
-        return this.getString().hashCode();
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERPrintableString)) {
-            return false;
-        }
-
-        DERPrintableString s = (DERPrintableString) o;
-
-        return this.getString().equals(s.getString());
-    }
-
-    public String toString() {
-        return string;
-    }
-
-    /**
-     * return true if the passed in String can be represented without
-     * loss as a PrintableString, false otherwise.
-     *
-     * @return true if in printable set, false otherwise.
-     */
-    public static boolean isPrintableString(
-        String str) {
-        for (int i = str.length() - 1; i >= 0; i--) {
-            char ch = str.charAt(i);
-
-            if (ch > 0x007f) {
-                return false;
-            }
-
-            if ('a' <= ch && ch <= 'z') {
-                continue;
-            }
-
-            if ('A' <= ch && ch <= 'Z') {
-                continue;
-            }
-
-            if ('0' <= ch && ch <= '9') {
-                continue;
-            }
-
-            switch (ch) {
-                case ' ':
-                case '\'':
-                case '(':
-                case ')':
-                case '+':
-                case '-':
-                case '.':
-                case ':':
-                case '=':
-                case '?':
-                case '/':
-                case ',':
-                    continue;
-            }
-
-            return false;
-        }
-
-        return true;
-    }
-}

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/DERSequence.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERSequence.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERSequence.java
deleted file mode 100644
index 9416a2d..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERSequence.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-
-public class DERSequence
-    extends ASN1Sequence {
-    /** create an empty sequence */
-    public DERSequence() {
-    }
-
-    /** create a sequence containing one object */
-    public DERSequence(
-        DEREncodable obj) {
-        this.addObject(obj);
-    }
-
-    /** create a sequence containing a vector of objects. */
-    public DERSequence(
-        DEREncodableVector v) {
-        for (int i = 0; i != v.size(); i++) {
-            this.addObject(v.get(i));
-        }
-    }
-
-    /** create a sequence containing an array of objects. */
-    public DERSequence(
-        ASN1Encodable[] a) {
-        for (int i = 0; i != a.length; i++) {
-            this.addObject(a[i]);
-        }
-    }
-
-    /*
-    * 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/DERSequenceGenerator.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERSequenceGenerator.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERSequenceGenerator.java
deleted file mode 100644
index 4fd7003..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERSequenceGenerator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
-public class DERSequenceGenerator
-    extends DERGenerator {
-    private final ByteArrayOutputStream _bOut = new ByteArrayOutputStream();
-
-    public DERSequenceGenerator(
-        OutputStream out)
-        throws IOException {
-        super(out);
-    }
-
-    public DERSequenceGenerator(
-        OutputStream out,
-        int tagNo,
-        boolean isExplicit)
-        throws IOException {
-        super(out, tagNo, isExplicit);
-    }
-
-    public void addObject(
-        DEREncodable object)
-        throws IOException {
-        object.getDERObject().encode(new DEROutputStream(_bOut));
-    }
-
-    public OutputStream getRawOutputStream() {
-        return _bOut;
-    }
-
-    public void close()
-        throws IOException {
-        writeDEREncoded(DERTags.CONSTRUCTED | DERTags.SEQUENCE, _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/DERSet.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERSet.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERSet.java
deleted file mode 100644
index 4fbb0f8..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERSet.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.Enumeration;
-
-/** A DER encoded set object */
-public class DERSet
-    extends ASN1Set {
-    /** create an empty set */
-    public DERSet() {
-    }
-
-    /** @param obj - a single object that makes up the set. */
-    public DERSet(
-        DEREncodable obj) {
-        this.addObject(obj);
-    }
-
-    /** @param v - a vector of objects making up the set. */
-    public DERSet(
-        DEREncodableVector v) {
-        this(v, true);
-    }
-
-    /** create a set from an array of objects. */
-    public DERSet(
-        ASN1Encodable[] a) {
-        for (int i = 0; i != a.length; i++) {
-            this.addObject(a[i]);
-        }
-
-        this.sort();
-    }
-
-    /** @param v - a vector of objects making up the set. */
-    DERSet(
-        DEREncodableVector v,
-        boolean needsSorting) {
-        for (int i = 0; i != v.size(); i++) {
-            this.addObject(v.get(i));
-        }
-
-        if (needsSorting) {
-            this.sort();
-        }
-    }
-
-    /*
-     * 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/DERString.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERString.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERString.java
deleted file mode 100644
index 71565b0..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERString.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-/** basic interface for DER string objects. */
-public interface DERString {
-    public String 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/DERT61String.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERT61String.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERT61String.java
deleted file mode 100644
index bd92539..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERT61String.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/** DER T61String (also the teletex string) */
-public class DERT61String
-    extends ASN1Object
-    implements DERString {
-    String string;
-
-    /**
-     * return a T61 string from the passed in object.
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERT61String getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERT61String) {
-            return (DERT61String) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERT61String(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return an T61 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 DERT61String getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    /** basic constructor - with bytes. */
-    public DERT61String(
-        byte[] string) {
-        char[] cs = new char[string.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            cs[i] = (char) (string[i] & 0xff);
-        }
-
-        this.string = new String(cs);
-    }
-
-    /** basic constructor - with string. */
-    public DERT61String(
-        String string) {
-        this.string = string;
-    }
-
-    public String getString() {
-        return string;
-    }
-
-    public String toString() {
-        return string;
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(T61_STRING, this.getOctets());
-    }
-
-    public byte[] getOctets() {
-        char[] cs = string.toCharArray();
-        byte[] bs = new byte[cs.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            bs[i] = (byte) cs[i];
-        }
-
-        return bs;
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERT61String)) {
-            return false;
-        }
-
-        return this.getString().equals(((DERT61String) o).getString());
-    }
-
-    public int hashCode() {
-        return this.getString().hashCode();
-    }
-}

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/DERTaggedObject.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERTaggedObject.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERTaggedObject.java
deleted file mode 100644
index 6dd457c..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERTaggedObject.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-/**
- * DER 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 DERTaggedObject
-    extends ASN1TaggedObject {
-    /**
-     * @param tagNo the tag number for this object.
-     * @param obj   the tagged object.
-     */
-    public DERTaggedObject(
-        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 DERTaggedObject(
-        boolean explicit,
-        int tagNo,
-        DEREncodable obj) {
-        super(explicit, tagNo, obj);
-    }
-
-    /**
-     * create an implicitly tagged object that contains a zero
-     * length sequence.
-     */
-    public DERTaggedObject(
-        int tagNo) {
-        super(false, tagNo, new DERSequence());
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        if (!empty) {
-            ByteArrayOutputStream bOut = new ByteArrayOutputStream();
-            DEROutputStream dOut = new DEROutputStream(bOut);
-
-            dOut.writeObject(obj);
-            dOut.close();
-
-            byte[] bytes = bOut.toByteArray();
-
-            if (explicit) {
-                out.writeEncoded(CONSTRUCTED | TAGGED | tagNo, bytes);
-            } else {
-                //
-                // need to mark constructed types...
-                //
-                if ((bytes[0] & CONSTRUCTED) != 0) {
-                    bytes[0] = (byte) (CONSTRUCTED | TAGGED | tagNo);
-                } else {
-                    bytes[0] = (byte) (TAGGED | tagNo);
-                }
-
-                out.write(bytes);
-            }
-        } else {
-            out.writeEncoded(CONSTRUCTED | TAGGED | tagNo, new byte[0]);
-        }
-    }
-}

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/DERTags.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERTags.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERTags.java
deleted file mode 100644
index 9fb9b41..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERTags.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-public interface DERTags {
-    public static final int BOOLEAN = 0x01;
-    public static final int INTEGER = 0x02;
-    public static final int BIT_STRING = 0x03;
-    public static final int OCTET_STRING = 0x04;
-    public static final int NULL = 0x05;
-    public static final int OBJECT_IDENTIFIER = 0x06;
-    public static final int EXTERNAL = 0x08;
-    public static final int ENUMERATED = 0x0a;
-    public static final int SEQUENCE = 0x10;
-    public static final int SEQUENCE_OF = 0x10; // for completeness
-    public static final int SET = 0x11;
-    public static final int SET_OF = 0x11; // for completeness
-
-
-    public static final int NUMERIC_STRING = 0x12;
-    public static final int PRINTABLE_STRING = 0x13;
-    public static final int T61_STRING = 0x14;
-    public static final int VIDEOTEX_STRING = 0x15;
-    public static final int IA5_STRING = 0x16;
-    public static final int UTC_TIME = 0x17;
-    public static final int GENERALIZED_TIME = 0x18;
-    public static final int GRAPHIC_STRING = 0x19;
-    public static final int VISIBLE_STRING = 0x1a;
-    public static final int GENERAL_STRING = 0x1b;
-    public static final int UNIVERSAL_STRING = 0x1c;
-    public static final int BMP_STRING = 0x1e;
-    public static final int UTF8_STRING = 0x0c;
-
-    public static final int CONSTRUCTED = 0x20;
-    public static final int APPLICATION = 0x40;
-    public static final int TAGGED = 0x80;
-}

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/DERUTCTime.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUTCTime.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUTCTime.java
deleted file mode 100644
index 57d38c7..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUTCTime.java
+++ /dev/null
@@ -1,214 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.SimpleTimeZone;
-
-/** UTC time object. */
-public class DERUTCTime
-    extends ASN1Object {
-    String time;
-
-    /**
-     * return an UTC Time from the passed in object.
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERUTCTime getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERUTCTime) {
-            return (DERUTCTime) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERUTCTime(((ASN1OctetString) obj).getOctets());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return an UTC Time 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 DERUTCTime getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    /**
-     * The correct format for this is YYMMDDHHMMSSZ (it used to be that seconds were
-     * never encoded. When you're creating one of these objects from scratch, that's
-     * what you want to use, otherwise we'll try to deal with whatever gets read from
-     * the input stream... (this is why the input format is different from the getTime()
-     * method output).
-     * <p/>
-     *
-     * @param time the time string.
-     */
-    public DERUTCTime(
-        String time) {
-        this.time = time;
-        try {
-            this.getDate();
-        }
-        catch (ParseException e) {
-            throw new IllegalArgumentException("invalid date string: " + e.getMessage());
-        }
-    }
-
-    /** base constructer from a java.util.date object */
-    public DERUTCTime(
-        Date time) {
-        SimpleDateFormat dateF = new SimpleDateFormat("yyMMddHHmmss'Z'");
-
-        dateF.setTimeZone(new SimpleTimeZone(0, "Z"));
-
-        this.time = dateF.format(time);
-    }
-
-    DERUTCTime(
-        byte[] bytes) {
-        //
-        // explicitly convert to characters
-        //
-        char[] dateC = new char[bytes.length];
-
-        for (int i = 0; i != dateC.length; i++) {
-            dateC[i] = (char) (bytes[i] & 0xff);
-        }
-
-        this.time = new String(dateC);
-    }
-
-    /**
-     * return the time as a date based on whatever a 2 digit year will return. For
-     * standardised processing use getAdjustedDate().
-     *
-     * @return the resulting date
-     * @throws java.text.ParseException if the date string cannot be parsed.
-     */
-    public Date getDate()
-        throws ParseException {
-        SimpleDateFormat dateF = new SimpleDateFormat("yyMMddHHmmssz");
-
-        return dateF.parse(getTime());
-    }
-
-    /**
-     * return the time as an adjusted date
-     * in the range of 1950 - 2049.
-     *
-     * @return a date in the range of 1950 to 2049.
-     * @throws java.text.ParseException if the date string cannot be parsed.
-     */
-    public Date getAdjustedDate()
-        throws ParseException {
-        SimpleDateFormat dateF = new SimpleDateFormat("yyyyMMddHHmmssz");
-
-        dateF.setTimeZone(new SimpleTimeZone(0, "Z"));
-
-        return dateF.parse(getAdjustedTime());
-    }
-
-    /**
-     * return the time - always in the form of
-     * YYMMDDhhmmssGMT(+hh:mm|-hh:mm).
-     * <p/>
-     * Normally in a certificate we would expect "Z" rather than "GMT",
-     * however adding the "GMT" means we can just use:
-     * <pre>
-     *     dateF = new SimpleDateFormat("yyMMddHHmmssz");
-     * </pre>
-     * To read in the time and get a date which is compatible with our local
-     * time zone.
-     * <p/>
-     * <b>Note:</b> In some cases, due to the local date processing, this
-     * may lead to unexpected results. If you want to stick the normal
-     * convention of 1950 to 2049 use the getAdjustedTime() method.
-     */
-    public String getTime() {
-        //
-        // standardise the format.
-        //
-        if (time.indexOf('-') < 0 && time.indexOf('+') < 0) {
-            if (time.length() == 11) {
-                return time.substring(0, 10) + "00GMT+00:00";
-            } else {
-                return time.substring(0, 12) + "GMT+00:00";
-            }
-        } else {
-            int index = time.indexOf('-');
-            if (index < 0) {
-                index = time.indexOf('+');
-            }
-            String d = time;
-
-            if (index == time.length() - 3) {
-                d += "00";
-            }
-
-            if (index == 10) {
-                return d.substring(0, 10) + "00GMT" + d.substring(10, 13) + ":" + d.substring(13, 15);
-            } else {
-                return d.substring(0, 12) + "GMT" + d.substring(12, 15) + ":" + d.substring(15, 17);
-            }
-        }
-    }
-
-    /**
-     * return a time string as an adjusted date with a 4 digit year. This goes
-     * in the range of 1950 - 2049.
-     */
-    public String getAdjustedTime() {
-        String d = this.getTime();
-
-        if (d.charAt(0) < '5') {
-            return "20" + d;
-        } else {
-            return "19" + d;
-        }
-    }
-
-    private byte[] getOctets() {
-        char[] cs = time.toCharArray();
-        byte[] bs = new byte[cs.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            bs[i] = (byte) cs[i];
-        }
-
-        return bs;
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(UTC_TIME, this.getOctets());
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERUTCTime)) {
-            return false;
-        }
-
-        return time.equals(((DERUTCTime) o).time);
-    }
-
-    public int hashCode() {
-        return time.hashCode();
-    }
-
-    public String toString() {
-        return time;
-    }
-}

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/DERUTF8String.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUTF8String.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUTF8String.java
deleted file mode 100644
index 768c525..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUTF8String.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/** DER UTF8String object. */
-public class DERUTF8String
-    extends ASN1Object
-    implements DERString {
-    String string;
-
-    /**
-     * return an UTF8 string from the passed in object.
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERUTF8String getInstance(Object obj) {
-        if (obj == null || obj instanceof DERUTF8String) {
-            return (DERUTF8String) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERUTF8String(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: "
-                                           + obj.getClass().getName());
-    }
-
-    /**
-     * return an UTF8 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 DERUTF8String getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    /** basic constructor - byte encoded string. */
-    DERUTF8String(byte[] string) {
-        this.string = Strings.fromUTF8ByteArray(string);
-    }
-
-    /** basic constructor */
-    public DERUTF8String(String string) {
-        this.string = string;
-    }
-
-    public String getString() {
-        return string;
-    }
-
-    public String toString() {
-        return string;
-    }
-
-    public int hashCode() {
-        return this.getString().hashCode();
-    }
-
-    boolean asn1Equals(DERObject o) {
-        if (!(o instanceof DERUTF8String)) {
-            return false;
-        }
-
-        DERUTF8String s = (DERUTF8String) o;
-
-        return this.getString().equals(s.getString());
-    }
-
-    void encode(DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(UTF8_STRING, Strings.toUTF8ByteArray(string));
-    }
-}

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/DERUniversalString.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUniversalString.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUniversalString.java
deleted file mode 100644
index 29be4bf..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUniversalString.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-/** DER UniversalString object. */
-public class DERUniversalString
-    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'};
-    private byte[] string;
-
-    /**
-     * return a Universal String from the passed in object.
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERUniversalString getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERUniversalString) {
-            return (DERUniversalString) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERUniversalString(((ASN1OctetString) obj).getOctets());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return a Universal 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 DERUniversalString getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    /** basic constructor - byte encoded string. */
-    public DERUniversalString(
-        byte[] string) {
-        this.string = string;
-    }
-
-    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();
-    }
-
-    public byte[] getOctets() {
-        return string;
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(UNIVERSAL_STRING, this.getOctets());
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERUniversalString)) {
-            return false;
-        }
-
-        return this.getString().equals(((DERUniversalString) o).getString());
-    }
-
-    public int hashCode() {
-        return this.getString().hashCode();
-    }
-}

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/DERUnknownTag.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUnknownTag.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUnknownTag.java
deleted file mode 100644
index 5a02fde..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERUnknownTag.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/** We insert one of these when we find a tag we don't recognise. */
-public class DERUnknownTag
-    extends DERObject {
-    int tag;
-    byte[] data;
-
-    /**
-     * @param tag  the tag value.
-     * @param data the octets making up the time.
-     */
-    public DERUnknownTag(
-        int tag,
-        byte[] data) {
-        this.tag = tag;
-        this.data = data;
-    }
-
-    public int getTag() {
-        return tag;
-    }
-
-    public byte[] getData() {
-        return data;
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(tag, data);
-    }
-
-    public boolean equals(
-        Object o) {
-        if (!(o instanceof DERUnknownTag)) {
-            return false;
-        }
-
-        DERUnknownTag other = (DERUnknownTag) o;
-
-        if (tag != other.tag) {
-            return false;
-        }
-
-        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 true;
-    }
-
-    public int hashCode() {
-        byte[] b = this.getData();
-        int value = 0;
-
-        for (int i = 0; i != b.length; i++) {
-            value ^= (b[i] & 0xff) << (i % 4);
-        }
-
-        return value ^ this.getTag();
-    }
-}

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/DERVisibleString.java
----------------------------------------------------------------------
diff --git a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERVisibleString.java b/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERVisibleString.java
deleted file mode 100644
index 0b8ec89..0000000
--- a/3rdparty/not-yet-commons-ssl/src/main/java/org/apache/commons/ssl/asn1/DERVisibleString.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package org.apache.commons.ssl.asn1;
-
-import java.io.IOException;
-
-/** DER VisibleString object. */
-public class DERVisibleString
-    extends ASN1Object
-    implements DERString {
-    String string;
-
-    /**
-     * return a Visible String from the passed in object.
-     *
-     * @throws IllegalArgumentException if the object cannot be converted.
-     */
-    public static DERVisibleString getInstance(
-        Object obj) {
-        if (obj == null || obj instanceof DERVisibleString) {
-            return (DERVisibleString) obj;
-        }
-
-        if (obj instanceof ASN1OctetString) {
-            return new DERVisibleString(((ASN1OctetString) obj).getOctets());
-        }
-
-        if (obj instanceof ASN1TaggedObject) {
-            return getInstance(((ASN1TaggedObject) obj).getObject());
-        }
-
-        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
-    }
-
-    /**
-     * return a Visible 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 DERVisibleString getInstance(
-        ASN1TaggedObject obj,
-        boolean explicit) {
-        return getInstance(obj.getObject());
-    }
-
-    /** basic constructor - byte encoded string. */
-    public DERVisibleString(
-        byte[] string) {
-        char[] cs = new char[string.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            cs[i] = (char) (string[i] & 0xff);
-        }
-
-        this.string = new String(cs);
-    }
-
-    /** basic constructor */
-    public DERVisibleString(
-        String string) {
-        this.string = string;
-    }
-
-    public String getString() {
-        return string;
-    }
-
-    public String toString() {
-        return string;
-    }
-
-    public byte[] getOctets() {
-        char[] cs = string.toCharArray();
-        byte[] bs = new byte[cs.length];
-
-        for (int i = 0; i != cs.length; i++) {
-            bs[i] = (byte) cs[i];
-        }
-
-        return bs;
-    }
-
-    void encode(
-        DEROutputStream out)
-        throws IOException {
-        out.writeEncoded(VISIBLE_STRING, this.getOctets());
-    }
-
-    boolean asn1Equals(
-        DERObject o) {
-        if (!(o instanceof DERVisibleString)) {
-            return false;
-        }
-
-        return this.getString().equals(((DERVisibleString) o).getString());
-    }
-
-    public int hashCode() {
-        return this.getString().hashCode();
-    }
-}


Mime
View raw message