From: Marco Zanon Date: Sun, 3 Mar 2024 13:57:52 +0000 (+0000) Subject: Fixed a bug in the license verification. X-Git-Tag: SVN-to-Git~6 X-Git-Url: https://gitweb.marcozanon.com/?a=commitdiff_plain;h=64407b58b0fe091d78049d567fdbd6b8bd691b6f;p=Macaco Fixed a bug in the license verification. --- diff --git a/10.x/CHANGELOG b/10.x/CHANGELOG index afc8059..3ee85bf 100644 --- a/10.x/CHANGELOG +++ b/10.x/CHANGELOG @@ -2,6 +2,11 @@ Macaco Copyright (c) 2009-2024 Marco Zanon . See LICENSE for details. +------------------- +10.0.1 (2024-03-03) +------------------- +* Fixed a bug in the license verification. + =================== 10.0.0 (2024-03-02) =================== diff --git a/10.x/src/main/java/com/marcozanon/macaco/licensing/MLicenseManager.java b/10.x/src/main/java/com/marcozanon/macaco/licensing/MLicenseManager.java index f99df29..50e9ab0 100644 --- a/10.x/src/main/java/com/marcozanon/macaco/licensing/MLicenseManager.java +++ b/10.x/src/main/java/com/marcozanon/macaco/licensing/MLicenseManager.java @@ -143,7 +143,9 @@ public class MLicenseManager { Signature signature = Signature.getInstance("SHA256withRSA"); signature.initVerify​(publicKey); signature.update(licenseDataHashContent); - signature.verify(licenseDataSignatureContent); + if (!signature.verify(licenseDataSignatureContent)) { + return null; + } // return license; }