Resolving Problems installing the Java JCE Unlimited Strength Jurisdiction Policy Files package--转

原文地址:https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.tec1698523.html

Introduction/Summary: 

The base Java JVM and SDK installs from Oracle are limited in strength for the cryptographic functions that they can perform.  Oracle also provide a patch the "Java  JCE Unlimited Strength Jurisdiction Policy Files" patch which when applied to the base JDK or JVM install allows for unlimited strength cryptographic functions.

Background:  

Although the patch is a simple zip file there are often problems associated with installing it and installing it in the right location.  This article covers how to do the install of the patch, and also some of the mis-install pitfalls that can occur.

Environment:  

all (windows, linux, solaris)

Instructions: 

  1. Have an existing Java JRE or JDK Installation. 
    First you will need a Java, either the Java Runtime (JVM) or the Java Development KIt (JDK) installation. 
    Many of the Siteminder (SSO) components require a specific 32bit rather than a 64bit version of the JDK/JRE so it is worth verifying you have the correct one installed.
  2. Download the "JCE Unlimited Strength Jurisdiction Policy Files" 
    The "JCE Unlimited Strength Jurisdiction Policy Files" are available as a .zip file from :

    http://www.oracle.com/technetwork/java/javase/downloads/index.html

    Only the version is applicable (ie., the one jce_policy-8.zip applies to both the 32bit and 64bit editions of java 8 ) .

    The version of the Jurisdiction file depends on the version of Java you have installed, as per:

    • Java 8 : jce_policy-8.zip
    • Java 7 : UnlimitedJCEPolicyJDK7.zip
    • Java 6 : jce-policy-6.zip
    • etc.
  3. The contents of the  .zip file:

    The zip file contain two jar files : local_policy.jar, US_export_policy.jar a README.txt and a COPYRIGHT.html file


     
    The two .jar files are the important ones.

  4. Determine the version of java to install the .jar files 

    We need to apply these .jar files into the actual JDK that is being run.

    As well as 64bit and 32bit version of java, appearing under directories C:\Program Files\Java and C:\Program Files (x86)\  respectively, a user may also have several minor versions of java installed and both JRE and JDK‘s installed.   The same is true of Unix/Linux installs as well.

    Note: There are two directories, both a JDK and a JRE directory:  jdk1.6.0_37 and jre6 both have an embedded jre and it is good policy to update both. 
    Note2: There can also be several JDK/JRE versions installed - not necessarily in the expected directories.

    Technically we only need to update the one that we are going to run, but it is good policy to update both the JDK and JRE, and a number of support cases have been solved because the JDK/JRE version being run was not the expected one, and solved once the correct version was updated.

    Below we cover updating the JDK and the JRE. 
     

  5. Update the distribution policy  .jar files in the JDK distribution.

    We need to copy the two .jar files from the "JCE Unlimited Strength Jurisdiction Policy Files" zip file, and replace the ones in the JDK distribution of the JRE. : /jdk1.6.0_37/jre/lib/security directories.

    Note: Make sure you replace the .jar files.  There have been cases where the .zip file was uncompressed from the cmd line, and the new  .jar files were left in a sub-directory, rather than replacing the existing ones. This can easily be done on unix systems. 

  6. Update the distribution policy  .jar files in the JRE distribution.

    We need to copy the two .jar files from the "JCE Unlimited Strength Jurisdiction Policy Files" zip file, and replace the ones in the distribution for the JRE distribution  /jre6/lib/security directories.

  7. How can I check they have been installed correctly?

    Fails with Strong Crypto operations:
    If it is not correctly installed the main problem will be that strong cryptography will be disabled usually giving an error when you want to use it.

    Add -verbose to java startup:
    If you add "-verbose" to the java startup printed to stdout will be a list of the absolute path to the .jar file where it loads each .class file.  This is also useful to determine which JDK/JRE is actually loaded, so you can ensure you‘ve patched the right version.

    Some programs will also check at their startup and tell you if Unlimited Cryptography  is available.

  8. Program to Check if installed Correctly

    Attached to this article is a simple java program that will check if unlimited strength cryptography is enabled.  The core function is as follows:

    Where it gets the max length of the key allowed for AES encryption and compares that to the unlimited number (Integer.MAX_VALUE).

Additional Information:

Within CA Single Sign On, as well as install of the "Unlimited Strength Jurisdiction Policy Files" there can be issued with installing the RSA JSafe components cryptoj.jar and cryptoJFIPS.jar - these will be the topic of another knowledge base article.

