447N/A#
2362N/A# Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
447N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
447N/A#
447N/A# This code is free software; you can redistribute it and/or modify it
447N/A# under the terms of the GNU General Public License version 2 only, as
447N/A# published by the Free Software Foundation.
447N/A#
447N/A# This code is distributed in the hope that it will be useful, but WITHOUT
447N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
447N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
447N/A# version 2 for more details (a copy is included in the LICENSE file that
447N/A# accompanied this code).
447N/A#
447N/A# You should have received a copy of the GNU General Public License version
447N/A# 2 along with this work; if not, write to the Free Software Foundation,
447N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
447N/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.
447N/A#
447N/A
447N/A# @test
447N/A# @bug 6480981
447N/A# @summary keytool should be able to import certificates from remote SSL servers
447N/A
447N/Aif [ "${TESTSRC}" = "" ] ; then
447N/A TESTSRC="."
447N/Afi
447N/Aif [ "${TESTJAVA}" = "" ] ; then
447N/A echo "TESTJAVA not set. Test cannot execute."
447N/A echo "FAILED!!!"
447N/A exit 1
447N/Afi
447N/A
447N/A# set platform-dependent variables
447N/AOS=`uname -s`
447N/Acase "$OS" in
4638N/A SunOS | Linux | Darwin )
447N/A FS="/"
447N/A ;;
1486N/A CYGWIN* )
1486N/A FS="/"
1486N/A ;;
447N/A Windows_* )
447N/A FS="\\"
447N/A ;;
447N/A * )
447N/A echo "Unrecognized operating system!"
447N/A exit 1;
447N/A ;;
447N/Aesac
447N/A
447N/A${TESTJAVA}${FS}bin${FS}javac -d . ${TESTSRC}${FS}PrintSSL.java || exit 10
447N/A${TESTJAVA}${FS}bin${FS}java -Dtest.src=$TESTSRC PrintSSL | ( read PORT; ${TESTJAVA}${FS}bin${FS}keytool -printcert -sslserver localhost:$PORT )
447N/Astatus=$?
447N/A
447N/Arm PrintSSL*.class
447N/A
447N/Aexit $status