Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 291964

Summary: choosing java policy files (new eselect module?)
Product: Gentoo Linux Reporter: Marcin Mirosław <bug>
Component: Current packagesAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 449316    

Description Marcin Mirosław 2009-11-05 11:48:56 UTC
Installing e.g. dev-java/sun-jdk i'm getting with it limited strength policy files (/opt/sun-jdk-1.6.0.17/jre/lib/security/US_export_policy.jar and /opt/sun-jdk-1.6.0.17/jre/lib/security/local_policy.jar ). My application needs unlimited S.P.F. so i emerge dev-java/sun-jce-bin. This ebuild installs unlimited S.P.F. these files:
/opt/sun-jce-bin-1.6.0/jre/lib/security/unlimited-jce/US_export_policy.jar
/opt/sun-jce-bin-1.6.0/jre/lib/security/unlimited-jce/local_policy.jar

When i'm deploying jar i'm getting message "... java.lang.RuntimeException: AES 256 bit encryption NOT supported, make sure the unlimited strength policy files are installed."
The problem is in path where java is looking for policy file, it's looking in own home dir (/opt/sun-jdk-1.6.0.17/jre/lib/security/) not in /opt/sun-jce-bin-1.6.0/jre/lib/security/unlimited-jce .
My work around was make symlinks from /opt/sun-jdk.../... to /opt/sun-jce.../...
Then applications deploys correctly.
Maybe eselect could manage policy files? E.g changing symlinks target to preferable policy files?

Reproducible: Always
Comment 1 James Le Cuirot gentoo-dev 2017-05-10 22:47:03 UTC
This is no longer an issue as it is controlled with the jce USE flag against the JDK/JRE package itself.