How do I get javax.crypto classes such as javax.crypto.Cipher to work on a servlet with jboss?

后端 未结 2 563
北荒
北荒 2021-01-26 06:53

My application validates a license file in order for it to work. It does this by calling javax.crypto.Cipher.getInstance(\"DES\",\"SunJCE\") inorder to decipher the license key

2条回答
  •  情话喂你
    2021-01-26 07:16

    There are a couple of possible issues that come in mind, it seems to be a problem with classpath when sun/oracle jvm try to authenticate provider jars

    • check that all security jars are under the /jre/lib/ext of the jvm that runs jboss (ie US_export_policy.jar, sunjce_provider.jar, local_policy.jar....)

    • about US_export_policy.jar and local_policy.jar be sure to have downloaded the unrestricted version

    • java.security file in /jre/lib/security: be sure to have a line similar to security.provider.X=com.sun.crypto.provider.SunJCE where X is a number

    • be sure that sunJCE provider jar is not in you WEB-INF/lib

提交回复
热议问题