提交 d35d3692 编写于 作者: X xuelei

7145960: sun/security/mscapi/ShortRSAKey1024.sh failing on windows

Reviewed-by: vinnie, wetmore
上级 7295868a
...@@ -46,11 +46,20 @@ if [ "${TESTJAVA}" = "" ] ; then ...@@ -46,11 +46,20 @@ if [ "${TESTJAVA}" = "" ] ; then
fi fi
OS=`uname -s` OS=`uname -s`
case "$OS" in
SunOS | Linux | Darwin | CYGWIN* )
FS="/"
;;
Windows_* )
FS="\\"
;;
esac
case "$OS" in case "$OS" in
Windows* | CYGWIN* ) Windows* | CYGWIN* )
echo "Creating a temporary RSA keypair in the Windows-My store..." echo "Creating a temporary RSA keypair in the Windows-My store..."
${TESTJAVA}/bin/keytool \ ${TESTJAVA}${FS}bin${FS}keytool \
-genkeypair \ -genkeypair \
-storetype Windows-My \ -storetype Windows-My \
-keyalg RSA \ -keyalg RSA \
...@@ -59,22 +68,28 @@ case "$OS" in ...@@ -59,22 +68,28 @@ case "$OS" in
-dname "cn=localhost,c=US" \ -dname "cn=localhost,c=US" \
-noprompt -noprompt
if [ "$?" -ne "0" ]; then
echo "Unable to generate key pair in Windows-My keystore"
exit 1
fi
echo echo
echo "Running the test..." echo "Running the test..."
${TESTJAVA}/bin/javac -d . ${TESTSRC}\\ShortRSAKeyWithinTLS.java ${TESTJAVA}${FS}bin${FS}javac -d . \
${TESTJAVA}/bin/java ShortRSAKeyWithinTLS 7106773.1024 1024 \ ${TESTSRC}${FS}ShortRSAKeyWithinTLS.java
${TESTJAVA}${FS}bin${FS}java ShortRSAKeyWithinTLS 7106773.1024 1024 \
TLSv1.2 TLS_DHE_RSA_WITH_AES_128_CBC_SHA TLSv1.2 TLS_DHE_RSA_WITH_AES_128_CBC_SHA
rc=$? rc=$?
echo echo
echo "Removing the temporary RSA keypair from the Windows-My store..." echo "Removing the temporary RSA keypair from the Windows-My store..."
${TESTJAVA}/bin/keytool \ ${TESTJAVA}${FS}bin${FS}keytool \
-delete \ -delete \
-storetype Windows-My \ -storetype Windows-My \
-alias 7106773.1024 -alias 7106773.1024
echo done. echo "Done".
exit $rc exit $rc
;; ;;
......
...@@ -46,11 +46,20 @@ if [ "${TESTJAVA}" = "" ] ; then ...@@ -46,11 +46,20 @@ if [ "${TESTJAVA}" = "" ] ; then
fi fi
OS=`uname -s` OS=`uname -s`
case "$OS" in
SunOS | Linux | Darwin | CYGWIN* )
FS="/"
;;
Windows_* )
FS="\\"
;;
esac
case "$OS" in case "$OS" in
Windows* | CYGWIN* ) Windows* | CYGWIN* )
echo "Creating a temporary RSA keypair in the Windows-My store..." echo "Creating a temporary RSA keypair in the Windows-My store..."
${TESTJAVA}/bin/keytool \ ${TESTJAVA}${FS}bin${FS}keytool \
-genkeypair \ -genkeypair \
-storetype Windows-My \ -storetype Windows-My \
-keyalg RSA \ -keyalg RSA \
...@@ -59,10 +68,16 @@ case "$OS" in ...@@ -59,10 +68,16 @@ case "$OS" in
-dname "cn=localhost,c=US" \ -dname "cn=localhost,c=US" \
-noprompt -noprompt
if [ "$?" -ne "0" ]; then
echo "Unable to generate key pair in Windows-My keystore"
exit 1
fi
echo echo
echo "Running the test..." echo "Running the test..."
${TESTJAVA}/bin/javac -d . ${TESTSRC}\\ShortRSAKeyWithinTLS.java ${TESTJAVA}${FS}bin${FS}javac -d . \
${TESTJAVA}/bin/java ShortRSAKeyWithinTLS 7106773.512 512 \ ${TESTSRC}${FS}ShortRSAKeyWithinTLS.java
${TESTJAVA}${FS}bin${FS}java ShortRSAKeyWithinTLS 7106773.512 512 \
TLSv1.2 TLS_DHE_RSA_WITH_AES_128_CBC_SHA TLSv1.2 TLS_DHE_RSA_WITH_AES_128_CBC_SHA
...@@ -70,12 +85,12 @@ case "$OS" in ...@@ -70,12 +85,12 @@ case "$OS" in
echo echo
echo "Removing the temporary RSA keypair from the Windows-My store..." echo "Removing the temporary RSA keypair from the Windows-My store..."
${TESTJAVA}/bin/keytool \ ${TESTJAVA}${FS}bin${FS}keytool \
-delete \ -delete \
-storetype Windows-My \ -storetype Windows-My \
-alias 7106773.512 -alias 7106773.512
echo done. echo "Done".
exit $rc exit $rc
;; ;;
......
...@@ -46,11 +46,20 @@ if [ "${TESTJAVA}" = "" ] ; then ...@@ -46,11 +46,20 @@ if [ "${TESTJAVA}" = "" ] ; then
fi fi
OS=`uname -s` OS=`uname -s`
case "$OS" in
SunOS | Linux | Darwin | CYGWIN* )
FS="/"
;;
Windows_* )
FS="\\"
;;
esac
case "$OS" in case "$OS" in
Windows* | CYGWIN* ) Windows* | CYGWIN* )
echo "Creating a temporary RSA keypair in the Windows-My store..." echo "Creating a temporary RSA keypair in the Windows-My store..."
${TESTJAVA}/bin/keytool \ ${TESTJAVA}${FS}bin${FS}keytool \
-genkeypair \ -genkeypair \
-storetype Windows-My \ -storetype Windows-My \
-keyalg RSA \ -keyalg RSA \
...@@ -59,22 +68,28 @@ case "$OS" in ...@@ -59,22 +68,28 @@ case "$OS" in
-dname "cn=localhost,c=US" \ -dname "cn=localhost,c=US" \
-noprompt -noprompt
if [ "$?" -ne "0" ]; then
echo "Unable to generate key pair in Windows-My keystore"
exit 1
fi
echo echo
echo "Running the test..." echo "Running the test..."
${TESTJAVA}/bin/javac -d . ${TESTSRC}\\ShortRSAKeyWithinTLS.java ${TESTJAVA}${FS}bin${FS}javac -d . \
${TESTJAVA}/bin/java ShortRSAKeyWithinTLS 7106773.768 768 \ ${TESTSRC}${FS}ShortRSAKeyWithinTLS.java
${TESTJAVA}${FS}bin${FS}java ShortRSAKeyWithinTLS 7106773.768 768 \
TLSv1.2 TLS_DHE_RSA_WITH_AES_128_CBC_SHA TLSv1.2 TLS_DHE_RSA_WITH_AES_128_CBC_SHA
rc=$? rc=$?
echo echo
echo "Removing the temporary RSA keypair from the Windows-My store..." echo "Removing the temporary RSA keypair from the Windows-My store..."
${TESTJAVA}/bin/keytool \ ${TESTJAVA}${FS}bin${FS}keytool \
-delete \ -delete \
-storetype Windows-My \ -storetype Windows-My \
-alias 7106773.768 -alias 7106773.768
echo done. echo "Done".
exit $rc exit $rc
;; ;;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册