GeneralName tsa = new GeneralName(new Name("CN=AnAuthority"));
Extensions exts = new Extensions();
// Time-Stamping extension OID: as defined in RFC 3161
int[] timeStampingExtOID = new int[] { 1, 3, 6, 1, 5, 5, 7, 3, 8 };
byte[] timeStampingExtValue = new byte[] { (byte) 1, (byte) 2, (byte) 3 };
Extension ext = new Extension(timeStampingExtOID, true,
timeStampingExtValue);
exts.addExtension(ext);
TSTInfo tSTInfo = new TSTInfo(1, policy, msgImprint, BigInteger.TEN,
genTime, accuracy, Boolean.FALSE, nonce, tsa, exts);