gen.setNotBefore(new Date(System.currentTimeMillis() - 50000));
gen.setNotAfter(new Date(System.currentTimeMillis() + 50000));
gen.setSerialNumber(BigInteger.valueOf(1));
gen.setSignatureAlgorithm("SHA1WithRSAEncryption");
Target targetName = new Target(Target.targetName, new GeneralName(GeneralName.dNSName,
"www.test.com"));
Target targetGroup = new Target(Target.targetGroup, new GeneralName(
GeneralName.directoryName, "o=Test, ou=Test"));
Target[] targets = new Target[2];
targets[0] = targetName;
targets[1] = targetGroup;
TargetInformation targetInformation = new TargetInformation(targets);