| .. | .. |
|---|
| 14 | 14 | |
|---|
| 15 | 15 | public class LicenseValidator { |
|---|
| 16 | 16 | |
|---|
| 17 | | - private static final Logger log = LogManager.getLogger(LicenseValidator.class); |
|---|
| 17 | + private static final Logger LOG = LogManager.getLogger(LicenseValidator.class); |
|---|
| 18 | 18 | |
|---|
| 19 | 19 | private static LicenseValidator singleton = new LicenseValidator(); |
|---|
| 20 | 20 | protected static byte[] LOGO_SECRET; |
|---|
| .. | .. |
|---|
| 23 | 23 | try { |
|---|
| 24 | 24 | LOGO_SECRET = "Logo ipsum s3cr3t test áíóú".getBytes("utf-8"); |
|---|
| 25 | 25 | } catch (UnsupportedEncodingException e) { |
|---|
| 26 | | - log.error("Unexpected error getting LOGO secret", e); |
|---|
| 26 | + LOG.error("Unexpected error getting LOGO secret", e); |
|---|
| 27 | 27 | } |
|---|
| 28 | 28 | } |
|---|
| 29 | 29 | |
|---|
| .. | .. |
|---|
| 43 | 43 | String shaLogo = LicUtils.sha256(IOUtils.toByteArray(is), LOGO_SECRET); |
|---|
| 44 | 44 | return shaLogo; |
|---|
| 45 | 45 | } catch (IOException e) { |
|---|
| 46 | | - log.warn("Customer logo was not found in images/logo_customer.png"); |
|---|
| 46 | + LOG.warn("Customer logo was not found in images/logo_customer.png"); |
|---|
| 47 | 47 | return null; |
|---|
| 48 | 48 | } |
|---|
| 49 | 49 | } |
|---|
| 50 | 50 | |
|---|
| 51 | 51 | public void validateLogo(RequestBean reqBean) throws SeCurisException { |
|---|
| 52 | 52 | if (reqBean.getCrcLogo() == null) { |
|---|
| 53 | | - log.info("Customer logo is not included in license file and won't be validated"); |
|---|
| 53 | + LOG.info("Customer logo is not included in license file and won't be validated"); |
|---|
| 54 | 54 | } else { |
|---|
| 55 | 55 | String currentCRC = getCrcLogo(); |
|---|
| 56 | 56 | if (!currentCRC.equals(reqBean.getCrcLogo())) |
|---|