public X509Certificate generateX509Certificate(PrivateKey key) throws SecurityException, SignatureException, InvalidKeyException {
  try {
    return generateX509Certificate(key,"BC",null);
  }
 catch (  NoSuchProviderException e) {
    throw new SecurityException("BC provider not installed!");
  }
}

public X509Certificate generateX509Certificate ( PrivateKey key ) throws SecurityException , SignatureException , InvalidKeyException { try { return generateX509Certificate ( key , "BC" , null ) ; } catch ( NoSuchProviderException e ) { throw new SecurityException ( "BC provider not installed!" ) ; } }
generate an x509 certificate , based on the current issuer and subject using the default provider " bc " .
