\r
import java.awt.BorderLayout;\r
import java.awt.Container;\r
+import java.awt.Desktop;\r
import java.awt.Dimension;\r
import java.awt.EventQueue;\r
import java.awt.FlowLayout;\r
import java.io.FileWriter;\r
import java.io.FilenameFilter;\r
import java.io.IOException;\r
+import java.net.URI;\r
import java.security.PrivateKey;\r
import java.security.cert.CertificateFactory;\r
import java.security.cert.X509Certificate;\r
\r
File caKeystore = new File(folder, X509Utils.CA_KEY_STORE);\r
if (!caKeystore.exists()) {\r
+ \r
+ if (!X509Utils.unlimitedStrength) {\r
+ // prompt to confirm user understands JCE Standard Strength encryption\r
+ int res = JOptionPane.showConfirmDialog(GitblitAuthority.this, Translation.get("gb.jceWarning"),\r
+ Translation.get("gb.warning"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\r
+ if (res != JOptionPane.YES_OPTION) {\r
+ if (Desktop.isDesktopSupported()) {\r
+ if (Desktop.getDesktop().isSupported(Desktop.Action.BROWSE)) {\r
+ try {\r
+ Desktop.getDesktop().browse(URI.create("http://www.oracle.com/technetwork/java/javase/downloads/index.html"));\r
+ } catch (IOException e) {\r
+ }\r
+ }\r
+ }\r
+ System.exit(1);\r
+ }\r
+ }\r
+ \r
// show certificate defaults dialog \r
certificateDefaultsButton.doClick();\r
\r
gb.pleaseGenerateClientCertificate = Please generate a client certificate for {0}\r
gb.clientCertificateBundleSent = Client certificate bundle for {0} sent\r
gb.enterKeystorePassword = Please enter the Gitblit keystore password\r
+gb.warning = warning\r
+gb.jceWarning = Your Java Runtime Environment does not have the \"JCE Unlimited Strength Jurisdiction Policy\" files.\nThis will limit the length of passwords you may use to encrypt your keystores to 7 characters.\nThese policy files are an optional download from Oracle.\n\nWould you like to continue and generate the certificate infrastructure anyway?\n\nAnswering No will direct your browser to Oracle's download page so that you may download the policy files.
\ No newline at end of file