ByteArrayOutputStream bOut = new ByteArrayOutputStream();
BerSequenceGenerator seqGen1 = new BerSequenceGenerator(bOut);
seqGen1.addObject(new Asn1Integer(BigInteger.valueOf(0)));
seqGen1.addObject(new Asn1ObjectIdentifier("1.1"));
DerSequenceGenerator seqGen2 = new DerSequenceGenerator(seqGen1.getRawOutputStream());
seqGen2.addObject(new Asn1Integer(BigInteger.valueOf(1)));