23
24 # @test
25 # @bug 4938185 7106773
26 # @summary KeyStore support for NSS cert/key databases
27 # 512 bits RSA key cannot work with SHA384 and SHA512
28 #
29 # @run shell ClientAuth.sh
30
31 # set a few environment variables so that the shell-script can run stand-alone
32 # in the source directory
33
34 if [ "${TESTSRC}" = "" ] ; then
35 TESTSRC=`pwd`
36 fi
37 if [ "${TESTCLASSES}" = "" ] ; then
38 TESTCLASSES=`pwd`
39 fi
40 if [ "${TESTJAVA}" = "" ] ; then
41 TESTJAVA="/net/radiant/export1/charlie/mustang/build/solaris-sparc"
42 fi
43 echo TESTSRC=${TESTSRC}
44 echo TESTCLASSES=${TESTCLASSES}
45 echo TESTJAVA=${TESTJAVA}
46 echo ""
47
48 OS=`uname -s`
49 case "$OS" in
50 SunOS )
51 ARCH=`isainfo`
52 case "$ARCH" in
53 sparc* )
54 FS="/"
55 PS=":"
56 CP="${FS}bin${FS}cp"
57 CHMOD="${FS}bin${FS}chmod"
58 ;;
59 i[3-6]86 )
60 FS="/"
61 PS=":"
62 CP="${FS}bin${FS}cp"
63 CHMOD="${FS}bin${FS}chmod"
64 ;;
65 amd64* )
104 # but JTREG does not pass this env variable when executing a shell script.
105 #
106 # execute test program - rely on it to exit if platform unsupported
107
108 ;;
109 * )
110 echo "Unsupported System: ${OS}"
111 exit 0;
112 ;;
113 esac
114
115 # first make cert/key DBs writable
116
117 ${CP} ${TESTSRC}${FS}ClientAuthData${FS}cert8.db ${TESTCLASSES}
118 ${CHMOD} +w ${TESTCLASSES}${FS}cert8.db
119
120 ${CP} ${TESTSRC}${FS}ClientAuthData${FS}key3.db ${TESTCLASSES}
121 ${CHMOD} +w ${TESTCLASSES}${FS}key3.db
122
123 # compile test
124 ${TESTJAVA}${FS}bin${FS}javac \
125 -classpath ${TESTSRC}${FS}..${PS}${TESTSRC}${FS}loader.jar \
126 -d ${TESTCLASSES} \
127 ${TESTSRC}${FS}ClientAuth.java
128
129 # run test
130 echo "Run ClientAuth ..."
131 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
132 -classpath ${TESTCLASSES}${PS}${TESTSRC}${FS}loader.jar \
133 -DDIR=${TESTSRC}${FS}ClientAuthData${FS} \
134 -DCUSTOM_DB_DIR=${TESTCLASSES} \
135 -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}ClientAuthData${FS}p11-nss.txt \
136 -DNO_DEFAULT=true \
137 -DNO_DEIMOS=true \
138 -Dtest.src=${TESTSRC} \
139 -Dtest.classes=${TESTCLASSES} \
140 ClientAuth
141
142 # save error status
143 status=$?
144
|
23
24 # @test
25 # @bug 4938185 7106773
26 # @summary KeyStore support for NSS cert/key databases
27 # 512 bits RSA key cannot work with SHA384 and SHA512
28 #
29 # @run shell ClientAuth.sh
30
31 # set a few environment variables so that the shell-script can run stand-alone
32 # in the source directory
33
34 if [ "${TESTSRC}" = "" ] ; then
35 TESTSRC=`pwd`
36 fi
37 if [ "${TESTCLASSES}" = "" ] ; then
38 TESTCLASSES=`pwd`
39 fi
40 if [ "${TESTJAVA}" = "" ] ; then
41 TESTJAVA="/net/radiant/export1/charlie/mustang/build/solaris-sparc"
42 fi
43 if [ "${COMPILEJAVA}" = "" ]; then
44 COMPILEJAVA="${TESTJAVA}"
45 fi
46 echo TESTSRC=${TESTSRC}
47 echo TESTCLASSES=${TESTCLASSES}
48 echo TESTJAVA=${TESTJAVA}
49 echo COMPILEJAVA=${COMPILEJAVA}
50 echo ""
51
52 OS=`uname -s`
53 case "$OS" in
54 SunOS )
55 ARCH=`isainfo`
56 case "$ARCH" in
57 sparc* )
58 FS="/"
59 PS=":"
60 CP="${FS}bin${FS}cp"
61 CHMOD="${FS}bin${FS}chmod"
62 ;;
63 i[3-6]86 )
64 FS="/"
65 PS=":"
66 CP="${FS}bin${FS}cp"
67 CHMOD="${FS}bin${FS}chmod"
68 ;;
69 amd64* )
108 # but JTREG does not pass this env variable when executing a shell script.
109 #
110 # execute test program - rely on it to exit if platform unsupported
111
112 ;;
113 * )
114 echo "Unsupported System: ${OS}"
115 exit 0;
116 ;;
117 esac
118
119 # first make cert/key DBs writable
120
121 ${CP} ${TESTSRC}${FS}ClientAuthData${FS}cert8.db ${TESTCLASSES}
122 ${CHMOD} +w ${TESTCLASSES}${FS}cert8.db
123
124 ${CP} ${TESTSRC}${FS}ClientAuthData${FS}key3.db ${TESTCLASSES}
125 ${CHMOD} +w ${TESTCLASSES}${FS}key3.db
126
127 # compile test
128 ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \
129 -classpath ${TESTSRC}${FS}..${PS}${TESTSRC}${FS}loader.jar \
130 -d ${TESTCLASSES} \
131 ${TESTSRC}${FS}ClientAuth.java
132
133 # run test
134 echo "Run ClientAuth ..."
135 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
136 -classpath ${TESTCLASSES}${PS}${TESTSRC}${FS}loader.jar \
137 -DDIR=${TESTSRC}${FS}ClientAuthData${FS} \
138 -DCUSTOM_DB_DIR=${TESTCLASSES} \
139 -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}ClientAuthData${FS}p11-nss.txt \
140 -DNO_DEFAULT=true \
141 -DNO_DEIMOS=true \
142 -Dtest.src=${TESTSRC} \
143 -Dtest.classes=${TESTCLASSES} \
144 ClientAuth
145
146 # save error status
147 status=$?
148
|