rsanchez
2015-09-22 7d8713e88c7872b195f7e4d02ac4812536ae196b
src/main/java/net/curisit/securis/LicenseValidator.java
....@@ -61,8 +61,16 @@
6161 public void validateHW(RequestBean reqBean, String licTypeCode, String customerCode, String packCode) throws SeCurisException {
6262 RequestBean currentHW = ReqGenerator.getInstance().createRequest(licTypeCode, customerCode, packCode);
6363 if (!currentHW.match(reqBean)) {
64
- throw new SeCurisException("Current System info mismatch the License System info:\n Licensed: \n" + JsonUtils.toPrettyJSON(reqBean)
65
- + "\n Expected: \n" + JsonUtils.toPrettyJSON(currentHW));
64
+ throw new SeCurisException("Current System info mismatch the License System info:\n Licensed: \n"
65
+ + JsonUtils.toPrettyJSON(reqBean, RequestBean.class) + "\n Expected: \n" + JsonUtils.toPrettyJSON(currentHW));
66
+ }
67
+ }
68
+
69
+ public void validateHW(RequestBean reqBean, String appCode, String activationCode) throws SeCurisException {
70
+ RequestBean currentHW = ReqGenerator.getInstance().createRequest(appCode, activationCode);
71
+ if (!currentHW.match(reqBean)) {
72
+ throw new SeCurisException("Current System info mismatch the License System info:\n Licensed: \n"
73
+ + JsonUtils.toPrettyJSON(reqBean, RequestBean.class) + "\n Expected: \n" + JsonUtils.toPrettyJSON(currentHW));
6674 }
6775 }
6876