1 /* 2 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 import java.nio.file.Path; 25 import java.nio.file.Paths; 26 import jdk.jpackage.test.*; 27 28 /** 29 * Tests generation of dmg and pkg with --mac-sign and related arguments. 30 * Test will generate pkg and verifies its signature. It verifies that dmg 31 * is not signed, but app image inside dmg is signed. This test requires that 32 * the machine is configured with test certificate for 33 * "Developer ID Installer: jpackage.openjdk.java.net" in 34 * jpackagerTest keychain with 35 * always allowed access to this keychain for user which runs test. 36 * note: 37 * "jpackage.openjdk.java.net" can be over-ridden by systerm property 38 * "jpackage.mac.signing.key.user.name", and 39 * "jpackagerTest" can be over-ridden by system property 40 * "jpackage.mac.signing.keychain" 41 */ 42 43 /* 44 * @test 45 * @summary jpackage with --type pkg,dmg --mac-sign 46 * @library ../helpers | 1 /* 2 * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 */ 23 24 import java.nio.file.Path; 25 import jdk.jpackage.test.JPackageCommand; 26 import jdk.jpackage.test.PackageTest; 27 import jdk.jpackage.test.PackageType; 28 import jdk.jpackage.test.MacHelper; 29 import jdk.jpackage.test.TKit; 30 31 /** 32 * Tests generation of dmg and pkg with --mac-sign and related arguments. 33 * Test will generate pkg and verifies its signature. It verifies that dmg 34 * is not signed, but app image inside dmg is signed. This test requires that 35 * the machine is configured with test certificate for 36 * "Developer ID Installer: jpackage.openjdk.java.net" in 37 * jpackagerTest keychain with 38 * always allowed access to this keychain for user which runs test. 39 * note: 40 * "jpackage.openjdk.java.net" can be over-ridden by systerm property 41 * "jpackage.mac.signing.key.user.name", and 42 * "jpackagerTest" can be over-ridden by system property 43 * "jpackage.mac.signing.keychain" 44 */ 45 46 /* 47 * @test 48 * @summary jpackage with --type pkg,dmg --mac-sign 49 * @library ../helpers |