935N/A#
2362N/A# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
935N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
935N/A#
935N/A# This code is free software; you can redistribute it and/or modify it
935N/A# under the terms of the GNU General Public License version 2 only, as
935N/A# published by the Free Software Foundation.
935N/A#
935N/A# This code is distributed in the hope that it will be useful, but WITHOUT
935N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
935N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
935N/A# version 2 for more details (a copy is included in the LICENSE file that
935N/A# accompanied this code).
935N/A#
935N/A# You should have received a copy of the GNU General Public License version
935N/A# 2 along with this work; if not, write to the Free Software Foundation,
935N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
935N/A#
2362N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A# or visit www.oracle.com if you need additional information or have any
2362N/A# questions.
935N/A#
935N/A
935N/A# @test
935N/A# @bug 6813402
935N/A# @summary keytool cannot -printcert entries without extensions
935N/A#
935N/A# @run shell NoExtNPE.sh
935N/A
935N/A# set a few environment variables so that the shell-script can run stand-alone
935N/A# in the source directory
935N/Aif [ "${TESTSRC}" = "" ] ; then
935N/A TESTSRC="."
935N/Afi
935N/A
935N/Aif [ "${TESTJAVA}" = "" ] ; then
935N/A echo "TESTJAVA not set. Test cannot execute."
935N/A echo "FAILED!!!"
935N/A exit 1
935N/Afi
935N/A
935N/A# set platform-dependent variables
935N/AOS=`uname -s`
935N/Acase "$OS" in
935N/A SunOS )
935N/A FILESEP="/"
935N/A ;;
935N/A Linux )
935N/A FILESEP="/"
935N/A ;;
4638N/A Darwin )
4638N/A FILESEP="/"
4638N/A ;;
1486N/A CYGWIN* )
1486N/A FILESEP="/"
1486N/A ;;
935N/A Windows* )
935N/A FILESEP="\\"
935N/A ;;
935N/A * )
935N/A echo "Unrecognized system!"
935N/A exit 1;
935N/A ;;
935N/Aesac
935N/A
935N/A${TESTJAVA}${FILESEP}bin${FILESEP}keytool \
4638N/A -list -v \
4638N/A -keystore ${TESTSRC}${FILESEP}CloneKeyAskPassword.jks \
4638N/A -storepass test123
935N/A
935N/Aexit $?