Mercurial > hg > release > icedtea7-forest-2.5 > jdk
changeset 8157:b910da0855cd
8041740: Test sun/security/tools/keytool/ListKeychainStore.sh fails on Mac
Reviewed-by: mullan
author | vinnie |
---|---|
date | Thu, 12 Feb 2015 18:29:00 +0000 |
parents | cdb866aaffd9 |
children | 10acd8698f4f |
files | test/sun/security/tools/keytool/ListKeychainStore.sh |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/test/sun/security/tools/keytool/ListKeychainStore.sh Fri Feb 13 15:03:08 2015 +0400 +++ b/test/sun/security/tools/keytool/ListKeychainStore.sh Thu Feb 12 18:29:00 2015 +0000 @@ -22,7 +22,7 @@ # # @test -# @bug 7133495 +# @bug 7133495 8041740 # @summary [macosx] KeyChain KeyStore implementation retrieves only one private key entry if [ "${TESTJAVA}" = "" ] ; then @@ -49,8 +49,10 @@ KEYTOOL="${TESTJAVA}/bin/keytool -storetype KeychainStore -keystore NONE -storepass $PWD" TEMPORARY_P12="$TESTCLASSES/7133495.p12" TEMPORARY_KC="$TESTCLASSES/7133495.keychain" +TEMPORARY_LIST="$TESTCLASSES/7133495.tmp" CLEANUP_P12="rm -f $TEMPORARY_P12" CLEANUP_KC="security delete-keychain $TEMPORARY_KC" +CLEANUP_LIST="rm -f $TEMPORARY_LIST" # Count the number of private key entries in the Keychain keystores @@ -114,6 +116,15 @@ fi echo "Imported keypairs from PKCS12 keystore into the keychain" +# Adjust the keychain search order + +echo "\"$TEMPORARY_KC\"" > $TEMPORARY_LIST +security list-keychains >> $TEMPORARY_LIST +security list-keychains -s `xargs < ${TEMPORARY_LIST}` +`$CLEANUP_LIST` +echo "Temporary keychain search order:" +security list-keychains + # Recount the number of private key entries in the Keychain keystores COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l`