summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/tools
diff options
context:
space:
mode:
authorryker <ryker@openbsd.org>1998-10-05 20:12:28 +0000
committerryker <ryker@openbsd.org>1998-10-05 20:12:28 +0000
commit5b37fcf34e412bf0b6ad32ddb294e900d64c5855 (patch)
treecf5d52f4abf74eb3ee59fd705ef686e3c5b96d91 /lib/libssl/src/tools
parentadd a reference to fork(2) \ (diff)
downloadwireguard-openbsd-5b37fcf34e412bf0b6ad32ddb294e900d64c5855.tar.xz
wireguard-openbsd-5b37fcf34e412bf0b6ad32ddb294e900d64c5855.zip
Import of SSLeay-0.9.0b with RSA and IDEA stubbed + OpenBSD build
functionality for shared libs. Note that routines such as sslv2_init and friends that use RSA will not work due to lack of RSA in this library. Needs documentation and help from ports for easy upgrade to full functionality where legally possible.
Diffstat (limited to 'lib/libssl/src/tools')
-rw-r--r--lib/libssl/src/tools/Makefile.ssl54
-rw-r--r--lib/libssl/src/tools/c_hash9
-rw-r--r--lib/libssl/src/tools/c_info12
-rw-r--r--lib/libssl/src/tools/c_issuer10
-rw-r--r--lib/libssl/src/tools/c_name10
-rw-r--r--lib/libssl/src/tools/c_rehash47
6 files changed, 142 insertions, 0 deletions
diff --git a/lib/libssl/src/tools/Makefile.ssl b/lib/libssl/src/tools/Makefile.ssl
new file mode 100644
index 00000000000..537e97d268e
--- /dev/null
+++ b/lib/libssl/src/tools/Makefile.ssl
@@ -0,0 +1,54 @@
+#
+# SSLeay/tools/Makefile
+#
+
+DIR= tools
+TOP= ..
+CC= cc
+INCLUDES= -I.. -I../../include
+CFLAG=-g
+INSTALLTOP=/usr/local/ssl
+MAKE= make -f Makefile.ssl
+MAKEDEPEND= makedepend -f Makefile.ssl
+MAKEFILE= Makefile.ssl
+
+CFLAGS= $(INCLUDES) $(CFLAG)
+
+GENERAL=Makefile.ssl
+TEST=
+APPS= c_hash c_info c_issuer c_name c_rehash
+
+all:
+
+install:
+ @for i in $(APPS) ; \
+ do \
+ (cp $$i $(INSTALLTOP)/bin/$$i; \
+ chmod 755 $(INSTALLTOP)/bin/$$i ); \
+ done;
+
+files:
+ perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO
+
+links:
+ /bin/rm -f Makefile
+ $(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:
+ /bin/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/lib/libssl/src/tools/c_hash b/lib/libssl/src/tools/c_hash
new file mode 100644
index 00000000000..54ff9d2cacc
--- /dev/null
+++ b/lib/libssl/src/tools/c_hash
@@ -0,0 +1,9 @@
+#!/bin/sh
+# print out the hash values
+#
+
+for i in $*
+do
+ h=`ssleay x509 -hash -noout -in $i`
+ echo "$h.0 => $i"
+done
diff --git a/lib/libssl/src/tools/c_info b/lib/libssl/src/tools/c_info
new file mode 100644
index 00000000000..5dd960b3a1e
--- /dev/null
+++ b/lib/libssl/src/tools/c_info
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# print the subject
+#
+
+for i in $*
+do
+ n=`ssleay x509 -subject -issuer -enddate -noout -in $i`
+ echo "$i"
+ echo "$n"
+ echo "--------"
+done
diff --git a/lib/libssl/src/tools/c_issuer b/lib/libssl/src/tools/c_issuer
new file mode 100644
index 00000000000..a885b24b7ba
--- /dev/null
+++ b/lib/libssl/src/tools/c_issuer
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# print out the issuer
+#
+
+for i in $*
+do
+ n=`ssleay x509 -issuer -noout -in $i`
+ echo "$i\t$n"
+done
diff --git a/lib/libssl/src/tools/c_name b/lib/libssl/src/tools/c_name
new file mode 100644
index 00000000000..4b33e68c594
--- /dev/null
+++ b/lib/libssl/src/tools/c_name
@@ -0,0 +1,10 @@
+#!/bin/sh
+#
+# print the subject
+#
+
+for i in $*
+do
+ n=`ssleay x509 -subject -noout -in $i`
+ echo "$i $n"
+done
diff --git a/lib/libssl/src/tools/c_rehash b/lib/libssl/src/tools/c_rehash
new file mode 100644
index 00000000000..cbff15e48be
--- /dev/null
+++ b/lib/libssl/src/tools/c_rehash
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# redo the hashes for the certificates in your cert path or the ones passed
+# on the command line.
+#
+
+if [ "$SSLEAY"x = "x" -o ! -x $SSLEAY ]; then
+ SSLEAY='ssleay'
+ export SSLEAY
+fi
+DIR=/usr/ssl
+PATH=$DIR/bin:$PATH
+
+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=`$SSLEAY 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