Created
January 25, 2013 06:59
-
-
Save johndouthat/4632397 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler' | |
Bundler.setup | |
Bundler.require | |
key = OpenSSL::Digest::SHA256.new('password').digest | |
crypt = ActiveSupport::MessageEncryptor.new(key) | |
encrypted_data = crypt.encrypt_and_sign('my secret data') | |
# throws CipherError Illegal key size: possibly you need to install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files for your JRE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rails', '4.0.0.beta', github: 'rails/rails', | |
:ref => '8a39d8331114c73805d5ce989a72763d23bc55b1' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
john@ubuntu:~/code/rails-8534$ ll ~/*.jar | |
-rw-rw-r-- 1 john john 2500 Jan 24 20:23 /home/john/local_policy.jar | |
-rw-rw-r-- 1 john john 2487 Jan 24 20:23 /home/john/US_export_policy.jar | |
john@ubuntu:~/code/rails-8534$ JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::") | |
john@ubuntu:~/code/rails-8534$ echo $JAVA_HOME | |
/usr/lib/jvm/java-7-oracle/jre/ | |
john@ubuntu:~/code/rails-8534$ ll $JAVA_HOME/lib/security | |
total 132 | |
drwxr-xr-x 2 root root 4096 Jan 24 19:55 ./ | |
drwxr-xr-x 16 root root 4096 Jan 24 19:55 ../ | |
-rw-r--r-- 1 root root 2063 Jan 24 19:55 blacklist | |
-rw-r--r-- 1 root root 83581 Jan 24 19:55 cacerts | |
-rw-r--r-- 1 root root 158 Jan 24 19:55 javafx.policy | |
-rw-r--r-- 1 root root 2254 Jan 24 19:55 java.policy | |
-rw-r--r-- 1 root root 15203 Jan 24 19:55 java.security | |
-rw-r--r-- 1 root root 98 Jan 24 19:55 javaws.policy | |
-rw-r--r-- 1 root root 2971 Jan 24 19:55 local_policy.jar | |
-rw-r--r-- 1 root root 0 Jan 24 19:55 trusted.libraries | |
-rw-r--r-- 1 root root 2487 Jan 24 19:55 US_export_policy.jar | |
john@ubuntu:~/code/rails-8534$ sudo cp ~/*.jar $JAVA_HOME/lib/security/ | |
[sudo] password for john: | |
john@ubuntu:~/code/rails-8534$ ruby 7035.rb | |
john@ubuntu:~/code/rails-8534$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
john@ubuntu:~/code/rails-8534$ ruby -v | |
jruby 1.7.3.dev (1.9.3p327) 2013-01-24 cc9acba on Java HotSpot(TM) 64-Bit Server VM 1.7.0_11-b21 +indy [linux-amd64] | |
john@ubuntu:~/code/rails-8534$ ruby 7035.rb | |
OpenSSL::Cipher::CipherError: Illegal key size: possibly you need to install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files for your JRE | |
update at org/jruby/ext/openssl/Cipher.java:684 | |
_encrypt at /home/john/code/jruby/lib/ruby/gems/shared/bundler/gems/rails-8a39d8331114/activesupport/lib/active_support/message_encryptor.rb:75 | |
encrypt_and_sign at /home/john/code/jruby/lib/ruby/gems/shared/bundler/gems/rails-8a39d8331114/activesupport/lib/active_support/message_encryptor.rb:55 | |
(root) at 7035.rb:7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment