라이센스 적용

  1. JCE cannot authenticate the provider BC : unsigned entries

  2. JCE cannot authenticate the provider BC : Cannot parse

  3. All NIC card's mac address are invalid!! Please check License file!!!

  4. javax.crypto.BadPaddingException: unknown block type

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

All NIC card's mac address are invalid!! Please check License file!!!

  1. checklist
    • java : 1.6.x +
    • license-api : 1.1.4
  2. try it
    • mac address 를 확인해서, license_info_name.xml 의 것과 비교한다.
      import java.net.NetworkInterface;
      import java.net.SocketException;
      import java.util.ArrayList;
      import java.util.Enumeration;
      import java.util.List;
      
      public class MacAddressCheck
      {
          public static void main( String[] args ) throws SocketException
          {
              System.out.println("start 1");
              Enumeration<NetworkInterface> networkInterfaces = NetworkInterface.getNetworkInterfaces();
              while ( networkInterfaces.hasMoreElements() ) 
              {
                  NetworkInterface networkInterface = networkInterfaces.nextElement();
      
                  if ( ( networkInterface != null ) && ( networkInterface.getHardwareAddress() != null ) ) 
                  {
                      if ( networkInterface.getInetAddresses().hasMoreElements() && networkInterface.supportsMulticast() ) 
                      {
                          byte[] byteMacAddress = networkInterface.getHardwareAddress();
                          if ( byteMacAddress.length > 0 ) 
                          {
                              String macAddress = "";
                              if ( byteMacAddress != null ) 
                              {
                                  for ( int i = 0; i < byteMacAddress.length; i++ ) 
                                  {
                                      macAddress += String.format( "%02X%s", byteMacAddress[i], ( i < ( byteMacAddress.length - 1 ) ) ? "-" : "" );
                                  }
                              }
                              System.out.println(macAddress);
                          }
                      }
                  }
              }
              System.out.println("end 1");
          }
      }
      
      check mac address
      <?xml version="1.0" encoding="UTF-8"?>
      <poscoict-license xmlns="http://www.poscoict.com/license">
          <solutionName>Glue</solutionName>
          <companyName>POSCO_EPLite</companyName>
          <projectName>EPLite</projectName>
          <licenseMode>Product</licenseMode>
          <expireDate/>
          <macAddress>00-50-56-91-65-A1,00-50-56-91-65-A3</macAddress>
          <licenseKey>EPLite-Product(4.2.x).license</licenseKey>
      </poscoict-license>
      

javax.crypto.BadPaddingException: unknown block type

  1. checklist
    • java : 1.6.x +
    • license-api : 1.1.4 +
      15:45:10.472 [main] ERROR com.poscoict.glueframework.util.license.GlueLicenseManager - Get LicenseAPI Fail!!
      javax.crypto.BadPaddingException: unknown block type
          at org.bouncycastle.jce.provider.JCERSACipher.engineDoFinal(Unknown Source) ~[bcprov-jdk15-1.46.jar:1.46.0]
          at javax.crypto.Cipher.doFinal(DashoA13*..) ~[na:1.6]
          at com.poscoict.license.util.LicenseAPICipher.processCipher(LicenseAPICipher.java:170) ~[license-api-1.1.5.jar:na]
          at com.poscoict.license.util.LicenseAPICipher.decryptLicense(LicenseAPICipher.java:144) ~[license-api-1.1.5.jar:na]
          at com.poscoict.license.LicenseAPI.initializeInternal(LicenseAPI.java:112) ~[license-api-1.1.5.jar:na]
          at com.poscoict.license.LicenseAPI.initialize(LicenseAPI.java:79) ~[license-api-1.1.5.jar:na]
          at com.poscoict.glueframework.util.license.GlueLicenseManager.getLicenseAPI(GlueLicenseManager.java:92) ~[classes/:na]
          at com.poscoict.glueframework.context.GlueStaticContext.reloadLicense(GlueStaticContext.java:72) [classes/:na]
          at junit.GlueLicenseManagerTest.checkLicense_b7(GlueLicenseManagerTest.java:219) [test-classes/:na]
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_45]
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_45]
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_45]
          at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_45]
          at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) [junit-4.11.jar:na]
          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.11.jar:na]
          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) [junit-4.11.jar:na]
          at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) [junit-4.11.jar:na]
          at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit-4.11.jar:na]
          at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168) [junit-4.11.jar:na]
          at org.junit.rules.RunRules.evaluate(RunRules.java:20) [junit-4.11.jar:na]
          at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) [junit-4.11.jar:na]
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) [junit-4.11.jar:na]
          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) [junit-4.11.jar:na]
          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) [junit-4.11.jar:na]
          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) [junit-4.11.jar:na]
          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) [junit-4.11.jar:na]
          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) [junit-4.11.jar:na]
          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) [junit-4.11.jar:na]
          at org.junit.runners.ParentRunner.run(ParentRunner.java:309) [junit-4.11.jar:na]
          at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) [surefire-junit4-2.17.jar:2.17]
          at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) [surefire-junit4-2.17.jar:2.17]
          at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) [surefire-junit4-2.17.jar:2.17]
          at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) [surefire-booter-2.17.jar:2.17]
          at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) [surefire-booter-2.17.jar:2.17]
          at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) [surefire-booter-2.17.jar:2.17]
      15:45:10.472 [main] ERROR com.poscoict.glueframework.context.GlueStaticContext - invalid license!!
      
  2. try it

    유효한 라이센스가 아닙니다.