algId = new AlgorithmIdentifier(PKCSObjectIdentifiers.sha1WithRSAEncryption);
else
throw new CertificationAuthorityException("Signature algorithm "+algorithm+" is not supported.");
ASN1InputStream ais = new ASN1InputStream(subPubKey.getEncoded());
DERObject subPubkeyDerObj = ais.readObject();
SubjectPublicKeyInfo subPubKeyInfo = SubjectPublicKeyInfo.getInstance(subPubkeyDerObj);
// Create certificate generator and initialize fields
// Certificate version is v3
V3TBSCertificateGenerator v3certGen = new V3TBSCertificateGenerator();