cvs commit: jakarta-tomcat-4.0/catalina/src/bin digest.bat digest.sh

2001-09-10 Thread ccain

ccain   01/09/10 13:12:58

  Modified:catalina/src/bin digest.bat digest.sh
  Log:
  DES is not a hashing algorithm ;-)
  
  Revision  ChangesPath
  1.2   +2 -2  jakarta-tomcat-4.0/catalina/src/bin/digest.bat
  
  Index: digest.bat
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/digest.bat,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- digest.bat2001/05/22 20:37:19 1.1
  +++ digest.bat2001/09/10 20:12:58 1.2
  @@ -10,7 +10,7 @@
   rem   This script is assumed to run from the bin directory or have the
   rem   CATALINA_HOME env variable set.
   rem
  -rem $Id: digest.bat,v 1.1 2001/05/22 20:37:19 bip Exp $
  +rem $Id: digest.bat,v 1.2 2001/09/10 20:12:58 ccain Exp $
   rem ---
   
   
  @@ -57,7 +57,7 @@
   :doUsage
   echo Usage:  digest -a [algorithm] [credentials]
   echo Commands:
  -echo   algorithm   -   The algorithm to use, i.e. MD5, DES
  +echo   algorithm   -   The algorithm to use, i.e. MD5, SHA1
   echo   credentials -   The credential to digest
   goto cleanup
   
  
  
  
  1.3   +2 -2  jakarta-tomcat-4.0/catalina/src/bin/digest.sh
  
  Index: digest.sh
  ===
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/digest.sh,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- digest.sh 2001/08/20 18:36:04 1.2
  +++ digest.sh 2001/09/10 20:12:58 1.3
  @@ -10,7 +10,7 @@
   #   This script is assumed to run from the bin directory or have the
   #   CATALINA_HOME env variable set.
   #
  -# $Id: digest.sh,v 1.2 2001/08/20 18:36:04 bip Exp $
  +# $Id: digest.sh,v 1.3 2001/09/10 20:12:58 ccain Exp $
   # -
   
   
  @@ -81,7 +81,7 @@
   
 echo Usage:  digest -a [algorithm] [credentials]
 echo Commands:
  -  echo   algorithm   -   The algorithm to use, i.e. MD5, DES
  +  echo   algorithm   -   The algorithm to use, i.e. MD5, SHA1
 echo   credentials -   The credential to digest
   
 exit 1
  
  
  



cvs commit: jakarta-tomcat-4.0/catalina/src/bin digest.bat digest.sh

2001-05-22 Thread bip

bip 01/05/22 13:37:24

  Added:   catalina/src/bin digest.bat digest.sh
  Log:
  scripts to Digest password.
  
  Revision  ChangesPath
  1.1  jakarta-tomcat-4.0/catalina/src/bin/digest.bat
  
  Index: digest.bat
  ===
  @echo off
  rem ---
  rem digest.bat - Digest password using the algorithm specificied
  rem
  rem   CATALINA_HOME (Optional) May point at your Catalina build directory.
  rem If not present, the current working directory is assumed.
  rem
  rem   JAVA_HOME Must point at your Java Development Kit installation.
  rem
  rem   This script is assumed to run from the bin directory or have the
  rem   CATALINA_HOME env variable set.
  rem
  rem $Id: digest.bat,v 1.1 2001/05/22 20:37:19 bip Exp $
  rem ---
  
  
  rem - Save Environment Variables That May Change --
  
  set _CATALINA_HOME=%CATALINA_HOME%
  set _CLASSPATH=%CLASSPATH%
  set _CP=%CP%
  
  rem - Verify and Set Required Environment Variables ---
  
  if not %JAVA_HOME% ==  goto gotJavaHome
  echo You must set JAVA_HOME to point at your Java Development Kit installation
  goto cleanup
  :gotJavaHome
  
  if not %CATALINA_HOME% ==  goto gotCatalinaHome
  set CATALINA_HOME=.
  if exist %CATALINA_HOME%\server\lib\catalina.jar goto okCatalinaHome
  set CATALINA_HOME=..
  :gotCatalinaHome
  if exist %CATALINA_HOME%\server\lib\catalina.jar goto okCatalinaHome
  echo Cannot find catalina.jar in %CATALINA_HOME%\server\lib
  echo Please check your CATALINA_HOME setting or run this script from the bin 
