jdk/test/sun/security/tools/keytool/ListKeychainStore.sh
author weijun
Fri, 25 Apr 2014 10:57:09 +0800
changeset 24116 9f9b4ba34aad
parent 23010 6dadb192ad81
child 26957 663b14c9b66f
permissions -rw-r--r--
8040321: keytool and jarsigner tests doesn't pass though VM tools to tools Reviewed-by: alanb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14022
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
     1
#
23010
6dadb192ad81 8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents: 21342
diff changeset
     2
# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
14022
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
     3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
     4
#
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
     5
# This code is free software; you can redistribute it and/or modify it
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
     6
# under the terms of the GNU General Public License version 2 only, as
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
     7
# published by the Free Software Foundation.
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
     8
#
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
     9
# This code is distributed in the hope that it will be useful, but WITHOUT
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    10
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    11
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    12
# version 2 for more details (a copy is included in the LICENSE file that
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    13
# accompanied this code).
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    14
#
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    15
# You should have received a copy of the GNU General Public License version
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    16
# 2 along with this work; if not, write to the Free Software Foundation,
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    17
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    18
#
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    19
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    20
# or visit www.oracle.com if you need additional information or have any
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    21
# questions.
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    22
#
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    23
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    24
# @test
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    25
# @bug 7133495
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    26
# @summary [macosx] KeyChain KeyStore implementation retrieves only one private key entry
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    27
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    28
if [ "${TESTJAVA}" = "" ] ; then
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    29
    JAVAC_CMD=`which javac`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    30
    TESTJAVA=`dirname $JAVAC_CMD`/..
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    31
fi
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    32
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    33
if [ "${TESTCLASSES}" = "" ] ; then
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    34
    TESTCLASSES=`pwd`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    35
fi
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    36
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    37
# Only run on MacOS
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    38
OS=`uname -s`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    39
case "$OS" in
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    40
    Darwin )
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    41
        ;;
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    42
    * )
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    43
        echo "Will not run test on: ${OS}"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    44
        exit 0;
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    45
        ;;
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    46
esac
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    47
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    48
PWD="xxxxxx"
24116
9f9b4ba34aad 8040321: keytool and jarsigner tests doesn't pass though VM tools to tools
weijun
parents: 23010
diff changeset
    49
KEYTOOL="${TESTJAVA}/bin/keytool ${TESTTOOLVMOPTS} -storetype KeychainStore -keystore NONE -storepass $PWD"
14022
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    50
TEMPORARY_P12="$TESTCLASSES/7133495.p12"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    51
TEMPORARY_KC="$TESTCLASSES/7133495.keychain"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    52
CLEANUP_P12="rm -f $TEMPORARY_P12"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    53
CLEANUP_KC="security delete-keychain $TEMPORARY_KC"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    54
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    55
# Count the number of private key entries in the Keychain keystores
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    56
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    57
COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    58
echo "Found $COUNT private key entries in the Keychain keystores"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    59
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    60
if [ $COUNT -gt 1 ]; then
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    61
    exit 0
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    62
fi
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    63
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    64
# Create a temporary PKCS12 keystore containing 3 public/private keypairs
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    65
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    66
RESULT=`$CLEANUP_P12`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    67
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    68
for i in X Y Z
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    69
do
24116
9f9b4ba34aad 8040321: keytool and jarsigner tests doesn't pass though VM tools to tools
weijun
parents: 23010
diff changeset
    70
    ${TESTJAVA}/bin/keytool ${TESTTOOLVMOPTS} -genkeypair \
14022
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    71
        -storetype PKCS12 \
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    72
        -keystore $TEMPORARY_P12 \
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    73
        -storepass $PWD \
21342
7bbb056a1c23 8027026: Change keytool -genkeypair to use -keyalg RSA
weijun
parents: 14022
diff changeset
    74
        -keyalg rsa \
14022
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    75
        -dname "CN=$i,OU=$i,O=$i,ST=$i,C=US" \
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    76
        -alias 7133495-$i
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    77
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    78
    if [ $? -ne 0 ]; then
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    79
        echo "Error: cannot create keypair $i in the temporary PKCS12 keystore"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    80
        RESULT=`$CLEANUP_P12`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    81
        exit 1
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    82
    fi
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    83
done
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    84
echo "Created a temporary PKCS12 keystore: $TEMPORARY_P12"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    85
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    86
# Create a temporary keychain
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    87
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    88
security create-keychain -p $PWD $TEMPORARY_KC
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    89
if [ $? -ne 0 ]; then
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    90
    echo "Error: cannot create the temporary keychain"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    91
    RESULT=`$CLEANUP_P12`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    92
    exit 2
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    93
fi
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    94
echo "Created a temporary keychain: $TEMPORARY_KC"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    95
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    96
# Unlock the temporary keychain
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    97
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    98
security unlock-keychain -p $PWD $TEMPORARY_KC
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
    99
if [ $? -ne 0 ]; then
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   100
    echo "Error: cannot unlock the temporary keychain"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   101
    RESULT=`$CLEANUP_P12`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   102
    RESULT=`$CLEANUP_KC`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   103
    exit 3
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   104
fi
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   105
echo "Unlocked the temporary keychain"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   106
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   107
# Import the keypairs from the PKCS12 keystore into the keychain
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   108
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   109
security import $TEMPORARY_P12 -k $TEMPORARY_KC -f pkcs12 -P $PWD
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   110
if [ $? -ne 0 ]; then
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   111
    echo "Error: cannot import keypairs from PKCS12 keystore into the keychain"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   112
    RESULT=`$CLEANUP_P12`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   113
    RESULT=`$CLEANUP_KC`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   114
    exit 4
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   115
fi
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   116
echo "Imported keypairs from PKCS12 keystore into the keychain"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   117
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   118
# Recount the number of private key entries in the Keychain keystores
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   119
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   120
COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   121
echo "Found $COUNT private key entries in the Keychain keystore"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   122
if [ $COUNT -lt 3 ]; then
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   123
    echo "Error: expected >2 private key entries in the Keychain keystores"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   124
    RESULT=`$CLEANUP_P12`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   125
    RESULT=`$CLEANUP_KC`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   126
    exit 5
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   127
fi
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   128
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   129
RESULT=`$CLEANUP_P12`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   130
if [ $? -ne 0 ]; then
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   131
    echo "Error: cannot remove the temporary PKCS12 keystore"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   132
    exit 6
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   133
fi
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   134
echo "Removed the temporary PKCS12 keystore"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   135
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   136
RESULT=`$CLEANUP_KC`
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   137
if [ $? -ne 0 ]; then
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   138
    echo "Error: cannot remove the temporary keychain"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   139
    exit 7
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   140
fi
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   141
echo "Removed the temporary keychain"
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   142
43384f14d41b 7133495: [macosx] KeyChain KeyStore implementation retrieves only one private key entry
vinnie
parents:
diff changeset
   143
exit 0