4562N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 4562N/A# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4562N/A# This code is free software; you can redistribute it and/or modify it 4562N/A# under the terms of the GNU General Public License version 2 only, as 4562N/A# published by the Free Software Foundation. 4562N/A# This code is distributed in the hope that it will be useful, but WITHOUT 4562N/A# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 4562N/A# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 4562N/A# version 2 for more details (a copy is included in the LICENSE file that 4562N/A# You should have received a copy of the GNU General Public License version 4562N/A# 2 along with this work; if not, write to the Free Software Foundation, 4562N/A# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 4562N/A# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 4562N/A# @summary keytool can try save to a byte array before overwrite the file 4562N/Aif [
"${TESTJAVA}" =
"" ] ;
then 4562N/A# set platform-dependent variables 4562N/A# We use -protected for JKS keystore. This is illegal so the command should 4562N/A# fail. Then we can check if the keystore is damaged. 4562N/A echo "What? -protected works for JKS?" 4562N/A echo "Keystore file damaged"