-
Notifications
You must be signed in to change notification settings - Fork 156
Exporting encrypted forms to CSV fails on macOS #79
Comments
@yanokwa In OS X Sierra (10. 12)version 10.12 and java version "1.8.0_73" the encrypted export fails with the following stack.
|
@yanokwa However, downloading JCE libraries and placing them in |
I had the chance to try this in a fresh macOS 10.12 (Sierra) VM and this is what I've learned. These days, Java does not come with macOS. So when you go to install Java, you are usually pointed to Oracle Java. Oracle Java is installed in two locations depending on if you choose to install the JRE or JDK.
The JRE allows you to double-click to open jars from the Finder and run Java in the browser, but the JRE does not come with the You don't need to install both the JDK and JRE because if you install the JDK, it will also install the JRE at the JRE location list above. You might have multiple JDKs. Check their locations with Briefcase will run fine with the JRE or the JDK, but to unencrypt forms, users must install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.
JCE is a zip file with two files
The "limited" versions of these files already exist in those locations, so it's easiest to rename them to *.bak and then install the "unlimited" versions. You must then reboot because the JRE only seems to load new jars on reboot. If you have the JDK, you must install the policy files in both locations. This is because the JRE is used when you double-click the jar, but the JDK is used when you run Briefcase from the command line. So, with that background, the reason why I've updated the docs at https://opendatakit.org/help/encrypted-forms and I have filed an issue upstream on brew to fix this at Homebrew/homebrew-cask#32720. |
Related to #65, exporting an encrypted CSV on macOS Sierra 10.12.3 with Java 1.8.0_121 fails with
Error decrypting:submission.xml.enc Cause: java.security.InvalidKeyException: Illegal key size
This is despite having the JCE installed (
brew cask install java jce-unlimited-strength-policy
). This is likely because the application is running from the JRE instead of the JDK. Maybe.The text was updated successfully, but these errors were encountered: