new GeneralName(new byte[] {1, 1, 1, 1}),
new GeneralName(8, "1.2.3.4444.55555")
};
GeneralNames sans = new GeneralNames(Arrays.asList(san));
Extension extension = new Extension("2.5.29.17", true, sans.getEncoded());
Extensions extensions = new Extensions();
extensions.addExtension(extension);
byte[] encoding = extensions.getEncoded();
Extensions.ASN1.decode(encoding);
TBSCertificate tbsCertificate = new TBSCertificate(version, serialNumber,
signature, issuer, validity, subject, subjectPublicKeyInfo,
issuerUniqueID, subjectUniqueID, extensions);