| | |
| | | import com.gitblit.utils.TimeUtils;
|
| | |
|
| | | public class MakeCertificate {
|
| | | |
| | |
|
| | | private static final String BC = org.bouncycastle.jce.provider.BouncyCastleProvider.PROVIDER_NAME;
|
| | |
|
| | | public static void main(String... args) {
|
| | |
| | | jc.usage();
|
| | | }
|
| | | File keystore = new File("keystore");
|
| | | generateSelfSignedCertificate(params.alias, keystore, params.storePassword, params.subject);
|
| | | generateSelfSignedCertificate(params.hostname, keystore, params.storePassword, params.subject);
|
| | | }
|
| | |
|
| | | public static void generateSelfSignedCertificate(String hostname, File keystore,
|
| | |
| | | private static class Params {
|
| | |
|
| | | private static final FileSettings FILESETTINGS = new FileSettings(Constants.PROPERTIES_FILE);
|
| | | |
| | | @Parameter(names = { "--alias" }, description = "Server alias", required = true)
|
| | | public String alias;
|
| | |
|
| | | @Parameter(names = { "--hostname" }, description = "Server Hostname", required = true)
|
| | | public String hostname;
|
| | |
|
| | | @Parameter(names = { "--subject" }, description = "Certificate subject", required = true)
|
| | | public String subject;
|