001    /*
002     * $HeadURL: http://juliusdavies.ca/svn/not-yet-commons-ssl/tags/commons-ssl-0.3.11/src/java/org/apache/commons/ssl/CRLUtil.java $
003     * $Revision: 121 $
004     * $Date: 2007-11-13 21:26:57 -0800 (Tue, 13 Nov 2007) $
005     *
006     * ====================================================================
007     * Licensed to the Apache Software Foundation (ASF) under one
008     * or more contributor license agreements.  See the NOTICE file
009     * distributed with this work for additional information
010     * regarding copyright ownership.  The ASF licenses this file
011     * to you under the Apache License, Version 2.0 (the
012     * "License"); you may not use this file except in compliance
013     * with the License.  You may obtain a copy of the License at
014     *
015     *   http://www.apache.org/licenses/LICENSE-2.0
016     *
017     * Unless required by applicable law or agreed to in writing,
018     * software distributed under the License is distributed on an
019     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
020     * KIND, either express or implied.  See the License for the
021     * specific language governing permissions and limitations
022     * under the License.
023     * ====================================================================
024     *
025     * This software consists of voluntary contributions made by many
026     * individuals on behalf of the Apache Software Foundation.  For more
027     * information on the Apache Software Foundation, please see
028     * <http://www.apache.org/>.
029     *
030     */
031    
032    package org.apache.commons.ssl;
033    
034    /*
035    import org.bouncycastle.asn1.ASN1Encodable;
036    import org.bouncycastle.asn1.ASN1OctetString;
037    import org.bouncycastle.asn1.ASN1Sequence;
038    import org.bouncycastle.asn1.DERObject;
039    import org.bouncycastle.asn1.DERTaggedObject;
040    import org.bouncycastle.asn1.x509.CRLDistPoint;
041    import org.bouncycastle.asn1.x509.DistributionPoint;
042    import org.bouncycastle.asn1.x509.DistributionPointName;
043    import org.bouncycastle.x509.extension.X509ExtensionUtil;
044    */
045    
046    import java.io.IOException;
047    
048    /**
049     * @author Credit Union Central of British Columbia
050     * @author <a href="http://www.cucbc.com/">www.cucbc.com</a>
051     * @author <a href="mailto:juliusdavies@cucbc.com">juliusdavies@cucbc.com</a>
052     * @since 20-Dec-2005
053     */
054    public class CRLUtil {
055    
056        public static String getURLToCRL(byte[] extension2_5_29_31)
057            throws IOException {
058    
059            throw new UnsupportedOperationException("not yet implemented");
060    
061            /*
062                        byte[] bytes = extension2_5_29_31;
063                        ASN1Encodable asn1 = X509ExtensionUtil.fromExtensionValue(bytes);
064                        DERObject obj = asn1.getDERObject();
065                        CRLDistPoint distPoint = CRLDistPoint.getInstance(obj);
066                        DistributionPoint[] points = distPoint.getDistributionPoints();
067                        DistributionPointName dpn = points[0].getDistributionPoint();
068                        obj = dpn.getName().toASN1Object();
069                        ASN1Sequence seq = ASN1Sequence.getInstance(obj);
070                        DERTaggedObject tag = (DERTaggedObject) seq.getObjectAt(0);
071                        bytes = ASN1OctetString.getInstance(tag, false).getOctets();
072                        return new String(bytes);
073                        */
074        }
075    }