< prev index next >

test/sun/security/tools/jarsigner/TsacertOptionTest.java

Print this page




  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 jdk.testlibrary.OutputAnalyzer;
  25 import jdk.testlibrary.ProcessTools;
  26 import jdk.testlibrary.JarUtils;
  27 
  28 /**
  29  * @test
  30  * @bug 8024302 8026037
  31  * @summary The test signs and verifies a jar file with -tsacert option
  32  * @library /lib/testlibrary






  33  * @run main TsacertOptionTest
  34  */
  35 public class TsacertOptionTest {
  36 
  37     private static final String FS = System.getProperty("file.separator");
  38     private static final String JAVA_HOME = System.getProperty("java.home");
  39     private static final String KEYTOOL = JAVA_HOME + FS + "bin" + FS
  40             + "keytool";
  41     private static final String JARSIGNER = JAVA_HOME + FS + "bin" + FS
  42             + "jarsigner";
  43     private static final String UNSIGNED_JARFILE = "unsigned.jar";
  44     private static final String SIGNED_JARFILE = "signed.jar";
  45     private static final String FILENAME = TsacertOptionTest.class.getName()
  46             + ".txt";
  47     private static final String PASSWORD = "changeit";
  48     private static final String KEYSTORE = "ks.jks";
  49     private static final String SIGNING_KEY_ALIAS = "sign_alias";
  50     private static final String TSA_KEY_ALIAS = "ts";
  51     private static final String KEY_ALG = "RSA";
  52     private static final int KEY_SIZE = 2048;




  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 jdk.testlibrary.OutputAnalyzer;
  25 import jdk.testlibrary.ProcessTools;
  26 import jdk.testlibrary.JarUtils;
  27 
  28 /**
  29  * @test
  30  * @bug 8024302 8026037
  31  * @summary The test signs and verifies a jar file with -tsacert option
  32  * @library /lib/testlibrary
  33  * @modules java.base/sun.misc
  34  *          java.base/sun.security.pkcs
  35  *          java.base/sun.security.timestamp
  36  *          java.base/sun.security.util
  37  *          java.base/sun.security.x509
  38  *          java.management
  39  * @run main TsacertOptionTest
  40  */
  41 public class TsacertOptionTest {
  42 
  43     private static final String FS = System.getProperty("file.separator");
  44     private static final String JAVA_HOME = System.getProperty("java.home");
  45     private static final String KEYTOOL = JAVA_HOME + FS + "bin" + FS
  46             + "keytool";
  47     private static final String JARSIGNER = JAVA_HOME + FS + "bin" + FS
  48             + "jarsigner";
  49     private static final String UNSIGNED_JARFILE = "unsigned.jar";
  50     private static final String SIGNED_JARFILE = "signed.jar";
  51     private static final String FILENAME = TsacertOptionTest.class.getName()
  52             + ".txt";
  53     private static final String PASSWORD = "changeit";
  54     private static final String KEYSTORE = "ks.jks";
  55     private static final String SIGNING_KEY_ALIAS = "sign_alias";
  56     private static final String TSA_KEY_ALIAS = "ts";
  57     private static final String KEY_ALG = "RSA";
  58     private static final int KEY_SIZE = 2048;


< prev index next >