时间: 2024-07-30 22:55:22

Resolving Problems installing the Java JCE Unlimited Strength Jurisdiction Policy Files package--转的相关文章

java.lang.SecurityException: The jurisdiction policy files are not signed by a trusted signer!

解决:主要是因为加密文件的版本和jdk的版本加密文件不相同.查看主类(local_policy.jar,US_export_policy.jar)和jdk的加密文件的版本不相同. 参考:http://stackoverflow.com/questions/9745193/java-lang- securityexception-the-jurisdiction-policy-files-are-not-signed-by-a-t http://stackoverflow.com/question

转:JAVA.NET.SOCKETEXCEPTION: TOO MANY OPEN FILES解决方法

最近随着网站访问量的提高把web服务器移到linux下了,在移服务器的第二天,tomcat频繁的报 java.net.SocketException: Too many open files错误,错误日志达到了100多兆,郁闷了,windows上运行了很长 时间都没出现这个错误,后来才知道linux对进程的打开文件数是有限制的. 用命令ulimit -a查看 [[email protected] security]# ulimit -acore file size        (blocks,

JAVA.NET.SOCKETEXCEPTION: TOO MANY OPEN FILES解决方法

最近随着网站访问量的提高把web服务器移到linux下了,在移服务器的第二天,tomcat频繁的报 java.net.SocketException: Too many open files错误,错误日志达到了100多兆,郁闷了,windows上运行了很长 时间都没出现这个错误,后来才知道linux对进程的打开文件数是有限制的. 用命令ulimit -a查看 [root@test security]# ulimit -a core file size        (blocks, -c) 0

java.net.SocketException: Too many open files

今天tomcat在跑任务时发现每次都有报错java.net.SocketException: Too many open files, 通过查阅文档发现是当时做系统初始化操作时忘了设置ulimit值,以至于一直使用默认值1024. 于是马上修改配置文件 echo  "* soft nofile 200000">>/etc/security/limits.conf echo  "* hard nofile 200000" >>/etc/secu

java.io.IOException: Too many open files

打开的文件过多,一般来说是由于应用程序对资源使用不当造成,比如没有及时关闭Socket或数据库连接等.但也可能应用确实需要打开比较多的文件句柄,而系统本身的设置限制了这一数量. 异常 1  java.net.SocketException: Too many open files at java.net.PlainSocketImpl.accept(Compiled Code)     at java.net.ServerSocket.implAccept(Compiled Code)    

Linux上Tomcat访问异常java.net.SocketException: Too many open files

tomcat部署在Linux系统上,访问出现异常:java.net.SocketException: Too many open files 原因:对文件的打开个数超过系统默认上限 利用命令ulimit -a可以看到系统默认open file设置为1024 处理方法: 1.在/etc/pam.d/login文件中添加 session    required     /usr/lib64/security/pam_limits.so 注:64位系统为/usr/lib64/security/pam_

Java之旅_面向对象_包(Package)

http://www.runoob.com/java/java-package.html 包的作用: 1.把功能相似或相关的类或接口组织在同一个包中,方便类的查找和使用. 2.如同文件夹一样,包也采用了树形目录的存储方式.同一包中类名是不同的,不同包中的类名是可以相同的. 当调用相同名字的类时,应该加上包名,包可以避免名字冲突. 3.包也有访问权限,拥有包访问权限的类才能访问. Java使用包(package)这种机制是为了防止命名冲突,访问控制,提供搜索和定位类.接口.枚举.和注释等. pac

Java直接用javac来编译带package的类

在没有package语句的java类, 我们可以直接使用: javac Test.java 就可以了, 如果Test.java中包含package语句,如:package abc; 编译后,是要求Test.class文件放在abc目录下的 所以这时候就又两种方法达到目的: 1.笨方法,先直接编译Test.java 1.1. javac Test.java 1.2. 然后手动去创建abc目录 1.3. 再把Test.class文件拷贝到abc目录下 2.使用 javac -d 目标目录 类名 eg

java.io.FileNotFoundException: ***(Too many open files)

http://yizhilong28.iteye.com/blog/1154098 在linux下跑一个多线程读取文件的程序,待读取文件有数十万个.程序读取过程中抛出如下异常*****(Too many open files). 原因是由于linux限制了一次会话中,程序最大同时打开文件数目.在redhat5中,该数值为1024.可以使用ulimit -n 验证. 解决办法 1.临时修改该数值,可使用 Java代码 ulimit -n XXXX