From certificate Alias to PEM File with private key included using Java
问题 I have this code to generate a CER file using the alias: public class TestFromAliasToCER { public static final int KEY_SIZE = 1024; public static final String BEGIN_CERT = "-----BEGIN CERTIFICATE-----"; public static final String END_CERT = "-----END CERTIFICATE-----"; public final static String LINE_SEPARATOR = System.getProperty("line.separator"); public static void main(String[] args) throws FileNotFoundException, IOException, NoSuchAlgorithmException, NoSuchProviderException,