test/jdk/sun/security/pkcs11/KeyStore/SecretKeysBasic.sh
changeset 51460 97e361fe3433
parent 47216 71c04702a3d5
equal deleted inserted replaced
51459:7339b9e38182 51460:97e361fe3433
     1 #
     1 #
     2 # Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
     2 # Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     5 # This code is free software; you can redistribute it and/or modify it
     6 # under the terms of the GNU General Public License version 2 only, as
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.
     7 # published by the Free Software Foundation.
    23 
    23 
    24 # @test
    24 # @test
    25 # @bug 6599979
    25 # @bug 6599979
    26 # @summary Ensure that re-assigning the alias works
    26 # @summary Ensure that re-assigning the alias works
    27 #
    27 #
    28 # @library ..
    28 # @library /test/lib ..
    29 # @build SecretKeysBasic
    29 # @build SecretKeysBasic
    30 # @run shell SecretKeysBasic.sh
    30 # @run shell SecretKeysBasic.sh
    31 #
    31 #
    32 # To run by hand:
    32 # To run by hand:
    33 #    %sh SecretKeysBasic.sh
    33 #    %sh SecretKeysBasic.sh
    50     TESTJAVA=`dirname $JAVAC_CMD`/..
    50     TESTJAVA=`dirname $JAVAC_CMD`/..
    51 fi
    51 fi
    52 echo TESTSRC=${TESTSRC}
    52 echo TESTSRC=${TESTSRC}
    53 echo TESTCLASSES=${TESTCLASSES}
    53 echo TESTCLASSES=${TESTCLASSES}
    54 echo TESTJAVA=${TESTJAVA}
    54 echo TESTJAVA=${TESTJAVA}
       
    55 echo CPAPPEND=${CPAPPEND}
    55 echo ""
    56 echo ""
    56 
    57 
    57 #DEBUG=sunpkcs11,pkcs11keystore
    58 #DEBUG=sunpkcs11,pkcs11keystore
    58 
    59 
    59 echo DEBUG=${DEBUG}
    60 echo DEBUG=${DEBUG}
   128 
   129 
   129     echo ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}public
   130     echo ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}public
   130     ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}public
   131     ${MKDIR} ${TESTCLASSES}${FS}pkcs11_softtoken${FS}public
   131 
   132 
   132     echo ${CP} ${TESTSRC}${FS}BasicData${FS}pkcs11_softtoken${FS}objstore_info \
   133     echo ${CP} ${TESTSRC}${FS}BasicData${FS}pkcs11_softtoken${FS}objstore_info \
   133 	${TESTCLASSES}${FS}pkcs11_softtoken
   134     ${TESTCLASSES}${FS}pkcs11_softtoken
   134     ${CP} ${TESTSRC}${FS}BasicData${FS}pkcs11_softtoken${FS}objstore_info \
   135     ${CP} ${TESTSRC}${FS}BasicData${FS}pkcs11_softtoken${FS}objstore_info \
   135 	${TESTCLASSES}${FS}pkcs11_softtoken
   136     ${TESTCLASSES}${FS}pkcs11_softtoken
   136 
   137 
   137     echo ${CHMOD} +w ${TESTCLASSES}${FS}pkcs11_softtoken${FS}objstore_info
   138     echo ${CHMOD} +w ${TESTCLASSES}${FS}pkcs11_softtoken${FS}objstore_info
   138     ${CHMOD} 600 ${TESTCLASSES}${FS}pkcs11_softtoken${FS}objstore_info
   139     ${CHMOD} 600 ${TESTCLASSES}${FS}pkcs11_softtoken${FS}objstore_info
   139     USED_FILE_LIST="${TESTCLASSES}${FS}pkcs11_softtoken"
   140     USED_FILE_LIST="${TESTCLASSES}${FS}pkcs11_softtoken"
   140 fi
   141 fi
   141 
   142 
   142 # run test
   143 # run test
   143 cd ${TESTSRC}
   144 cd ${TESTSRC}
   144 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
   145 ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
   145 	-DDIR=${TESTSRC}${FS}BasicData${FS} \
   146         -DDIR=${TESTSRC}${FS}BasicData${FS} \
   146         -classpath \
   147         -classpath \
   147         ${TESTCLASSES}${PS}${TESTCLASSES}${FS}..${PS}${TESTSRC}${FS}loader.jar \
   148         ${TESTCLASSES}${PS}${TESTCLASSES}${FS}..${PS}${TESTSRC}${FS}loader.jar${PS}${CPAPPEND} \
   148         -DCUSTOM_DB_DIR=${TESTCLASSES} \
   149         -DCUSTOM_DB_DIR=${TESTCLASSES} \
   149         -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \
   150         -DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \
   150 	-DNO_DEFAULT=true \
   151         -DNO_DEFAULT=true \
   151 	-DNO_DEIMOS=true \
   152         -DNO_DEIMOS=true \
   152 	-DTOKEN=${token} \
   153         -DTOKEN=${token} \
   153 	-Djava.security.debug=${DEBUG} \
   154         -Djava.security.debug=${DEBUG} \
   154 	SecretKeysBasic
   155         SecretKeysBasic
   155 
   156 
   156 #	-DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \
   157 #	-DCUSTOM_P11_CONFIG=${TESTSRC}${FS}BasicData${FS}p11-${token}.txt \
   157 
   158 
   158 # save error status
   159 # save error status
   159 if [ $? != 0 ]
   160 if [ $? != 0 ]