directory
  goto cleanup
  :okCatalinaHome
  
  
  rem - Prepare Appropriate Java Execution Commands -
  
  set _RUNJAVA=%JAVA_HOME%\bin\java
  
  rem - Set Up The Runtime Classpath 
  
  set CP=%CATALINA_HOME%\server\lib\catalina.jar
  set CLASSPATH=%CP%
  echo Using CLASSPATH: %CLASSPATH%
  
  
  rem - Execute The Requested Command ---
  
  if %1 == -a (if %2 neq  (if %3 neq  goto doRun))
  
  :doUsage
  echo Usage:  digest -a [algorithm] [credentials]
  echo Commands:
  echo   algorithm   -   The algorithm to use, i.e. MD5, DES
  echo   credentials -   The credential to digest
  goto cleanup
  
  :doRun
  %_RUNJAVA% org.apache.catalina.realm.JDBCRealm %1 %2 %3
  goto cleanup
  
  
  rem - Restore Environment Variables ---
  
  :cleanup
  set CATALINA_HOME=%_CATALINA_HOME%
  set _CATALINA_HOME=
  set CLASSPATH=%_CLASSPATH%
  set _CLASSPATH=
  set CP=%_CP%
  set _CP=
  :finish
  
  
  
  1.1  jakarta-tomcat-4.0/catalina/src/bin/digest.sh
  
  Index: digest.sh
  ===
  #!/bin/sh
  # -
  # digest.bat - Digest password using the algorithm specificied
  #
  #   CATALINA_HOME (Optional) May point at your Catalina build directory.
  # If not present, the current working directory is assumed.
  #
  #   JAVA_HOME Must point at your Java Development Kit installation.
  #
  #   This script is assumed to run from the bin directory or have the
  #   CATALINA_HOME env variable set.
  #
  # $Id: digest.sh,v 1.1 2001/05/22 20:37:21 bip Exp $
  # -
  
  
  # - Verify and Set Required Environment Variables -
  
  if [ -z $CATALINA_HOME ] ; then
## resolve links - $0 may be a link to  home
PRG=$0
progname=`basename $0`

while [ -h $PRG ] ; do
  ls=`ls -ld $PRG`
  link=`expr $ls : '.*- \(.*\)$'`
  if expr $link : '.*/.*'  /dev/null; then
PRG=$link
  else
PRG=`dirname $PRG`/$link
  fi
done

CATALINA_HOME_1=`dirname $PRG`/..
echo Guessing CATALINA_HOME from digest.sh to ${CATALINA_HOME_1} 
  if [ -d ${CATALINA_HOME_1}/conf ] ; then 
CATALINA_HOME=${CATALINA_HOME_1}
echo Setting CATALINA_HOME to $CATALINA_HOME
  fi
  fi
  
  if [ -z $JAVA_HOME ] ; then
echo You must set JAVA_HOME to point at your Java Development Kit installation
exit 1
  fi
  
  # - Set Up The System Classpath ---
  
  CP=$CATALINA_HOME/server/lib/catalina.jar
  
  if [ -f $JAVA_HOME/lib/tools.jar ] ; then
CP=$CP:$JAVA_HOME/lib/tools.jar
  fi
  
  # convert the existing path to windows
  if [ $OSTYPE = cygwin32 ] || [ $OSTYPE = cygwin ] ; then
 CP=`cygpath --path --windows $CP`
 CATALINA_HOME=`cygpath --path --windows $CATALINA_HOME`
  fi
  
  echo Using CLASSPATH: $CP
  echo Using CATALINA_HOME: $CATALINA_HOME