4e5959c6df
requirements which state that we must work with the Java and Tomcat packages that their install bundle.
68 lines
2.7 KiB
Bash
68 lines
2.7 KiB
Bash
#!/bin/sh
|
|
########################################################################
|
|
#
|
|
# Copyright (C) 2006 Novell, Inc. All Rights Reserved.
|
|
#
|
|
# This library is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
# License as published by the Free Software Foundation; version 2.1
|
|
# of the License.
|
|
#
|
|
# This library is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
# Library Lesser General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with this library; if not, Novell, Inc.
|
|
#
|
|
# To contact Novell about this file by physical or electronic mail,
|
|
# you may find current contact information at www.novell.com.
|
|
#
|
|
# Author: Juan Carlos Luciani <jluciani@novell.com>
|
|
#
|
|
########################################################################
|
|
|
|
#############################################################
|
|
# #
|
|
# CASA Authentication Token Keystore Setup Script for #
|
|
# authentication token validating clients. #
|
|
# #
|
|
# This script sets up the certificate associated with the #
|
|
# keys used by the ATS to sign authentication tokens in the #
|
|
# keystore utilized by token validating clients. #
|
|
# #
|
|
# This script is customized for ZenWorks installations. #
|
|
#############################################################
|
|
|
|
SILENT=0
|
|
if [ "$1" != "" ]; then
|
|
if [ "$1" == "-s" ]; then
|
|
SILENT=1
|
|
fi
|
|
fi
|
|
|
|
# Set JAVA_HOME
|
|
JAVA_HOME="/opt/novell/zenworks/share/java"
|
|
|
|
# Do not do anything if the client keystore has already been created
|
|
if [ -f /etc/CASA/authtoken/keys/client/jks-store ]; then
|
|
if [ $SILENT == 0 ]; then
|
|
echo "The client keystore is already setup"
|
|
fi
|
|
else
|
|
if [ -f /etc/CASA/authtoken/keys/casaatsdSigningCert ]; then
|
|
echo "Setting up the clients's keystore"
|
|
|
|
KEYTOOL_PATH=$JAVA_HOME/bin/keytool
|
|
|
|
# Import the certificate to the client's keystore
|
|
$KEYTOOL_PATH -import -noprompt -keystore /etc/CASA/authtoken/keys/client/jks-store -alias signingCert -storepass secret -keypass secret -file /etc/CASA/authtoken/keys/casaatsdSigningCert
|
|
|
|
# List the content's of the client's keystore
|
|
#$KEYTOOL_PATH -list -rfc -keystore client/jks-store -alias signingCert -storepass secret
|
|
else
|
|
echo "File /etc/CASA/authtoken/keys/casaatsdSigningCert not found"
|
|
fi
|
|
fi
|