Fix to work for all tag classes
@@ -227,7 +227,7 @@ else if (item instanceof ASN1TaggedObject)
.writeBit(tagClass & BERTags.APPLICATION);
tag = taggedObject.getTagNo();
- item = taggedObject.getObject();
+ item = taggedObject.getBaseObject().toASN1Primitive();
}
else
{
