| | |
| | | package com.zy.system.entity.license; |
| | | |
| | | import com.core.common.Cools; |
| | | import de.schlichtherle.license.LicenseContent; |
| | | import de.schlichtherle.license.LicenseContentException; |
| | | import de.schlichtherle.license.LicenseManager; |
| | | import de.schlichtherle.license.LicenseNotary; |
| | | import de.schlichtherle.license.LicenseParam; |
| | | import de.schlichtherle.license.NoLicenseInstalledException; |
| | | import de.schlichtherle.license.*; |
| | | import de.schlichtherle.xml.GenericCertificate; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | |
| | | if(expectedCheckModel != null && serverCheckModel != null){ |
| | | //校验IP地址 |
| | | if(!checkIpAddress(expectedCheckModel.getIpAddress(),serverCheckModel.getIpAddress())){ |
| | | //throw new LicenseContentException("当前服务器的IP没在授权范围内"); |
| | | throw new LicenseContentException("当前服务器的IP没在授权范围内"); |
| | | } |
| | | |
| | | //校验Mac地址 |
| | | if(!checkIpAddress(expectedCheckModel.getMacAddress(),serverCheckModel.getMacAddress())){ |
| | | //throw new LicenseContentException("当前服务器的Mac地址没在授权范围内"); |
| | | throw new LicenseContentException("当前服务器的Mac地址没在授权范围内"); |
| | | } |
| | | |
| | | //校验主板序列号 |
| | |
| | | if (osName.startsWith("windows")) { |
| | | abstractServerInfos = new WindowsServerInfos(); |
| | | } else if (osName.startsWith("linux")) { |
| | | // abstractServerInfos = new LinuxServerInfos(); |
| | | abstractServerInfos = new LinuxServerInfos(); |
| | | }else{//其他服务器类型 |
| | | abstractServerInfos = new WindowsServerInfos(); |
| | | } |