summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/tools
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-01-10 06:22:05 +0000
committerkris <kris@FreeBSD.org>2000-01-10 06:22:05 +0000
commit2e467dc342d6641955ef59a1a671ff929444d45b (patch)
treeb5683ff3d44c93978826763313683673904c6bd9 /crypto/openssl/tools
parente829abb179a8846d90fb31e1bcab4ea0aec4590f (diff)
downloadFreeBSD-src-2e467dc342d6641955ef59a1a671ff929444d45b.zip
FreeBSD-src-2e467dc342d6641955ef59a1a671ff929444d45b.tar.gz
Initial import of OpenSSL 0.9.4, sans IDEA and RSA code for patent
infringement reasons.
Diffstat (limited to 'crypto/openssl/tools')
-rw-r--r--crypto/openssl/tools/Makefile.ssl61
-rw-r--r--crypto/openssl/tools/c_hash9
-rw-r--r--crypto/openssl/tools/c_info12
-rw-r--r--crypto/openssl/tools/c_issuer10
-rw-r--r--crypto/openssl/tools/c_name10
-rw-r--r--crypto/openssl/tools/c_rehash61
-rw-r--r--crypto/openssl/tools/c_rehash.in61
7 files changed, 224 insertions, 0 deletions
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
OpenPOWER on IntegriCloud