SecretKeyKS.sh revision 0
157N/A#
542N/A# Copyright 2002 Sun Microsystems, Inc. All Rights Reserved.
157N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
157N/A#
157N/A# This code is free software; you can redistribute it and/or modify it
157N/A# under the terms of the GNU General Public License version 2 only, as
180N/A# published by the Free Software Foundation.
157N/A#
180N/A# This code is distributed in the hope that it will be useful, but WITHOUT
157N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
157N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
157N/A# version 2 for more details (a copy is included in the LICENSE file that
157N/A# accompanied this code).
157N/A#
157N/A# You should have received a copy of the GNU General Public License version
157N/A# 2 along with this work; if not, write to the Free Software Foundation,
157N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
157N/A#
157N/A# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
157N/A# CA 95054 USA or visit www.sun.com if you need additional information or
180N/A# have any questions.
180N/A#
180N/A
157N/A# @test
157N/A# @bug 4694076
157N/A# @summary KeyTool throws ArrayIndexOutOfBoundsException for listing
157N/A# SecretKey entries in non-verbose mode.
157N/A# @author Valerie Peng
157N/A#
157N/A# @run shell SecretKeyKS.sh
157N/A# set a few environment variables so that the shell-script can run stand-alone
157N/A# in the source directory
157N/Aif [ "${TESTSRC}" = "" ] ; then
157N/A TESTSRC="."
157N/Afi
157N/Aif [ "${TESTCLASSES}" = "" ] ; then
157N/A TESTCLASSES="."
157N/Afi
157N/Aif [ "${TESTJAVA}" = "" ] ; then
157N/A echo "TESTJAVA not set. Test cannot execute."
157N/A echo "FAILED!!!"
157N/A exit 1
157N/Afi
157N/A
166N/A# set platform-dependent variables
157N/AOS=`uname -s`
157N/Acase "$OS" in
157N/A SunOS | Linux )
157N/A NULL=/dev/null
157N/A PS=":"
157N/A FS="/"
157N/A TMP=/tmp
163N/A ;;
157N/A Windows_* )
157N/A NULL=NUL
157N/A PS=";"
189N/A FS="\\"
157N/A TMP="c:/temp"
157N/A ;;
542N/A * )
542N/A echo "Unrecognized operating system!"
157N/A exit 1;
542N/A ;;
157N/Aesac
542N/A
189N/A# the test code
437N/A
189N/A${TESTJAVA}${FS}bin${FS}keytool -list -keystore ${TESTSRC}${FS}SecretKeyKS.jks -storepass password
542N/A
542N/Aexit $?
479N/A