public class GeneralName
implements DEREncodable
{
- DEREncodable obj;
- int tag;
+ DEREncodable obj;
+ int tag;
+ boolean isInsideImplicit = false; // if we are in an implicitly tagged object
public GeneralName(
X509Name directoryName)
this.tag = tag;
}
+ /**
+ * mark whether or not we are contained inside an implicitly tagged
+ * object.
+ * @deprecated
+ */
+ public void markInsideImplicit(
+ boolean isInsideImplicit)
+ {
+ this.isInsideImplicit = isInsideImplicit;
+ }
+
public DERObject getDERObject()
{
- return new DERTaggedObject(false, tag, obj);
+ if (obj.getDERObject() instanceof ASN1Sequence)
+ {
+ return new DERTaggedObject(true, tag, obj);
+ }
+ else
+ {
+ return new DERTaggedObject(false, tag, obj);
+ }
}
}