From 2e467dc342d6641955ef59a1a671ff929444d45b Mon Sep 17 00:00:00 2001 From: kris Date: Mon, 10 Jan 2000 06:22:05 +0000 Subject: Initial import of OpenSSL 0.9.4, sans IDEA and RSA code for patent infringement reasons. --- crypto/openssl/tools/Makefile.ssl | 61 +++++++++++++++++++++++++++++++++++++++ crypto/openssl/tools/c_hash | 9 ++++++ crypto/openssl/tools/c_info | 12 ++++++++ crypto/openssl/tools/c_issuer | 10 +++++++ crypto/openssl/tools/c_name | 10 +++++++ crypto/openssl/tools/c_rehash | 61 +++++++++++++++++++++++++++++++++++++++ crypto/openssl/tools/c_rehash.in | 61 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 224 insertions(+) create mode 100644 crypto/openssl/tools/Makefile.ssl create mode 100644 crypto/openssl/tools/c_hash create mode 100644 crypto/openssl/tools/c_info create mode 100644 crypto/openssl/tools/c_issuer create mode 100644 crypto/openssl/tools/c_name create mode 100644 crypto/openssl/tools/c_rehash create mode 100644 crypto/openssl/tools/c_rehash.in (limited to 'crypto/openssl/tools') diff --git a/crypto/openssl/tools/Makefile.ssl b/crypto/openssl/tools/Makefile.ssl new file mode 100644 index 0000000..7e6285b --- /dev/null +++ b/crypto/openssl/tools/Makefile.ssl @@ -0,0 +1,61 @@ +# +# SSLeay/tools/Makefile +# + +DIR= tools +TOP= .. +CC= cc +INCLUDES= -I.. -I../../include +CFLAG=-g +INSTALL_PREFIX= +OPENSSLDIR= /usr/local/ssl +INSTALLTOP=/usr/local/ssl +MAKE= make -f Makefile.ssl +MAKEDEPEND= $(TOP)/util/domd $(TOP) +MAKEFILE= Makefile.ssl + +CFLAGS= $(INCLUDES) $(CFLAG) + +GENERAL=Makefile.ssl +TEST= +APPS= c_rehash +MISC_APPS= c_hash c_info c_issuer c_name + +all: + +install: + @for i in $(APPS) ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i; \ + chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$i ); \ + done; + @for i in $(MISC_APPS) ; \ + do \ + (cp $$i $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i; \ + chmod 755 $(INSTALL_PREFIX)$(OPENSSLDIR)/misc/$$i ); \ + done; + +files: + $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO + +links: + @$(TOP)/util/point.sh Makefile.ssl Makefile + +lint: + +tags: + +errors: + +depend: + +dclean: + $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new + mv -f Makefile.new $(MAKEFILE) + +clean: + rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff + +errors: + +# DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/crypto/openssl/tools/c_hash b/crypto/openssl/tools/c_hash new file mode 100644 index 0000000..5e0a908 --- /dev/null +++ b/crypto/openssl/tools/c_hash @@ -0,0 +1,9 @@ +#!/bin/sh +# print out the hash values +# + +for i in $* +do + h=`openssl x509 -hash -noout -in $i` + echo "$h.0 => $i" +done diff --git a/crypto/openssl/tools/c_info b/crypto/openssl/tools/c_info new file mode 100644 index 0000000..0e1e633 --- /dev/null +++ b/crypto/openssl/tools/c_info @@ -0,0 +1,12 @@ +#!/bin/sh +# +# print the subject +# + +for i in $* +do + n=`openssl x509 -subject -issuer -enddate -noout -in $i` + echo "$i" + echo "$n" + echo "--------" +done diff --git a/crypto/openssl/tools/c_issuer b/crypto/openssl/tools/c_issuer new file mode 100644 index 0000000..4c69120 --- /dev/null +++ b/crypto/openssl/tools/c_issuer @@ -0,0 +1,10 @@ +#!/bin/sh +# +# print out the issuer +# + +for i in $* +do + n=`openssl x509 -issuer -noout -in $i` + echo "$i\t$n" +done diff --git a/crypto/openssl/tools/c_name b/crypto/openssl/tools/c_name new file mode 100644 index 0000000..28800c0 --- /dev/null +++ b/crypto/openssl/tools/c_name @@ -0,0 +1,10 @@ +#!/bin/sh +# +# print the subject +# + +for i in $* +do + n=`openssl x509 -subject -noout -in $i` + echo "$i $n" +done diff --git a/crypto/openssl/tools/c_rehash b/crypto/openssl/tools/c_rehash new file mode 100644 index 0000000..cc3b658 --- /dev/null +++ b/crypto/openssl/tools/c_rehash @@ -0,0 +1,61 @@ +#!/bin/sh +# +# redo the hashes for the certificates in your cert path or the ones passed +# on the command line. +# + +if [ "$OPENSSL"x = "x" -o ! -x "$OPENSSL" ]; then + OPENSSL='openssl' + export OPENSSL +fi +DIR=/usr/local/ssl +PATH=$DIR/bin:$PATH + +if [ ! -f "$OPENSSL" ]; then + found=0 + for dir in . `echo $PATH | sed -e 's/:/ /g'`; do + if [ -f "$dir/$OPENSSL" ]; then + found=1 + break + fi + done + if [ $found = 0 ]; then + echo "c_rehash: rehashing skipped ('openssl' program not available)" 1>&2 + exit 0 + fi +fi + +SSL_DIR=$DIR/certs + +if [ "$*" = "" ]; then + CERTS=${*:-${SSL_CERT_DIR:-$SSL_DIR}} +else + CERTS=$* +fi + +IFS=': ' +for i in $CERTS +do + ( + IFS=' ' + if [ -d $i -a -w $i ]; then + cd $i + echo "Doing $i" + for i in *.pem + do + if [ $i != '*.pem' ]; then + h=`$OPENSSL x509 -hash -noout -in $i` + if [ "x$h" = "x" ]; then + echo $i does not contain a certificate + else + if [ -f $h.0 ]; then + /bin/rm -f $h.0 + fi + echo "$i => $h.0" + ln -s $i $h.0 + fi + fi + done + fi + ) +done diff --git a/crypto/openssl/tools/c_rehash.in b/crypto/openssl/tools/c_rehash.in new file mode 100644 index 0000000..cc3b658 --- /dev/null +++ b/crypto/openssl/tools/c_rehash.in @@ -0,0 +1,61 @@ +#!/bin/sh +# +# redo the hashes for the certificates in your cert path or the ones passed +# on the command line. +# + +if [ "$OPENSSL"x = "x" -o ! -x "$OPENSSL" ]; then + OPENSSL='openssl' + export OPENSSL +fi +DIR=/usr/local/ssl +PATH=$DIR/bin:$PATH + +if [ ! -f "$OPENSSL" ]; then + found=0 + for dir in . `echo $PATH | sed -e 's/:/ /g'`; do + if [ -f "$dir/$OPENSSL" ]; then + found=1 + break + fi + done + if [ $found = 0 ]; then + echo "c_rehash: rehashing skipped ('openssl' program not available)" 1>&2 + exit 0 + fi +fi + +SSL_DIR=$DIR/certs + +if [ "$*" = "" ]; then + CERTS=${*:-${SSL_CERT_DIR:-$SSL_DIR}} +else + CERTS=$* +fi + +IFS=': ' +for i in $CERTS +do + ( + IFS=' ' + if [ -d $i -a -w $i ]; then + cd $i + echo "Doing $i" + for i in *.pem + do + if [ $i != '*.pem' ]; then + h=`$OPENSSL x509 -hash -noout -in $i` + if [ "x$h" = "x" ]; then + echo $i does not contain a certificate + else + if [ -f $h.0 ]; then + /bin/rm -f $h.0 + fi + echo "$i => $h.0" + ln -s $i $h.0 + fi + fi + done + fi + ) +done -- cgit v1.1