docs: public static X509Certificate newX509Certificate(final PublicKey publicKey,
  		final PrivateKey privateKey, final BigInteger serialNumber, final String subject,
  		final String issuer, final String signatureAlgorithm, final Date start, final Date end)
  		throws CertificateEncodingException, InvalidKeyException, IllegalStateException,
  		NoSuchAlgorithmException, SignatureException
  
  	{
  		final X500Principal subjectPrincipal = new X500Principal(subject);
  		final X500Principal issuerPrincipal = new X500Principal(issuer);
  		final X509V3CertificateGenerator certificateGenerator = new X509V3CertificateGenerator();
  		certificateGenerator.setPublicKey(publicKey);
  		certificateGenerator.setSerialNumber(serialNumber);
  		certificateGenerator.setSubjectDN(subjectPrincipal);
  		certificateGenerator.setIssuerDN(issuerPrincipal);
  		certificateGenerator.setNotBefore(start);
  		certificateGenerator.setNotAfter(end);
  		certificateGenerator.setSignatureAlgorithm(signatureAlgorithm);
  		final X509Certificate certificate = certificateGenerator.generate(privateKey);
  		return certificate;
  	}