1 2 package com.ca.commons.security.cert.extensions; 3 4 import com.ca.commons.security.asn1.*; 5 6 35 public class CRLDistributionPoints implements V3Extension 36 { 37 String value = null; 38 39 public void init(ASN1Object asn1object) throws Exception 40 { 41 if (!asn1object.isASN1Type(ASN1Type.SEQUENCE)) 42 throw new Exception ("Wrong ASN.1 type for CRLDistributionPoints"); 43 44 for (int i = 0; i < asn1object.size(); i++) 45 { 46 ASN1Object distributionPoint = asn1object.getComponent(i); 47 48 if (!distributionPoint.isASN1Type(ASN1Type.SEQUENCE)) 49 throw new Exception ("Wrong ASN.1 type for CRLDistributionPoints.distributionPoint"); 50 51 for (int j = 0; j < distributionPoint.size(); j++) 52 { 53 ASN1Object nextComp = distributionPoint.getComponent(j); 54 55 if (j == 0) 56 { 57 ASN1Object fullName = (ASN1Object)((ASN1Object) nextComp.getValue()).getValue(); 58 59 if (value == null) 60 value = IssuerAltName.getGNameString(fullName); 61 else 62 value = value + "\n" + IssuerAltName.getGNameString(fullName); 63 64 } 65 else if (j == 1) 66 { 67 System.out.println("Not reading CRLDistributionPoints.distributionPoint.reasons"); 68 } 69 else if (j == 2) 70 { 71 System.out.println("Not reading CRLDistributionPoints.distributionPoint.cRLIssuer"); 72 } 73 } 74 } 75 } 76 77 public String toString() 78 { 79 return value; 80 } 81 } 82 83 | Popular Tags |