author | amlu |
Fri, 01 Jul 2016 12:50:58 +0800 | |
changeset 39332 | 98615d275088 |
parent 39316 | 3042646f9b7b |
child 40261 | 86a49ba76f52 |
permissions | -rw-r--r-- |
2067
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
1 |
# |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
22602
diff
changeset
|
2 |
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. |
2067
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
3 |
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
4 |
# |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
5 |
# This code is free software; you can redistribute it and/or modify it |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
6 |
# under the terms of the GNU General Public License version 2 only, as |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
7 |
# published by the Free Software Foundation. |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
8 |
# |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
9 |
# This code is distributed in the hope that it will be useful, but WITHOUT |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
10 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
11 |
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
12 |
# version 2 for more details (a copy is included in the LICENSE file that |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
13 |
# accompanied this code). |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
14 |
# |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
15 |
# You should have received a copy of the GNU General Public License version |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
16 |
# 2 along with this work; if not, write to the Free Software Foundation, |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
17 |
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
18 |
# |
5506 | 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. |
|
2067
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
22 |
# |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
23 |
|
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
24 |
# @test |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
25 |
# @summary (almost) all keytool behaviors |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
26 |
# @author Weijun Wang |
3427
bc53e52c4ba6
6867687: keytool's standard.sh test timeout sometimes
weijun
parents:
2067
diff
changeset
|
27 |
# @run shell/timeout=600 standard.sh |
39316
3042646f9b7b
8160415: Mark sun/security/tools/keytool/standard.sh as intermittently failing
tidu
parents:
36928
diff
changeset
|
28 |
# @key intermittent |
39332
98615d275088
8160658: sun/security/tools/keytool/standard.sh fails on all platforms after JDK-8160415
amlu
parents:
39316
diff
changeset
|
29 |
|
2067
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
30 |
# This test is always excecuted. |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
31 |
# |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
32 |
# set a few environment variables so that the shell-script can run stand-alone |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
33 |
# in the source directory |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
34 |
if [ "${TESTSRC}" = "" ] ; then |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
35 |
TESTSRC="." |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
36 |
fi |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
37 |
if [ "${TESTCLASSES}" = "" ] ; then |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
38 |
TESTCLASSES="." |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
39 |
fi |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
40 |
if [ "${TESTJAVA}" = "" ] ; then |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
41 |
JAVAC_CMD=`which javac` |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
42 |
TESTJAVA=`dirname $JAVAC_CMD`/.. |
15254
3997a6f357cb
8005978: shell tests need to use the $COMPILEJDK for javac, jar and other tools
alanb
parents:
14786
diff
changeset
|
43 |
COMPILEJAVA="${TESTJAVA}" |
2067
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
44 |
fi |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
45 |
|
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
46 |
# set platform-dependent variables |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
47 |
OS=`uname -s` |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
48 |
case "$OS" in |
22602
0d9a07b0d7e9
8028537: PPC64: Updated the JDK regression tests to run on AIX
simonis
parents:
15254
diff
changeset
|
49 |
SunOS | Linux | Darwin | AIX | CYGWIN* ) |
3433 | 50 |
FS="/" |
51 |
;; |
|
2067
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
52 |
Windows_* ) |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
53 |
FS="\\" |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
54 |
;; |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
55 |
* ) |
3433 | 56 |
echo "Unrecognized system!" |
57 |
exit 1; |
|
2067
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
58 |
;; |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
59 |
esac |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
60 |
|
36928
71f5c0728dfc
8153370: Drop use of old style -XaddExports from tests
alanb
parents:
36511
diff
changeset
|
61 |
EXTRAOPTS="-XaddExports:java.base/sun.security.tools.keytool=ALL-UNNAMED \ |
71f5c0728dfc
8153370: Drop use of old style -XaddExports from tests
alanb
parents:
36511
diff
changeset
|
62 |
-XaddExports:java.base/sun.security.util=ALL-UNNAMED \ |
71f5c0728dfc
8153370: Drop use of old style -XaddExports from tests
alanb
parents:
36511
diff
changeset
|
63 |
-XaddExports:java.base/sun.security.x509=ALL-UNNAMED" |
2067
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
64 |
|
36511 | 65 |
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ${EXTRAOPTS} -d . -XDignore.symbol.file ${TESTSRC}${FS}KeyToolTest.java || exit 10 |
66 |
||
67 |
echo | ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${EXTRAOPTS} -Dfile KeyToolTest |
|
2067
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
68 |
status=$? |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
69 |
|
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
70 |
exit $status |
6f9db5f305cd
6780416: New keytool commands/options: -gencert, -printcertreq, -ext
weijun
parents:
diff
changeset
|
71 |