< prev index next >
test/jdk/tools/jpackage/macosx/base/SigningBase.java
Print this page
@@ -71,21 +71,30 @@
private static List<String> spctlResult(Path target, String type) {
List<String> result = new Executor()
.setExecutable("/usr/sbin/spctl")
.addArguments("-vvv", "--assess", "--type", type,
target.toString())
- .executeAndGetOutput();
+ // on Catalina, the exit code can be 3, meaning not notarized
+ .saveOutput()
+ .executeWithoutExitCodeCheck()
+ .getOutput();
return result;
}
private static void verifySpctlResult(List<String> result, Path target, String type) {
result.stream().forEachOrdered(TKit::trace);
- String lookupString = target.toString() + ": accepted";
+ String lookupString;
+/* on Catalina, spctl may return 3 and say:
+ * target: rejected
+ * source=Unnotarized DEV_NAME
+ * so we must skip these two checks
+ lookupString = target.toString() + ": accepted";
checkString(result, lookupString);
lookupString = "source=" + DEV_NAME;
checkString(result, lookupString);
+ */
if (type.equals("install")) {
lookupString = "origin=" + INSTALLER_CERT;
} else {
lookupString = "origin=" + APP_CERT;
}
< prev index next >