Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/sun/security/tools/jarsigner/newsize7.sh
38854 views
#1# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.2# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3#4# This code is free software; you can redistribute it and/or modify it5# under the terms of the GNU General Public License version 2 only, as6# published by the Free Software Foundation.7#8# This code is distributed in the hope that it will be useful, but WITHOUT9# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11# version 2 for more details (a copy is included in the LICENSE file that12# accompanied this code).13#14# You should have received a copy of the GNU General Public License version15# 2 along with this work; if not, write to the Free Software Foundation,16# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17#18# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19# or visit www.oracle.com if you need additional information or have any20# questions.21#2223# @test24# @bug 656112625# @summary keytool should use larger default keysize for keypairs26#27# @run shell newsize7.sh2829# set a few environment variables so that the shell-script can run stand-alone30# in the source directory31if [ "${TESTSRC}" = "" ] ; then32TESTSRC="."33fi3435if [ "${TESTJAVA}" = "" ] ; then36JAVA_CMD=`which java`37TESTJAVA=`dirname $JAVA_CMD`/..38fi3940# set platform-dependent variables41OS=`uname -s`42case "$OS" in43Windows_* )44FS="\\"45;;46* )47FS="/"48;;49esac5051KSFILE=ns7.jks5253KT="${TESTJAVA}${FS}bin${FS}keytool -keystore ns7.jks -storepass changeit -keypass changeit -keyalg rsa"54JAR="${TESTJAVA}${FS}bin${FS}jar"55JS="${TESTJAVA}${FS}bin${FS}jarsigner -keystore ns7.jks -storepass changeit"5657rm ns7.*5859$KT -genkeypair -alias me -dname CN=Me6061touch ns7.txt62$JAR cvf ns7.jar ns7.txt6364$JS ns7.jar me65$JAR xvf ns7.jar6667grep SHA-256 META-INF/MANIFEST.MF || exit 168grep SHA-256 META-INF/ME.SF || exit 26970#rm -rf META-INF7172exit 0737475