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