01: package org.bouncycastle.asn1.ocsp;
02:
03: import org.bouncycastle.asn1.ASN1EncodableVector;
04: import org.bouncycastle.asn1.ASN1Encodable;
05: import org.bouncycastle.asn1.DERObject;
06: import org.bouncycastle.asn1.DERSequence;
07: import org.bouncycastle.asn1.x509.X509Name;
08:
09: public class ServiceLocator extends ASN1Encodable {
10: X509Name issuer;
11: DERObject locator;
12:
13: /**
14: * Produce an object suitable for an ASN1OutputStream.
15: * <pre>
16: * ServiceLocator ::= SEQUENCE {
17: * issuer Name,
18: * locator AuthorityInfoAccessSyntax OPTIONAL }
19: * </pre>
20: */
21: public DERObject toASN1Object() {
22: ASN1EncodableVector v = new ASN1EncodableVector();
23:
24: v.add(issuer);
25:
26: if (locator != null) {
27: v.add(locator);
28: }
29:
30: return new DERSequence(v);
31: }
32: }
|