log.debug("<stringToBcX509Name");
    public static X509Name stringToBcX509Name(String dn) {        log.debug(">stringToBcX509Name: " + dn);        // first make two vectors, one with all the C, O, OU etc specifying        // the order and one holding the actual values        ArrayList oldordering = new ArrayList();        ArrayList oldvalues = new ArrayList();        X509NameTokenizer xt = new X509NameTokenizer(dn);        while (xt.hasMoreTokens()) {            // This is a pair (CN=xx)            String pair = xt.nextToken();            int ix = pair.indexOf("=");            if (ix != -1) {                // make lower case so we can easily compare later                oldordering.add(pair.substring(0, ix).toLowerCase());                oldvalues.add(pair.substring(ix + 1));            } else {                // Huh, what's this?            }        }        // Now in the specified order, move from oldordering to newordering,        // reshuffling as we go along        Vector ordering = new Vector();        Vector values = new Vector();        int index = -1;        for (int i = 0; i < dNObjects.length; i++) {            //log.debug("Looking for "+objects[i]);            String object = dNObjects[i];            while ((index = oldordering.indexOf(object)) != -1) {                //log.debug("Found 1 "+object+" at index " + index);                DERObjectIdentifier oid = getOid(object);                if (oid != null) {                    //log.debug("Added "+object+", "+oldvalues.elementAt(index));                    ordering.add(oid);                    // remove from the old vectors, so we start clean the next                    // round                    values.add(oldvalues.remove(index));                    oldordering.remove(index);                    index = -1;                }            }        }        /*        if (log.isDebugEnabled()) {            Iterator i1 = ordering.iterator();            Iterator i2 = values.iterator();            log.debug("Order: ");            while (i1.hasNext()) {                log.debug(((DERObjectIdentifier)i1.next()).getId());            }            log.debug("Values: ");            while (i2.hasNext()) {                log.debug((String)i2.next());            }        } */        log.debug("<stringToBcX509Name");        return new X509Name(ordering, values);    } // stringToBcX509Name