라이센스 적용

JCE cannot authenticate the provider BC : unsigned entries

  1. checklist
    • OS : Window 7 Enterprise K (32bit)
    • WAS : Tomcat 8.0.x
    • license-api : 1.1.4
    • java : 1.7.x, 1.8.x
      2015-03-03 11:13:17,469 [localhost-startStop-1] TRACE com.poscoict.glueframework.util.license.GlueLicenseManager - D:\CONFIG_PATH\license_info_Development(4.2.x).xml
      2015-03-03 11:13:17,570 [localhost-startStop-1] ERROR com.poscoict.glueframework.util.license.GlueLicenseManager - Get LicenseAPI Fail!!
      java.lang.SecurityException: JCE cannot authenticate the provider BC
          at javax.crypto.Cipher.getInstance(Cipher.java:652) ~[na:1.8.0_25]
          at javax.crypto.Cipher.getInstance(Cipher.java:591) ~[na:1.8.0_25]
          at com.poscoict.license.util.LicenseAPICipher.decryptLicense(LicenseAPICipher.java:141) ~[license-api-1.1.4.jar:na]
          at com.poscoict.license.LicenseAPI.initializeInternal(LicenseAPI.java:111) ~[license-api-1.1.4.jar:na]
          at com.poscoict.license.LicenseAPI.initialize(LicenseAPI.java:78) ~[license-api-1.1.4.jar:na]
          at com.poscoict.glueframework.util.license.GlueLicenseManager.getLicenseAPI(GlueLicenseManager.java:91) ~[glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.context.GlueStaticContext.reloadLicense(GlueStaticContext.java:72) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.context.GlueStaticContext.<clinit>(GlueStaticContext.java:53) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.biz.control.GlueBizControllerImpl.<init>(GlueBizControllerImpl.java:62) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.biz.control.GlueBizControllerImpl.getController(GlueBizControllerImpl.java:79) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.biz.control.GlueBizProvider.getController(GlueBizProvider.java:28) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.app.security.web.GlueContextLoaderListener.contextInitialized(GlueContextLoaderListener.java:32) [security-manager.war:na]
          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4720) [catalina.jar:8.0.18]
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154) [catalina.jar:8.0.18]
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.18]
          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.18]
          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) [catalina.jar:8.0.18]
          at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917) [catalina.jar:8.0.18]
          at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701) [catalina.jar:8.0.18]
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_31]
          at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_31]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_31]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_31]
          at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31]
      Caused by: java.util.jar.JarException: jar:file:/D:/apache-tomcat-8.0.18/webapps/master-manager.war!/WEB-INF/lib/bcprov-jdk15-1.46.jar has unsigned entries - errorPage.jsp
          at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:464) ~[na:1.8.0_25]
          at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:322) ~[na:1.8.0_25]
          at javax.crypto.JarVerifier.verify(JarVerifier.java:250) ~[na:1.8.0_25]
          at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:160) ~[na:1.8.0_25]
          at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:186) ~[na:1.8.0_25]
          at javax.crypto.Cipher.getInstance(Cipher.java:648) ~[na:1.8.0_25]
          at javax.crypto.Cipher.getInstance(Cipher.java:591) ~[na:1.8.0_25]
          at com.poscoict.license.util.LicenseAPICipher.decryptLicense(LicenseAPICipher.java:141) ~[license-api-1.1.4.jar:na]
          at com.poscoict.license.LicenseAPI.initializeInternal(LicenseAPI.java:111) ~[license-api-1.1.4.jar:na]
          at com.poscoict.license.LicenseAPI.initialize(LicenseAPI.java:78) ~[license-api-1.1.4.jar:na]
          at com.poscoict.glueframework.util.license.GlueLicenseManager.getLicenseAPI(GlueLicenseManager.java:91) ~[glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.context.GlueStaticContext.reloadLicense(GlueStaticContext.java:72) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.context.GlueStaticContext.<clinit>(GlueStaticContext.java:53) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.app.glue.master.web.MasterSessionCheckFilter.init(MasterSessionCheckFilter.java:67) ~[na:na]
          at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279) ~[catalina.jar:8.0.18]
          at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260) ~[catalina.jar:8.0.18]
          at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105) ~[catalina.jar:8.0.18]
          at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4565) [catalina.jar:8.0.18]
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5180) [catalina.jar:8.0.18]
          ... 11 common frames omitted
      2015-03-03 11:13:17,571 [localhost-startStop-1] ERROR com.poscoict.glueframework.context.GlueStaticContext - invalid license!!
      
  2. try it
    • %JAVA_HOME% / jre / lib / ext 위치에 bcprov-jdk15-1.46.jar 를 추가한다.
      %JAVA_HOME% 에는 bin, jre, lib라는 하위 폴더가 있음.

