ASN1EncodableVector roleSyntax = new ASN1EncodableVector();
roleSyntax.add(roleName);
// roleSyntax OID: 2.5.24.72
X509Attribute attributes = new X509Attribute("2.5.24.72",
new DERSequence(roleSyntax));
gen.addAttribute(attributes);
gen.setHolder(new AttributeCertificateHolder(iCert.getSubjectX500Principal()));
gen.setIssuer(new AttributeCertificateIssuer(new X509Principal("cn=test")));
gen.setNotBefore(new Date(System.currentTimeMillis() - 50000));