无法为com.adobe.adept.client.XMLUtil设置可信CA的证书

时间:2012-05-07 09:22:28

标签: java adobe policy jce

我有下一个异常::

 Exception in thread "main" java.lang.ExceptionInInitializerError
     at javax.crypto.Mac.getInstance(DashoA13*..)
     at com.adobe.adept.client.XMLUtil.createHMAC(XMLUtil.java:815)
     at com.adobe.adept.client.XMLUtil.hmac(XMLUtil.java:788)
     at com.adobe.adept.upload.UploadTest.makeContent(UploadTest.java:1454)
     at com.adobe.adept.upload.UploadTest.<init>(UploadTest.java:1769)
     at com.adobe.adept.upload.UploadTest.main(UploadTest.java:1806) Caused
 by: java.lang.SecurityException: Cannot set up certs for trusted CAs
     at javax.crypto.SunJCE_b.<clinit>(DashoA13*..)
     ... 6 more Caused by: java.lang.SecurityException: Cannot locate policy or framework files!
     at javax.crypto.SunJCE_b.i(DashoA13*..)
     at javax.crypto.SunJCE_b.g(DashoA13*..)
     at javax.crypto.SunJCE_b$1.run(DashoA13*..)
     at java.security.AccessController.doPrivileged(Native Method)
     ... 7 more

它正在线上发生:

 Mac mac = Mac.getInstance("HmacSHA1");

我尝试了下一个解决方案:   - NoSuchAlgorithmException: Algorithm HmacSHA1 not available - 我的本地java.security文件处于实际状态
  - https://forums.oracle.com/forums/thread.jspa?threadID=316839

可能有人有其他想法吗?

1 个答案:

答案 0 :(得分:0)

固定。问题出现在我的代码中,我无法使用:

System.setProperties(props);

其中道具 - 配置文件的属性