1 13 14 package org.ejbca.core.protocol.ocsp; 15 16 import org.bouncycastle.asn1.ASN1Encodable; 17 import org.bouncycastle.asn1.DERIA5String; 18 import org.bouncycastle.asn1.DERObject; 19 import org.bouncycastle.asn1.DERObjectIdentifier; 20 21 34 public class FnrFromUnidExtension extends ASN1Encodable { 35 36 public static final DERObjectIdentifier FnrFromUnidOid = new DERObjectIdentifier("2.16.578.1.16.3.2"); 37 38 private String fnr; 39 40 public static FnrFromUnidExtension getInstance( 41 Object obj) 42 { 43 if (obj == null || obj instanceof FnrFromUnidExtension) 44 { 45 return (FnrFromUnidExtension)obj; 46 } 47 48 if (obj instanceof DERIA5String) 49 { 50 return new FnrFromUnidExtension((DERIA5String)obj); 51 } 52 53 throw new IllegalArgumentException ("Invalid FnrFromUnidExtension: " + obj.getClass().getName()); 54 } 55 56 public FnrFromUnidExtension( 57 String nr) 58 { 59 this.fnr=nr; 60 } 61 62 public FnrFromUnidExtension( 63 DERIA5String nr) 64 { 65 this.fnr=nr.getString(); 66 67 } 68 69 public String getFnr() 70 { 71 return fnr; 72 } 73 74 public DERObject toASN1Object() 75 { 76 return new DERIA5String(fnr); 77 } 78 79 } 80 | Popular Tags |