ExtendedKeyUsage eku = new ExtendedKeyUsage(usage);
extgen.addExtension(X509Extensions.ExtendedKeyUsage, false, eku);
// OcspNoCheck
extgen.addExtension(OCSPObjectIdentifiers.id_pkix_ocsp_nocheck, false, new DERNull());
// Netscape cert type
extgen.addExtension(new DERObjectIdentifier("2.16.840.1.113730.1.1"), false, new NetscapeCertType(NetscapeCertType.objectSigningCA));
// My completely own
extgen.addExtension(new DERObjectIdentifier("1.1.1.1.1"), false, new DERIA5String("PrimeKey"));
// Make the complete extension package
X509Extensions exts = extgen.generate();