diff --git a/dist/hap-sign-tool.jar b/dist/hap-sign-tool.jar index 367aae0bcd5466230c2459c7023bf63e11bf455b..9f50488e4ef97f3b333d003f56f171980c84ac70 100644 Binary files a/dist/hap-sign-tool.jar and b/dist/hap-sign-tool.jar differ diff --git a/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/profile/model/BundleInfo.java b/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/profile/model/BundleInfo.java index 11b1036d7f23aa10d1a1596d9230249e9f881f38..a274eff8530d66b149fbf872db48acdd4e690793 100644 --- a/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/profile/model/BundleInfo.java +++ b/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/profile/model/BundleInfo.java @@ -122,8 +122,6 @@ public class BundleInfo { * @param buildType build type */ public void enforceValid(String buildType) { - ValidateUtils.throwIfMatches(this.developerId == null, ERROR.SIGN_ERROR, - "Require developerId in bundleInfo!"); if (Provision.isBuildTypeRelease(buildType)) { ValidateUtils.throwIfMatches(this.distributionCertificate == null, ERROR.SIGN_ERROR, "Require cert in bundleInfo!"); @@ -131,10 +129,5 @@ public class BundleInfo { ValidateUtils.throwIfMatches(this.developmentCertificate == null, ERROR.SIGN_ERROR, "Require cert in bundleInfo!"); } - ValidateUtils.throwIfMatches(this.bundleName == null, ERROR.SIGN_ERROR, - "Require bundleName in bundleInfo!"); - ValidateUtils.throwIfMatches(this.appFeature == null || Provision.isAppDistTypeValid(this.appFeature), - ERROR.SIGN_ERROR, "Require appFeature be hos_system_app or hos_normal_app,curr is :" - + this.appFeature + " in bundleInfo!"); } } diff --git a/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/profile/model/Provision.java b/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/profile/model/Provision.java index 0e2f3c29c40eeae7b662241029ffc6eacd61548c..6feda36b98f40a7b1eb6271020e2355862ab4d9b 100644 --- a/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/profile/model/Provision.java +++ b/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/profile/model/Provision.java @@ -193,33 +193,12 @@ public class Provision { * @param provision provision */ public static void enforceValid(Provision provision) { - ValidateUtils.throwIfMatches(provision == null, ERROR.SIGN_ERROR, - "Require provision not empty!"); - ValidateUtils.throwIfMatches(provision.versionName == null, ERROR.SIGN_ERROR, - "Require provision version name!"); - ValidateUtils.throwIfMatches(provision.versionCode == 0, ERROR.SIGN_ERROR, - "Require provision version code!"); - ValidateUtils.throwIfMatches(provision.uuid == null, ERROR.SIGN_ERROR, - "Require provision uuid!"); ValidateUtils.throwIfMatches(provision.type == null || !isBuildTypeValid(provision.type), ERROR.SIGN_ERROR, "Require build type must be debug or release, current is :" + provision.type); - ValidateUtils.throwIfMatches(isBuildTypeRelease(provision.type) - && (provision.appDistributionType == null - || !isAppDistTypeValid(provision.appDistributionType)), ERROR.SIGN_ERROR, - "Require app distribution type must be one of app_gallery, " - + "enterprise or os_integration, current is " + provision.appDistributionType); ValidateUtils.throwIfMatches(provision.bundleInfo == null, ERROR.SIGN_ERROR, "Require bundleInfo in provision!"); provision.bundleInfo.enforceValid(provision.type); - ValidateUtils.throwIfMatches(provision.validity == null, ERROR.SIGN_ERROR, - "Require validity in provision!"); - provision.validity.enforceValid(); - if (provision.debuginfo != null) { - provision.debuginfo.enforceValid(); - } - ValidateUtils.throwIfMatches(provision.issuer == null, ERROR.SIGN_ERROR, - "Require issuer in provision!"); } public Integer getVersionCode() {