JCE cannot authenticate the provider BC : Cannot parse

  1. checklist
    • OS : Window 7 Enterprise K (32bit)
    • WAS : Jboss EAP 6.3
    • license-api : 1.1.4
    • java : 1.6.x
      2015-03-03 16:45:39,468 [ServerService Thread Pool -- 68] TRACE com.poscoict.glueframework.util.license.GlueLicenseManager - D:\CONFIG_PATH\license_info_Development(4.2.x).xml
      2015-03-03 16:45:39,473 [ServerService Thread Pool -- 68] ERROR com.poscoict.glueframework.util.license.GlueLicenseManager - Get LicenseAPI Fail!!
      java.lang.SecurityException: JCE cannot authenticate the provider BC
          at javax.crypto.Cipher.getInstance(DashoA13*..) ~[na:1.6]
          at javax.crypto.Cipher.getInstance(DashoA13*..) ~[na:1.6]
          at com.poscoict.license.util.LicenseAPICipher.decryptLicense(LicenseAPICipher.java:141) ~[license-api-1.1.4.jar:na]
          at com.poscoict.license.LicenseAPI.initializeInternal(LicenseAPI.java:111) ~[license-api-1.1.4.jar:na]
          at com.poscoict.license.LicenseAPI.initialize(LicenseAPI.java:78) ~[license-api-1.1.4.jar:na]
          at com.poscoict.glueframework.util.license.GlueLicenseManager.getLicenseAPI(GlueLicenseManager.java:91) ~[glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.context.GlueStaticContext.reloadLicense(GlueStaticContext.java:72) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.context.GlueStaticContext.<clinit>(GlueStaticContext.java:53) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.biz.control.GlueBizControllerImpl.<init>(GlueBizControllerImpl.java:62) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.biz.control.GlueBizControllerImpl.getController(GlueBizControllerImpl.java:79) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.biz.control.GlueBizProvider.getController(GlueBizProvider.java:28) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.app.security.web.GlueContextLoaderListener.contextInitialized(GlueContextLoaderListener.java:32) [classes:na]
          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.4.8.Final-redhat-4.jar!/:7.4.8.Final-redhat-4]
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.4.8.Final-redhat-4.jar!/:7.4.8.Final-redhat-4]
          at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161) [jboss-as-web-7.4.0.Final-redhat-19.jar!/:7.4.0.Final-redhat-19]
          at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:59) [jboss-as-web-7.4.0.Final-redhat-19.jar!/:7.4.0.Final-redhat-19]
          at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:94) [jboss-as-web-7.4.0.Final-redhat-19.jar!/:7.4.0.Final-redhat-19]
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [na:1.6.0_45]
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_45]
          at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_45]
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [na:1.6.0_45]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [na:1.6.0_45]
          at java.lang.Thread.run(Thread.java:662) [na:1.6.0_45]
          at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final-redhat-1.jar!/:2.1.1.Final-redhat-1]
      Caused by: java.util.jar.JarException: Cannot parse vfs:/D:/jboss-eap-6.3/content/master-manager.war/WEB-INF/lib/bcprov-jdk15-1.46.jar
          at javax.crypto.SunJCE_c.a(DashoA13*..) ~[na:1.6]
          at javax.crypto.SunJCE_b.b(DashoA13*..) ~[na:1.6]
          at javax.crypto.SunJCE_b.a(DashoA13*..) ~[na:1.6]
          at javax.crypto.Cipher.getInstance(DashoA13*..) ~[na:1.6]
          at javax.crypto.Cipher.getInstance(DashoA13*..) ~[na:1.6]
          at com.poscoict.license.util.LicenseAPICipher.decryptLicense(LicenseAPICipher.java:141) ~[license-api-1.1.4.jar:na]
          at com.poscoict.license.LicenseAPI.initializeInternal(LicenseAPI.java:111) ~[license-api-1.1.4.jar:na]
          at com.poscoict.license.LicenseAPI.initialize(LicenseAPI.java:78) ~[license-api-1.1.4.jar:na]
          at com.poscoict.glueframework.util.license.GlueLicenseManager.getLicenseAPI(GlueLicenseManager.java:91) ~[glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.context.GlueStaticContext.reloadLicense(GlueStaticContext.java:72) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.glueframework.context.GlueStaticContext.<clinit>(GlueStaticContext.java:53) [glue-core-4.2.4-RELEASE.jar:na]
          at com.poscoict.app.glue.master.web.MasterSessionCheckFilter.init(MasterSessionCheckFilter.java:67) ~[na:na]
          at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:416) ~[jbossweb-7.4.8.Final-redhat-4.jar!/:7.4.8.Final-redhat-4]
          at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3225) [jbossweb-7.4.8.Final-redhat-4.jar!/:7.4.8.Final-redhat-4]
          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3791) [jbossweb-7.4.8.Final-redhat-4.jar!/:7.4.8.Final-redhat-4]
          ... 10 common frames omitted
      2015-03-03 16:45:39,473 [ServerService Thread Pool -- 68] ERROR com.poscoict.glueframework.context.GlueStaticContext - invalid license!!
      
  2. try it
    • Global module에 bcprov-jdk15-1.46.jar 를 등록한다.

      - 디렉토리 생성 : WAS_HOME /modules/system/layers/base/org/bouncycastle/main

      - 해당 디렉토리에 BouncyCastle 라이브러리(bcprov-jdk15-1.46.jar) 복사

      - 해당 디렉토리에module.xml 생성

      <?xml version="1.0" encoding="UTF-8"?>
      <module xmlns="urn:jboss:module:1.1" name="org.bouncycastle" slot="main">
          <resources>
              <resource-root path="bcprov-jdk15-1.46.jar"/>
          </resources>
          <dependencies>
              <module name="javax.api" export="true"/>
          </dependencies>
      </module>
      

      - 관리콘솔 (http://127.0.0.1:8080/console) 을 통해 Global Modules 추가 : Configuration > Subsystems > Container > EE