< prev index next >

test/jdk/tools/jpackage/macosx/base/SigningBase.java

Print this page

        

*** 71,91 **** 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(); return result; } private static void verifySpctlResult(List<String> result, Path target, String type) { result.stream().forEachOrdered(TKit::trace); ! String 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; } --- 71,100 ---- 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()) ! // 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; ! /* 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 >